Xcode found a package with the same identifier using cocoapods framework

When I try to run my application in a simulator or on my iPhone, I get the following error:

App installation failed This application or a bundle it contains has the same bundle identifier as this application or another bundle that it contains. Bundle identifiers must be unique. 

enter image description here

When I look in the device log, I get a detailed error message:

For iPhone:

 Feb 13 10:28:36 iPhone-de-P streaming_zip_conduit[240] <Warning>: __dispatch_source_read_socket_block_invoke:274: Failed to install application at file:///var/mobile/Media/PublicStaging/MyApp.app/ : Error Domain=LaunchServicesError Code=0 "(null)" UserInfo={Error=DuplicateIdentifier, ErrorDescription=Found bundle at /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.3L3YM3/extracted/MyApp.app/Frameworks/SlideMenuControllerSwift.framework with the same identifier ($(PRODUCT_BUNDLE_IDENTIFIER)) as bundle at /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.3L3YM3/extracted/MyApp.app/Frameworks/Serialize.framework} 

For simulator:

 12/2/16 20:40:34,408 com.apple.CoreSimulator.CoreSimulatorService[2426]: Error Domain=LaunchServicesError Code=0 "(null)" UserInfo={Error=DuplicateIdentifier, ErrorDescription=Found bundle at /Users/myUserName/Library/Developer/CoreSimulator/Devices/78CD18E0-B8E1-4A95-9224-2EF3ABDE5585/data/Library/Caches/com.apple.mobile.installd.staging/temp.s9Kecf/extracted/MyApp.app/Frameworks/SlideMenuControllerSwift.framework with the same identifier ($(PRODUCT_BUNDLE_IDENTIFIER)) as bundle at /Users/myUserName/Library/Developer/CoreSimulator/Devices/78CD18E0-B8E1-4A95-9224-2EF3ABDE5585/data/Library/Caches/com.apple.mobile.installd.staging/temp.s9Kecf/extracted/MyApp.app/Frameworks/Serialize.framework} 

The same error in both devices: 2 frameworks with the same package identifier

I usually resolved this error by doing "pod update" or "pod install" before each compilation, but this solution no longer works.

My project contains 5 modules, and this is my sub-file:

 platform :ios, '8.0' use_frameworks! target 'MyApp' do pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire' pod 'MBProgressHUD', '~> 0.9.1' pod 'swift-serialize' pod 'SwiftyJSON', :git => 'https://github.com/SwiftyJSON/SwiftyJSON.git' pod 'SlideMenuControllerSwift' end target 'MyApp' do end target 'MyApp' do end 

I did not set the pods package identifiers manually. All container configurations are the ones that are installed by default when you install "pod install"

In addition, the two modules that ask me the problem are configured with the following package:

SlideMenu Pod: enter image description here

Serialize Pod: enter image description here

And this is the configuration of my project: enter image description here

I tried every published solution: reset simulator, delete derived data, clean products, clean build folder, delete the simulator and reinstall it ...

I searched the forums for cocoapods, GitHub and Google, but I can not find a link to this error with the identifier of the pods frame package.

I really don't know why this error occurs ... so any help would be appreciated by the helpers.

+5
source share
1 answer

Finally, the error was the PRODUCT_BUNDLE_IDENTIFIER field in the info.plist of each item. Changing it to "org.cocoapods. $ {PRODUCT_NAME: rfc1034identifier}", he solved the problem (previously it was "$ (PRODUCT_BUNDLE_IDENTIFIER)").

+6
source

Source: https://habr.com/ru/post/1242946/


All Articles