<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Hiroki Matsue on Medium]]></title>
        <description><![CDATA[Stories by Hiroki Matsue on Medium]]></description>
        <link>https://medium.com/@waytoa?source=rss-167a3cdc4ebd------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*VY36QNjXCWI9qcRC.</url>
            <title>Stories by Hiroki Matsue on Medium</title>
            <link>https://medium.com/@waytoa?source=rss-167a3cdc4ebd------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 05:05:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@waytoa/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Obfuscating Flutter Code and Generate Map Files for iOS]]></title>
            <link>https://medium.com/@waytoa/obfuscating-flutter-code-and-generate-map-files-for-ios-fdaf4a377ec4?source=rss-167a3cdc4ebd------2</link>
            <guid isPermaLink="false">https://medium.com/p/fdaf4a377ec4</guid>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[sentry]]></category>
            <dc:creator><![CDATA[Hiroki Matsue]]></dc:creator>
            <pubDate>Sat, 08 Dec 2018 13:36:03 GMT</pubDate>
            <atom:updated>2021-12-16T15:42:38.248Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CxgkQo47i5DmNFk-lSy9mQ.png" /><figcaption>Obfuscated Dart Code on Sentry reports 😇</figcaption></figure><p>This story explain how to read obfuscated Dart code on error tracking service such as Sentry.</p><h3>Obfuscating Dart Code for iOS App</h3><p>Flutter deployment manual has a line about obfuscating Dart code.</p><ul><li><a href="https://flutter.io/docs/deployment/ios">Build and release an iOS app</a></li><li><a href="https://github.com/flutter/flutter/wiki/Obfuscating-Dart-Code">Obfuscating Dart Code · flutter/flutter Wiki</a></li></ul><p>Just follow above document, it required few modification on following files.</p><ul><li>&lt;ProjectRoot&gt;/packages/flutter_tools/bin/xcode_backend.sh</li><li>&lt;ProjectRoot&gt;/ios/Flutter/Release.xcconfig</li></ul><p>Then execute fluuter build ios, you will see obfuscated result on built App.framework.</p><pre>$ strings build/ios/Release-iphoneos/Runner.app/Frameworks/App.framework/App<br>...<br>get:_vxa@7048458x<br>get:_aLa@9040228x<br>get:_DLa@7048458x<br>...</pre><p>Without obfuscating, App.framework will be like this.</p><pre>$ strings build/ios/Release-iphoneos/Runner.app/Frameworks/App.framework/App<br>...<br>get:_count@7048458<br>get:_onData@9040228<br>get:_isSubscribed@7048458<br>...</pre><p>As you can see, names in our codes are changed to meaningless strings.</p><h3>Error Tracking with Sentry</h3><p>Currently, Sentry is a easy way to manage errors on our Flutter apps.</p><p><a href="https://flutter.io/docs/cookbook/maintenance/error-reporting">Report errors to a service</a></p><p>You can use this Dart code snippet to cause a test crash in.</p><pre>throw new ArgumentError(&#39;Test error&#39;);</pre><p>From above crash, Sentry will report error like this.</p><pre>main.dart in SampleApp.build at line 48</pre><p>But after obfuscating, error reporting will be like this.</p><pre>SEd in bZ.opa at line 48</pre><p>To read obfuscated error reporting, add--save-obfuscation-map option to &lt;ProjectRoot&gt;/ios/Flutter/Release.xcconfig.</p><pre>EXTRA_GEN_SNAPSHOT_OPTIONS=--obfuscate,--save-obfuscation-map=build/ios_dart_symbols_${FLUTTER_BUILD_NUMBER}.json</pre><p>Generated map will help to read your obfuscated error reports.</p><pre>$ cat ios_dart_symbols_1.json<br>...<br>&quot;_BuildJsonListener&quot;,&quot;_Gf&quot;,<br>&quot;CustomSymbolRenderer&quot;,&quot;cs&quot;,<br>&quot;devicePixelRatio&quot;,&quot;saa&quot;,<br>...</pre><p>In this story, I just mentioned about iOS. We can generate obfuscating map files on Android build step too. Just add--save-obfuscation-map option.</p><p>I believe Firebase Crashlytics supports Flutter near future. Until that, hope this story help Flutter developers.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fdaf4a377ec4" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>