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
サイバーセキュリティと認知バイアス:対策の隙を埋める心理学的アプローチ
shumei_ito
0
370
安心してください、日本語使えますよ―Ubuntu日本語Remix提供休止に寄せて― 2024-11-17
nobutomurata
0
380
VideoMamba: State Space Model for Efficient Video Understanding
chou500
0
160
フルカイテン株式会社 採用資料
fullkaiten
0
40k
いざ、BSC討伐の旅
nikinusu
2
750
Can We Measure Developer Productivity?
ewolff
1
120
Going down the RAT hole: Deep dive into the Vuln-derland of APT-class RAT Tools
nttcom
0
460
データの信頼性を支える仕組みと技術
chanyou0311
6
1.7k
B2B SaaS × AI機能開発 〜テナント分離のパターン解説〜 / B2B SaaS x AI function development - Explanation of tenant separation pattern
oztick139
2
190
Shopifyアプリ開発における Shopifyの機能活用
sonatard
4
230
インフラとバックエンドとフロントエンドをくまなく調べて遅いアプリを早くした件
tubone24
1
390
Intuneお役立ちツールのご紹介
sukank
3
780
Featured
See All Featured
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
Imperfection Machines: The Place of Print at Facebook
scottboms
264
13k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
830
Happy Clients
brianwarren
98
6.7k
Code Review Best Practice
trishagee
64
17k
BBQ
matthewcrist
85
9.3k
A Philosophy of Restraint
colly
203
16k
We Have a Design System, Now What?
morganepeng
50
7.2k
Building an army of robots
kneath
302
42k
Building Adaptive Systems
keathley
38
2.3k
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