打包完上传到appstore时候报错

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

第二种方式

是删除libswiftRemoteMirror.dylib文件然后重新签名打包

手动删除.app中的libswiftRemoteMirror.dylib文件,然后对.app进行重新签名,最后再用xcrun压缩成 .ipa文件

在xcodebuild 对工程进行编译打包,生成了对应的.app文件
1.删除App里的libswiftRemoteMirror.dylib

rm  xxxApp.app/libswiftRemoteMirror.dylib

2.替换证书配置文件(文件名必须为embedded,不得自定义)

cp  mobileprovision路径  xxxApp.app/embedded.mobileprovision 

3.生成entitlements.plist

security cms -D -i mobileprovision路径 > entitlements_full.plist

/usr/libexec/PlistBuddy -x -c 'Print:Entitlements' entitlements_full.plist > entitlements.plist

4.重签名(certifierName为重签名证书文件名,可以加证书ID后缀)

certifierName="iPhone Distribution: xxxTechnology Limited(xxxx)"
codesign -f -s $certifierName  --entitlements entitlements.plist xxxApp.app

完成后,就可以继续用xcrun命令,把对应的.app文件压缩成.ipa文件。

Logo

北京人形旗下天工造物具身智能开源社区,聚焦具身天工与慧思开物两大平台

更多推荐