<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>dSYM &#8211; 隨心所欲</title>
	<atom:link href="https://doeverythingiwant.com/tag/dsym/feed/" rel="self" type="application/rss+xml" />
	<link>https://doeverythingiwant.com</link>
	<description>iOS Developer 的隨筆記錄</description>
	<lastBuildDate>Wed, 04 Sep 2024 15:05:45 +0000</lastBuildDate>
	<language>zh-TW</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://doeverythingiwant.com/wp-content/uploads/2025/08/cropped-0802.png</url>
	<title>dSYM &#8211; 隨心所欲</title>
	<link>https://doeverythingiwant.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>[Xcode]dSYM 檔產出方式</title>
		<link>https://doeverythingiwant.com/xcode_dsym_file/</link>
					<comments>https://doeverythingiwant.com/xcode_dsym_file/#respond</comments>
		
		<dc:creator><![CDATA[艾普利]]></dc:creator>
		<pubDate>Wed, 30 Nov 2022 15:10:17 +0000</pubDate>
				<category><![CDATA[寫程式]]></category>
		<category><![CDATA[Debug]]></category>
		<category><![CDATA[dSYM]]></category>
		<category><![CDATA[iOS]]></category>
		<guid isPermaLink="false">https://doeverythingiwant.com/?p=1939</guid>

					<description><![CDATA[Photo by Arnold Francisca on U&#8230;]]></description>
										<content:encoded><![CDATA[
<p class="has-text-align-center">Photo by <a href="https://unsplash.com/ja/@clark_fransa?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText" target="_blank" rel="noopener">Arnold Francisca</a> on <a href="https://unsplash.com/s/photos/code?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText" target="_blank" rel="noopener">Unsplash</a></p>



<p></p>



<p>追蹤App Crash 常用方式之一就是在 App 裡放入 Firebase Crashlytics，只要App 有 Crash 就可以從 Firebase 後台看到，不過 Crashlytics 會要求上傳一個叫 dSYM 的東西，若沒有上傳 Firebase 會告知無法解析Crash 的資訊。</p>



<p>那到底dSYM 是什麼? 又應該要如何產生呢?</p>



<span id="more-1939"></span>



<h2 class="wp-block-heading">dSYM</h2>



<p>dSYM 是 debug symbols 顧名思義就是Debug 專用的，運用的地方就是在解析 Crash Report 用的，從手機端所收到的Crash Report 使用 dSYM 分析之後，可以得知是 App 裡的那一行程式發生 Crash ，當然這並不表示就是那一行程式出了錯誤，一般都還是要看上下文才有可能找出真正的原因，但是知道是那一行程式發生Crash 在找尋bug 的路上會快很多。</p>



<p></p>



<h2 class="wp-block-heading">dSYM 如何產生?</h2>



<p>其實在 Xcode 中預設 Release 版本都會產生 dSYM 檔案，若並不想要Debug 版產生 dSYM 的話，並不需要特別調整，但是一般公司除了 Release 與 Debug 外，還會有其他的環境，像是 Pre-release 之類或是想要在 Debug 的時候就能產生dSYM 並丟到 Crashlytics 上分析，這時候就需要調整設定了</p>



<h2 class="wp-block-heading">Generate Debug Symbol</h2>



<p>第一個要檢查的就是 Generate debug symbol 參數，從Project -> <strong>Build setting</strong> 底下搜尋 <strong>Generate debug symbol</strong> 就會出現了，要確認的事，這個參數需要設定為 Yes ，記得如果沒有特別改動的話預設值就是 Yes 了</p>



<figure class="wp-block-image size-large"><img fetchpriority="high" decoding="async" width="1024" height="154" src="https://doeverythingiwant.com/wp-content/uploads/2022/11/0001-1024x154.png" alt="" class="wp-image-1942" srcset="https://doeverythingiwant.com/wp-content/uploads/2022/11/0001-1024x154.png 1024w, https://doeverythingiwant.com/wp-content/uploads/2022/11/0001-300x45.png 300w, https://doeverythingiwant.com/wp-content/uploads/2022/11/0001-768x115.png 768w, https://doeverythingiwant.com/wp-content/uploads/2022/11/0001-1170x176.png 1170w, https://doeverythingiwant.com/wp-content/uploads/2022/11/0001-585x88.png 585w, https://doeverythingiwant.com/wp-content/uploads/2022/11/0001.png 1244w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<h2 class="wp-block-heading">Debug Information Format</h2>



<p>再來一樣是在 <strong>Build setting</strong> 底下搜尋 <strong>Debug information format</strong>，展開可以看到<strong> DWARF</strong> / <strong>DWARF with dSYM </strong>file，<strong>DWARF</strong> 全名是 Debugging With Arbitrary Record Formats，簡單來說就是一般的Debug file ，<strong>DWARF with dSYM </strong>就是一般的Debug file 再加上 debug symbol。</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="131" src="https://doeverythingiwant.com/wp-content/uploads/2022/11/0002-1024x131.png" alt="" class="wp-image-1943" srcset="https://doeverythingiwant.com/wp-content/uploads/2022/11/0002-1024x131.png 1024w, https://doeverythingiwant.com/wp-content/uploads/2022/11/0002-300x38.png 300w, https://doeverythingiwant.com/wp-content/uploads/2022/11/0002-768x99.png 768w, https://doeverythingiwant.com/wp-content/uploads/2022/11/0002-1170x150.png 1170w, https://doeverythingiwant.com/wp-content/uploads/2022/11/0002-585x75.png 585w, https://doeverythingiwant.com/wp-content/uploads/2022/11/0002.png 1473w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Xcode 的預設值是除了 Release 外都是 DWARF ，所以想要其他版本下也產生 dSYM 檔就是要改成 <strong>DWARF with dSYM</strong>，這樣就可以在debug 的檔案中看到 dSYM 檔了，若是使用 Firebase Crashlytics 就會配合它的自動上傳程式，讓它自行去特定的資料夾中上傳檔案。</p>



<p></p>



<p>若有需要在 Release 版以外產生 dSYM 檔，就是要設定 Generate debug symbol 與 Debug information format，就看專案的需求，並不是每種專案都需要上傳Release 版以外的 dSYM 檔，因為在開發的時候發生Crash 也算是很正常的事情，多數情況都不是需要特別被記錄的，QA 用的環境比較可能要求要記錄 Crash，就看需求~</p>



<p></p>



<p>最後，慣例祝大家寫Code 愉快!!</p>



<h6 class="wp-block-heading">Reference</h6>



<p><a rel="noreferrer noopener" href="https://stackoverflow.com/questions/22539691/whats-the-difference-between-dwarf-and-dwarf-with-dsym-file" target="_blank">[Stack overflow]What&#8217;s the difference between DWARF and DWARF with dSYM file?</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://doeverythingiwant.com/xcode_dsym_file/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
