iOS10 Xcode 8 中provisioning file 相關bug

weixin_34402408發表於2018-01-03

1.Xcode 8 provisioning profile 無法下載

此時,我們需要清除Mac中的provisioning profile,方法是前往到目錄    ~/資源庫/MobileDevice/Provisioning Profiles 然後刪除裡面的所有profile,然後再到xcode-preferences-account-detail裡下載相關provisioning file

2.Xcode 8 shows error that provisioning profile doesn't include signing certificate

這個bug,我找了非常的久,刪除自己的證書再新增也沒用,刪除provision也沒用,就差重新create  證書了,但那樣的話,代價太大了。糾結很久後,在stackoverflow中找到了答案,解決的方法也很簡單,如下圖

只需要給automatically signing 打上勾,就ok了,一鍵解決。Xcode 8中,Apple對整個證書籤名管理進行了重構,現在不需要到build setting裡選擇,在general裡就能直接選擇,很棒,疑難雜症就用automatically  signing,更棒!之前證書老是出這個那個問題,開發者煩不甚煩,看來Apple終於開始重視我們的聲音了。

方法來源:http://stackoverflow.com/questions/39568005/xcode-8-shows-error-that-provisioning-profile-doesnt-include-signing-certificat

-----20161012更新

好吧,xcode又發瘋了,證書正確,provision正確但就是編譯不過,提示如下 CodeSign /Users/floydresler/Library/Developer/Xcode/DerivedData/App_for_Dark_Tower-egxiflrzexibnghkjwvtznkhigek/Build/Products/Debug-iphoneos/App
for\ Dark\ Tower.app cd "/Users/floydresler/Source Code/App for Dark Tower" export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"

Signing Identity:     "iPhone Developer: Floyd Resler (6UFPUB2SE5)" Provisioning Profile: "Dark Tower Dev"                   (31912d69-5ec4-4740-a696-81ea06d3f3fb)

/usr/bin/codesign --force --sign 4EA262133AD193D1EB339D5E39FC055053663735 --entitlements

/Users/floydresler/Library/Developer/Xcode/DerivedData/App_for_Dark_Tower-egxiflrzexibnghkjwvtznkhigek/Build/Intermediates/App
for\ Dark\ Tower.build/Debug-iphoneos/App\ for\ Dark\ Tower.build/App\ for
Dark\ Tower.app.xcent --timestamp=none /Users/floydresler/Library/Developer/Xcode/DerivedData/App_for_Dark_Tower-egxiflrzexibnghkjwvtznkhigek/Build/Products/Debug-iphoneos/App
for\ Dark\ Tower.app

/Users/floydresler/Library/Developer/Xcode/DerivedData/App_for_Dark_Tower-egxiflrzexibnghkjwvtznkhigek/Build/Products/Debug-iphoneos/App for Dark Tower.app: resource fork, Finder information, or similar detritus not allowed Command /usr/bin/codesign failed with exit code 1

之前刪除資源庫裡developer-xcode-derivedData 中的檔案可以解決,但現在不行了!OMG,最後,我找到了解決辦法,如下

解決方法:終端CD到工程的根目錄下,就是如下圖,xcodeproj檔案所在的PT36C資料夾

再然後依次執行如下三行命令

find . -type f -name '.jpeg' -execxattr -c {} ; find . -type f -name '.png' -execxattr -c {} ; find . -type f -name '*.tif' -execxattr -c {} ;

perfect,打完收工!

看來往後和xcode的鬥爭還會繼續很長時間,我的一生是抗爭的一生!

尾聲: 關於xcode 8裡code signing的變化,我推薦一篇文章: http://www.oschina.net/translate/code-signing-xcode-8?cmp 寫的很好,很詳細,希望對各位被xcode 8簽名證書折磨的小夥伴們有幫助。

相關文章