最近打提审包遇到两个以前没遇到的问题记录下,后面遇到了少走弯路
error: exportArchive: IPA processing failed
内测企业版签名蓝盾打包没问题,打提审App Store
包一直报错:错误提示如下:
2020-12-02 18:17:56.851 xcodebuild[98846:13963971] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/4z/w596prq96zj0l3v5zkxs1mm80000gn/T/xxx_2020-12-02_18-17-56.851.xcdistributionlogs'.
error: exportArchive: IPA processing failed
Error Domain=IDEFoundationErrorDomain Code=1 "IPA processing failed" UserInfo={NSLocalizedDescription=IPA processing failed}
** EXPORT FAILED **
开始以为蓝盾出问题了,因为上午刚打了一个内测企业签名包还没报错。为了验证猜测,本地尝试脚本编译adhoc的包,发现报同样的错,那肯定是工程那里有问题了。Google
找了下类似问题,stackoverflow确实很多人遇到类似的问题,不过按照回答排查了下并没有解决问题。由于距离上个提审包有一段时间了,中间提交的Commit
很多,于是和同事分工,我排查最近添加修改的第三方库是不是有问题,同事Checkout
到某个Commit
然后打包adhoc
看是否有同样的问题。我把新添加的库都放入Master
分支check
出的一个测试分支,打包adhoc
后,发现没有问题,难道不是新增库的问题?这时同事把排查范围缩减到一个区间,某个Commit
打包成功往后一段Commit
打包报错,然后全力检查是那个Commit
开始导致的错误。Check
后发现某个Commit
引入了一个新的Framework
后就出现了问题,粗看没啥问题啊,细看发现有Embed
,难道这个Framework
不是动态库是静态库,用file
命令查看了下,确实是静态库Embed
后出了这个问题。
顺便提下如何查看静态库还是动态库
file XXX.framework/XXX
- 静态库:
current ar archive
MnaCommon.framework/MnaCommon: Mach-O universal binary with 4 architectures: [i386:current ar archive] [arm_v7] [x86_64] [arm64]
MnaCommon.framework/MnaCommon (for architecture i386): current ar archive
MnaCommon.framework/MnaCommon (for architecture armv7): current ar archive
MnaCommon.framework/MnaCommon (for architecture x86_64): current ar archive
MnaCommon.framework/MnaCommon (for architecture arm64): current ar archive
- 动态库:
Mach-O 64-bit dynamically linked shared library
MnaPlayer: Mach-O 64-bit dynamically linked shared library x86_64
ERROR ITMS-90205: "Invalid Bundle. ERROR ITMS-90685: "CFBundleIdentifier Collision.
打包后上传报错:
Package Summary: 1 package(s) were not uploaded because they had problems: /20201203173205-ipa-com.tencent.xxx-9764/1441393867.itmsp - Error Messages: ERROR ITMS-90685: "CFBundleIdentifier Collision. There is more than one bundle with the CFBundleIdentifier value 'com.tencent.xxx' under the iOS application 'xxx.app'." ERROR ITMS-90205: "Invalid Bundle. The bundle at 'xxx.app/PlugIns/PacketTunnel.appex' contains disallowed nested bundles." ERROR ITMS-90206: "Invalid Bundle. The bundle at 'xxx.app/PlugIns/PacketTunnel.appex' contains disallowed file 'Frameworks'." [2020-12-03 17:34:18 CST]
DBG-X: Returning 1
这个问题是出现在上传时报错,由于已经告知了出错的BundleIdentifier
所以查找起来比较快,直接说原因了。因为某个动态库,被Embed
了两次。一次在Extension进程
一次在主进程。解决办法:只需把Extension
进程的Embed
去掉即可。
总结
在使用第三方或者团队成员打的Framework
时首先需要检查好库的类型,然后再集成进工程中,避免静态库Embed
,动态库多次Embed
操作。