Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS Validate archive failed with CFBundleIdentifier Collision & Invalid Bundle

I archived my app and would like to upload the ipa file.
But, uploading was failed with these errors.

App Store Connect Operation Error
CFBundleIdentifier Collision. There is more than one bundle with the     CFBundleIdentifier value 'org.alamofire.Alamofire' under the iOS application     'MyApp.app'.

App Store Connect Operation Error
CFBundleIdentifier Collision. There is more than one bundle with the     CFBundleIdentifier value 'org.alamofire.AlamofireImage' under the iOS application 'MyApp.app'.

App Store Connect Operation Error
CFBundleIdentifier Collision. There is more than one bundle with the     CFBundleIdentifier value 'com.swiftyjson.SwiftyJSON' under the iOS application 'MyApp.app'.

App Store Connect Operation Error
Invalid Bundle. The bundle at 'MyApp.app/Frameworks/MyAppEmbedded.framework' contains disallowed nested bundles.

App Store Connect Operation Error
Invalid Bundle. The bundle at 'MyApp.app/Frameworks/MyAppEmbedded.framework' contains disallowed file 'Frameworks'.

App Store Connect Operation Error
Invalid Bundle. The bundle at 'MyApp.app/PlugIns/MyAppShare.appex' contains disallowed nested bundles.

App Store Connect Operation Error
Invalid Bundle. The bundle at 'MyApp.app/PlugIns/MyAppShare.appex' contains disallowed file 'Frameworks'.

Project use Swift, but some third party library use Objective-C.
These are my project structure.

Targets
MyApp - Main App
MyAppEmbeddded - Embedded Framework
MyAppShare - Share Extension
MyApp, MyAppEmbedded and MyAppShare use Carthage & CocoaPods.
This is MyApp "Embedded Binaries" and "Linked Frameworks and Libraries"
enter image description here This is MyAppEmbedded "Linked Frameworks and Libraries"
enter image description here This is MyAppShare "Linked Frameworks and Libraries"
enter image description here CFBundleIdentifier Collision Error occurred "Alamofire", "AlamofireImage" and "SwiftyJSON".
These three framework are used by MyAppEmbedded.
So, I think Embedded Framework has something a cause.
Also, I noticed ipa content is strange.
Embedded Framework include three same Embedded Frameworks.
enter image description here

I read some questions about uploading errors and checked Build Settings.
MyApp: "Always Embed Swift Standard Libraries" is YES
MyAppEmedded & MyAppShare: "Always Embed Swift Standard Libraries" is NO

If you know about this error, please tell me about it.

like image 380
penlight Avatar asked Sep 21 '18 14:09

penlight


Video Answer


1 Answers

I found out the solution.

I removed the frameworks used by main app from the Embedded Framework and ShareExtension.
And my app can be builded and upload validation is OK.

I thought that Embedded Framework and Extension need including frameworks, but Only main app include frameworks, other targets also be able to use frameworks included by main app.

like image 190
penlight Avatar answered Sep 23 '22 14:09

penlight