打包完上傳到appstore時候報錯swift
ERROR ITMS-90171:Invalid Bundle Structure - The binary file XXX
libswiftRemoteMirror.dylib is not permitted.
Your app can’t contain standalone executables or libraries,
other than the CFBundleExecutable of supported bundles...
複製代碼
是強制設置 Always Embed Swift Standard Libraries
爲 No
xcode
是刪除libswiftRemoteMirror.dylib文件而後從新簽名打包bash
手動刪除.app中的libswiftRemoteMirror.dylib文件,而後對.app進行從新簽名,最後再用xcrun壓縮成 .ipa文件app
在xcodebuild 對工程進行編譯打包,生成了對應的.app文件 1.刪除App裏的libswiftRemoteMirror.dylibui
rm xxxApp.app/libswiftRemoteMirror.dylib
複製代碼
2.替換證書配置文件(文件名必須爲embedded,不得自定義)spa
cp mobileprovision路徑 xxxApp.app/embedded.mobileprovision
複製代碼
3.生成entitlements.plistcode
security cms -D -i mobileprovision路徑 > entitlements_full.plist
/usr/libexec/PlistBuddy -x -c 'Print:Entitlements' entitlements_full.plist > entitlements.plist
複製代碼
4.重簽名(certifierName爲重簽名證書文件名,能夠加證書ID後綴)ip
certifierName="iPhone Distribution: xxxTechnology Limited(xxxx)"
codesign -f -s $certifierName --entitlements entitlements.plist xxxApp.app
複製代碼
完成後,就能夠繼續用xcrun命令,把對應的.app文件壓縮成.ipa文件。string