当我尝试在模拟器或iPhone中执行我的应用程序时,我收到下一个错误:
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.
当我查看设备的日志时,我得到了详细的错误消息:
对于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}
对于模拟器:
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}
两个设备中的错误相同:2个具有相同捆绑ID的框架
通常我在每次编译之前通过执行“pod update”或“pod install”解决了这个错误,但是这个解决方案不再适用了.
我的项目包含5个pod,这是我的podfile:
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
我没有手动设置任何pods包ID.
pod的所有配置都是在您进行“pod安装”时默认设置的配置
此外,给我提出问题的两个pod配置了以下捆绑包:
我尝试了每个发布的解决方案:重置模拟器,删除派生数据,清洁产品,清理构建文件夹,删除模拟器并重新安装…
我在cocoapods论坛,GitHub和谷歌搜索,但我找不到任何关于pods框架的包ID的错误的引用.
我真的不知道为什么会出现这种错误…所以任何帮助都会受到赞赏.