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
450
ローディング時のより良いUIの実装
matsue
2
1.9k
カウルにおけるElasiticsearchの導入と実例
matsue
0
830
Other Decks in Technology
See All in Technology
ネット広告に未来はあるか?「3rd Party Cookie廃止とPrivacy Sandboxの効果検証の裏側」 / third-party-cookie-privacy
cyberagentdevelopers
PRO
1
130
AWS re:Inventを徹底的に楽しむためのTips / Tips for thoroughly enjoying AWS re:Invent
yuj1osm
1
560
顧客が本当に必要だったもの - パフォーマンス改善編 / Make what is needed
soudai
24
6.7k
【技術書典17】OpenFOAM(自宅で極める流体解析)2次元円柱まわりの流れ
kamakiri1225
0
210
visionOSでの空間表現実装とImmersive Video表示について / ai-immersive-visionos
cyberagentdevelopers
PRO
1
110
カメラを用いた店内計測におけるオプトインの仕組みの実現 / ai-optin-camera
cyberagentdevelopers
PRO
1
120
プロダクト成長に対応するプラットフォーム戦略:Authleteによる共通認証基盤の移行事例 / Building an authentication platform using Authlete and AWS
kakehashi
1
150
omakaseしないための.rubocop.yml のつくりかた / How to Build Your .rubocop.yml to Avoid Omakase #kaigionrails
linkers_tech
3
730
Oracle Cloud Infrastructureデータベース・クラウド:各バージョンのサポート期間
oracle4engineer
PRO
27
12k
グローバル展開を見据えたサービスにおける機械翻訳プラクティス / dp-ai-translating
cyberagentdevelopers
PRO
1
150
新卒1年目が向き合う生成AI事業の開発を加速させる技術選定 / ai-web-launcher
cyberagentdevelopers
PRO
7
1.5k
Product Engineer Night #6プロダクトエンジニアを育む仕組み・施策
hacomono
PRO
1
460
Featured
See All Featured
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
25
1.8k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
22k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
46
2.1k
A designer walks into a library…
pauljervisheath
202
24k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
We Have a Design System, Now What?
morganepeng
50
7.2k
Art, The Web, and Tiny UX
lynnandtonic
296
20k
GraphQLの誤解/rethinking-graphql
sonatard
66
9.9k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
167
49k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
42
9.2k
Adopting Sorbet at Scale
ufuk
73
9k
Mobile First: as difficult as doing things right
swwweet
222
8.9k
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