解決iOS 9 symbolicatecrash卡死

背景

在iOS 9 的日誌裏面會出現重複的 ParsecSubscriptionServiceSupport 或 AssetCacheServices , 這導致蘋果提供的symbolicatecrash轉換時出現卡死。

原因

這是由於xcode提供的symbolicatecrash對於重複image的日誌會出現死循環。

解決方法:

在 XCode目錄,找到 symbolicatecrash 文件:
/Applications/Xcode.app/Contents/SharedFrameworks/DTDeviceKitBase.framework/Versions/A/Resources/symbolicatecrash

使用編輯器進行編輯,
將以下代碼:

                # add ourselves to that chain
                $images{$nextIDKey}{nextID} = $image{base};

                # and store under the key we just recorded
                $bundlename = $bundlename . $image{base};

替換爲:

            if ($image{uuid} ne $images{$bundlename}{uuid}) {

                # add ourselves to that chain
                $images{$nextIDKey}{nextID} = $image{base};

                # and store under the key we just recorded
                $bundlename = $bundlename . $image{base};
            }

懶人的解決方法:

在命令行輸入如下腳本,可修改默認的xcode的symbolicatecrash 文件(可能需要輸入管理員密碼):

curl -o /tmp/t.patch https://raw.githubusercontent.com/zqxiaojin/OptSymbolicatecrash/master/fix_dead_loop.patch && cd `xcode-select -p`/../SharedFrameworks/DTDeviceKitBase.framework/Versions/A/Resources/ && sudo patch symbolicatecrash  /tmp/t.patch && cd -
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章