我正在尝试创建一些cocoatouch框架项目。
因为我需要一些像Canvas,afnetwork等的框架,我通过cocoapod安装它。
它在模拟器上工作正常,但是当我尝试在我的设备上运行它时会出现此错误。
dyld: Library not loaded: @rpath/Canvas.framework/Canvas
Referenced from: /private/var/mobile/Containers/Bundle/Application/CB1D11AD-0406-43D9-849F-D5C6DFFD3F0C/frameworkTester.app/Frameworks/awsome.framework/awsome
Reason: image not found
我尝试手动复制,并收到此错误
dyld: Library not loaded: @rpath/Canvas.framework/Canvas
Referenced from: /private/var/mobile/Containers/Bundle/Application/EE6C9F39-32B7-4F37-A551-4CD879835ADE/frameworkTester.app/Frameworks/awsome.framework/awsome
Reason: no suitable image found. Did find:
/private/var/mobile/Containers/Bundle/Application/EE6C9F39-32B7-4F37-A551-4CD879835ADE/frameworkTester.app/Frameworks/awsome.framework/Frameworks/Canvas.framework/Canvas: mmap() error 1 at address=0x011EF000, size=0x00014000 segment=__TEXT in Segment::map() mapping /private/var/mobile/Containers/Bundle/Application/EE6C9F39-32B7-4F37-A551-4CD879835ADE/frameworkTester.app/Frameworks/awsome.framework/Frameworks/Canvas.framework/Canvas
/private/var/mobile/Containers/Bundle/Application/EE6C9F39-32B7-4F37-A551-4CD879835ADE/frameworkTester.app/Frameworks/awsome.framework/Frameworks/Canvas.framework/Canvas: mmap() error 1 at address=0x0122B000, size=0x00014000 segment=__TEXT in Segment::map() mapping /private/var/mobile/Containers/Bundle/Application/EE6C9F39-32B7-4F37-A551-4CD879835ADE/frameworkTester.app/Frameworks/awsome.framework/Frameworks/Canvas.framework/Canvas
使用pod版本0.39.0.rc.1和swift xcode版本7.0.1(7A1001)
答案 0 :(得分:0)
确保将pods框架设置为必需而非可选。 在目标的常规选项卡中,有一个嵌入式二进制文件字段,请确保在那里添加框架。 如果采取了这些措施,请查看此链接Failure on device
解决方案3744