Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Flutterアプリの難読化とエラーレポート(iOS)
Search
Hiroki Matsue
December 06, 2018
Technology
2
1.9k
Flutterアプリの難読化とエラーレポート(iOS)
"Flutter Meetup Tokyo #6"で使った資料です。
https://flutter-jp.connpass.com/event/105834/
Hiroki Matsue
December 06, 2018
Tweet
Share
More Decks by Hiroki Matsue
See All by Hiroki Matsue
Getting Screenshots Automatically in Flutter
matsue
2
460
Write tests for Provider
matsue
5
760
Optimize Flutter Workflow on Bitrise
matsue
2
1.1k
ややcomplexなBLoCへの対応
matsue
2
730
いまさらだけど「良い通知」について考えてみた
matsue
4
11k
リテンション率を2倍にするための2つの視点
matsue
0
3.5k
リソースを効率的に使うためのバックログ活用事例
matsue
1
450
ローディング時のより良いUIの実装
matsue
2
1.8k
カウルにおけるElasiticsearchの導入と実例
matsue
0
820
Other Decks in Technology
See All in Technology
Interfacing Kernel C APIs from Rust
ennael
PRO
0
180
不感対策ソリューション
jtes
0
220
Oracle Cloud Infrastructure:2024年9月度サービス・アップデート
oracle4engineer
PRO
0
240
【shownet.conf_】放送局とShowNetが共創する、未来の放送システム ~Media over IP 特別企画の裏側~
shownet
PRO
0
240
【shownet.conf_】多様化するネットワーク環境を柔軟に統合するルーティングテクノロジー
shownet
PRO
0
250
SQLによるオブザーバビリティの進化とClickHouseの実力
mikimatsumoto
0
150
CDK Pipelinesをざっくり理解する
smt7174
2
290
分析者起点の企画を成功させた連携面の工夫
lycorptech_jp
PRO
0
210
第45回 MLOps 勉強会 - ML Test Score を用いた機械学習システムの定量的なアセスメント
masatakashiwagi
2
110
ITエンジニアとして知っておいてほしい、電子メールという大きな穴
logica0419
1
250
20240927競プロとともにあるく_ソフトウェアテストの地図.pdf
prettyhappycatty
0
170
成果のためのコミュニケーション - 語彙を育てよう -/communication-for-good-outcome-developing-vocabulary
hassaku63
2
130
Featured
See All Featured
Building Adaptive Systems
keathley
37
2.1k
A better future with KSS
kneath
235
17k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
248
21k
Thoughts on Productivity
jonyablonski
67
4.2k
Music & Morning Musume
bryan
46
6.1k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
104
48k
Rebuilding a faster, lazier Slack
samanthasiow
78
8.6k
Practical Orchestrator
shlominoach
185
10k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
36
1.7k
Unsuck your backbone
ammeep
667
57k
Automating Front-end Workflow
addyosmani
1365
200k
Scaling GitHub
holman
458
140k
Transcript
FlutterΞϓϦͷಡԽͱ ΤϥʔϨϙʔτ(iOS) Hiroki Matsue Dec 6th, 2018 Flutter Meetup Tokyo
#6
Hiroki Matsue (@macs_6)
FlutterͰIIJmio͚ʹ ʮΈ͓εΠονʯΛ ϦϦʔε
None
[࣭] FlutterͰΞϓϦΛ ϦϦʔε͍ͯ͠Δਓʁ
[࣭] ϦϦʔεલʹ ಡԽͨ͠ਓʁ
ϦϦʔεؔ࿈ͷυΩϡϝϯτ https://flutter.io/docs/deployment/ios
None
None
࠷ॳʹॻ͍͚ͯ͋ͬͨͲ ݟམͱͯͨ͠ (AndroidͷProGuardରԠͯͯ͠ؾ͍ͮͨ)
ͪͳΈʹ
(ϦϦʔεؔ࿈Ͱઢ) ΞΠίϯ࡞"flutterlaunchericons"͏ͱ 1ͭͷը૾͔Β͍͍ײ͡ʹ࡞ͬͯ͘ΕΔ
iOSDartίʔυ෦͕ ಡԽͷର
Δ͜ͱbuild࣌ʹ ΦϓγϣϯΛ͚ͭΔ͚ͩ (Կނ͔ॳظঢ়ଶͰରԠ͞Εͯͳ͍ ) https://github.com/flutter/flutter/wiki/Obfuscating-Dart-Code
<ProjectRoot>/ios/Flutter/Release.xcconfig EXTRA_GEN_SNAPSHOT_OPTIONS=--obfuscate
# <ProjectRoot>/packages/flutter_tools/bin/xcode_backend.sh local extra_gen_snapshot_options_or_none="" if [[ -n "$EXTRA_GEN_SNAPSHOT_OPTIONS" ]]; then
extra_gen_snapshot_options_or_none="--extra-gen-snapshot-options=$EXTRA_GEN_SNAPSHOT_OPTIONS" fi ... RunCommand "${FLUTTER_ROOT}/bin/flutter" --suppress-analytics \ ${verbose_flag} \ build aot \ --output-dir="${build_dir}/aot" \ --target-platform=ios \ --target="${target_path}" \ --${build_mode} \ --ios-arch="${archs}" \ ${local_engine_flag} \ ${track_widget_creation_flag} \ ${extra_gen_snapshot_options_or_none}
# <ProjectRoot>/packages/flutter_tools/bin/xcode_backend.sh local extra_gen_snapshot_options_or_none="" if [[ -n "$EXTRA_GEN_SNAPSHOT_OPTIONS" ]]; then
extra_gen_snapshot_options_or_none="--extra-gen-snapshot-options=$EXTRA_GEN_SNAPSHOT_OPTIONS" fi ... RunCommand "${FLUTTER_ROOT}/bin/flutter" --suppress-analytics \ ${verbose_flag} \ build aot \ --output-dir="${build_dir}/aot" \ --target-platform=ios \ --target="${target_path}" \ --${build_mode} \ --ios-arch="${archs}" \ ${local_engine_flag} \ ${track_widget_creation_flag} \ ${extra_gen_snapshot_options_or_none}
xcode_backend.sh ͱʁ Build PhaseͷRun ScriptͰΘΕ͍ͯΔεΫϦϓτ Xcode͔ΒDartίʔυ͕build͞ΕΔͷ͜Εͷ͓͔͛
(ઢ2) طଘΞϓϦʹFlutterΛಋೖ͢Δ࣌ xcode_backend.sh embed Add2AppϘʔυ্Ͱઈࢍ։ൃத
͜ΕͰϏϧυ͢Ε ಡԽྃʂ Χϯλϯʂ
ಡԽͷ֬ೝํ๏ʁ
App.frameworkΛ֬ೝ͢Δ $ strings build/ios/Release-iphoneos/Runner.app/Frameworks/App.framework/App ... get:_vxa@7048458x get:_aLa@9040228x get:_DLa@7048458x ...
ಡԽͷલޙͰൺֱ before get:_count@7048458 get:_onData@9040228 get:_isSubscribed@7048458 after get:_vxa@7048458x get:_aLa@9040228x get:_DLa@7048458x
Dartίʔυ͕ಡԽ͞Εͨ
...ϦϦʔεޙͷ͋Δ
None
SentryͷΤϥʔϨϙʔτ ಡԽ͞ΕͯΔ
ಡԽલͷΤϥʔϨϙʔτ
։ൃதؾ͔ͮͳ͔ͬͨ
ಡԽͷલޙͰൺֱ before main.dart in SampleApp.build at line 48 after SEd
in bZ.opa at line 48
ࣗಡΊͳ͍
ϦϦʔεࡁΞϓϦͷ Τϥʔݟ͍ͨ
mapϑΝΠϧΛग़ྗ͢Δ ઌ΄ͲͷυΩϡϝϯτʹ͋ͬͨઃఆ EXTRA_GEN_SNAPSHOT_OPTIONS=--obfuscate mapϑΝΠϧΛग़ྗ͢ΔઃఆΛՃ EXTRA_GEN_SNAPSHOT_OPTIONS=--obfuscate, ɹ --save-obfuscation-map=ios_dart_symbols_${FLUTTER_BUILD_NUMBER}.json
ग़ྗ͞ΕͨmapϑΝΠϧ $ cat ios_dart_symbols_5.json ... "_BuildJsonListener","_Gf", "CustomSymbolRenderer","cs", "devicePixelRatio","saa" ... ͜ΕΛࢀর͢ΕಡΊΔ
!
աڈʹϦϦʔεͨ͠ΞϓϦͷmapϑΝΠϧʁ ࢼͨ͠ͱ͜Ζɺ ੜݩͷίʔυ͕ಉ͡Ͱ͋Εmapಉ͡ʹͳͬͨ
·ͱΊ
·ͱΊ • FlutterͩͱiOSͰDartίʔυͷಡԽ࡞ۀ͕͋Δ • stringsίϚϯυͰνΣοΫ͢Δͷָ͕ • mapϑΝΠϧग़ྗ͓ͯ͘͠ͱSentryղಡʹ͑Δ # before main.dart
in SampleApp.build at line 48 # after SEd in bZ.opa at line 48
Έ͓εΠονɺੋඇ͝ར༻͍ͩ͘͞
Thanks