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
770
Optimize Flutter Workflow on Bitrise
matsue
2
1.1k
ややcomplexなBLoCへの対応
matsue
2
740
いまさらだけど「良い通知」について考えてみた
matsue
4
11k
リテンション率を2倍にするための2つの視点
matsue
0
3.5k
リソースを効率的に使うためのバックログ活用事例
matsue
1
460
ローディング時のより良いUIの実装
matsue
2
1.9k
カウルにおけるElasiticsearchの導入と実例
matsue
0
830
Other Decks in Technology
See All in Technology
IBC 2024 動画技術関連レポート / IBC 2024 Report
cyberagentdevelopers
PRO
1
110
障害対応指揮の意思決定と情報共有における価値観 / Waroom Meetup #2
arthur1
5
480
RubyのWebアプリケーションを50倍速くする方法 / How to Make a Ruby Web Application 50 Times Faster
hogelog
3
950
[CV勉強会@関東 ECCV2024 読み会] オンラインマッピング x トラッキング MapTracker: Tracking with Strided Memory Fusion for Consistent Vector HD Mapping (Chen+, ECCV24)
abemii
0
230
Incident Response Practices: Waroom's Features and Future Challenges
rrreeeyyy
0
160
AWS Media Services 最新サービスアップデート 2024
eijikominami
0
200
【令和最新版】AWS Direct Connectと愉快なGWたちのおさらい
minorun365
PRO
5
760
なぜ今 AI Agent なのか _近藤憲児
kenjikondobai
4
1.4k
データプロダクトの定義からはじめる、データコントラクト駆動なデータ基盤
chanyou0311
2
330
20241120_JAWS_東京_ランチタイムLT#17_AWS認定全冠の先へ
tsumita
2
300
SRE×AIOpsを始めよう!GuardDutyによるお手軽脅威検出
amixedcolor
0
180
AWS Lambdaと歩んだ“サーバーレス”と今後 #lambda_10years
yoshidashingo
1
180
Featured
See All Featured
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
Speed Design
sergeychernyshev
25
620
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
44
2.2k
The Art of Programming - Codeland 2020
erikaheidi
52
13k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
0
100
Git: the NoSQL Database
bkeepers
PRO
427
64k
GraphQLとの向き合い方2022年版
quramy
43
13k
Embracing the Ebb and Flow
colly
84
4.5k
Building Adaptive Systems
keathley
38
2.3k
Building Your Own Lightsaber
phodgson
103
6.1k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
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