ios – XCode使用cocoapods框架找到了具有相同标识符的bundle
发布时间:2020-12-14 17:59:38 所属栏目:百科 来源:网络整理
导读:当我尝试在模拟器或iPhone中执行我的应用程序时,我收到下一个错误: App installation failedThis application or a bundle it contains has the same bundle identifier as this application or another bundle that it contains. Bundle identifiers must
当我尝试在模拟器或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配置了以下捆绑包: SlideMenu Pod: 序列化Pod: 这是我的项目包配置: 我尝试了每个发布的解决方案:重置模拟器,删除派生数据,清洁产品,清理构建文件夹,删除模拟器并重新安装… 我在cocoapods论坛,GitHub和谷歌搜索,但我找不到任何关于pods框架的包ID的错误的引用. 我真的不知道为什么会出现这种错误…所以任何帮助都会受到赞赏. 解决方法
最后,错误是每个pod的info.plist中的PRODUCT_BUNDLE_IDENTIFIER字段.将其更改为“org.cocoapods.${PRODUCT_NAME:rfc1034identifier}”解决了问题(以前是“$(PRODUCT_BUNDLE_IDENTIFIER)”).
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |