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
4
780
Optimize Flutter Workflow on Bitrise
matsue
2
1.2k
ややcomplexなBLoCへの対応
matsue
2
750
いまさらだけど「良い通知」について考えてみた
matsue
4
11k
リテンション率を2倍にするための2つの視点
matsue
0
3.5k
リソースを効率的に使うためのバックログ活用事例
matsue
1
460
ローディング時のより良いUIの実装
matsue
2
1.9k
カウルにおけるElasiticsearchの導入と実例
matsue
0
840
Other Decks in Technology
See All in Technology
プロダクト開発を加速させるためのQA文化の築き方 / How to build QA culture to accelerate product development
mii3king
1
240
AIのコンプラは何故しんどい?
shujisado
1
180
統計データで2024年の クラウド・インフラ動向を眺める
ysknsid25
2
810
どちらを使う?GitHub or Azure DevOps Ver. 24H2
kkamegawa
0
320
Oracle Cloudの生成AIサービスって実際どこまで使えるの? エンジニア目線で試してみた
minorun365
PRO
4
250
OpenAIの蒸留機能(Model Distillation)を使用して運用中のLLMのコストを削減する取り組み
pharma_x_tech
3
410
re:Invent 2024 Innovation Talks(NET201)で語られた大切なこと
shotashiratori
0
250
ニューモーフィズムってどうなの
toridori_dev
0
110
[Ruby] Develop a Morse Code Learning Gem & Beep from Strings
oguressive
1
110
20241214_WACATE2024冬_テスト設計技法をチョット俯瞰してみよう
kzsuzuki
3
400
Kubernetes環境のオブザーバビリティの次の一歩をOpenTelemetryで実現すると何がどうなるの? - CloudNative Days Winter 2024
katzchang
0
140
データパイプラインをなんとかした話 / Improving the Data Pipeline in IVRy
mirakui
1
340
Featured
See All Featured
A Modern Web Designer's Workflow
chriscoyier
693
190k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Fashionably flexible responsive web design (full day workshop)
malarkey
405
65k
Facilitating Awesome Meetings
lara
50
6.1k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
Building an army of robots
kneath
302
44k
Building Applications with DynamoDB
mza
91
6.1k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
247
1.3M
Building Your Own Lightsaber
phodgson
103
6.1k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
How to train your dragon (web standard)
notwaldorf
88
5.7k
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