没有为iPhone5的架构找到合适的图像

时间:2015-08-03 23:23:51

标签: ios iphone swift cocoapods alamofire

我正在使用Xcode6.4和Cocoapods 0.38.2。 当我通过Cocoapods使用Alamofire时,会发生一些故障。

当我使用iPhone6(iOS8.4)时,一切都很好。我可以编译和使用Alamofire。 但是当我使用iPhone5(iOS8.4)时,即使我可以编译没有错误,我也会收到如下错误。

dyld: Library not loaded: @rpath/Alamofire.framework/Alamofire
  Referenced from: /private/var/mobile/Containers/Bundle/Application/AA92A24D-B208-46E8-8C08-1532116C9C64/knews.app/knews
  Reason: no suitable image found.  Did find:
    /private/var/mobile/Containers/Bundle/Application/AA92A24D-B208-46E8-8C08-1532116C9C64/knews.app/Frameworks/Alamofire.framework/Alamofire: mach-o, but wrong architecture
    /private/var/mobile/Containers/Bundle/Application/AA92A24D-B208-46E8-8C08-1532116C9C64/knews.app/Frameworks/Alamofire.framework/Alamofire: mach-o, but wrong architecture
    /private/var/mobile/Containers/Bundle/Application/AA92A24D-B208-46E8-8C08-1532116C9C64/knews.app/Frameworks/Alamofire.framework/Alamofire: mach-o, but wrong architecture

我不确切知道这个问题何时发生,但我可以在不久前使用cocoapods和Amamofire与iPhone5。

请帮忙。

实际上我甚至不知道我应该把这些信息放在这里。

谢谢,

2 个答案:

答案 0 :(得分:1)

I created new Xcode project and copied all files. ( and made configuration files same as old one as much as possible)

And I can compile and run my app both on iPhone6 and iPhone5.

So I don't know the reason. But now my problem is solved.

答案 1 :(得分:0)

如上所述here,我嵌入了Cocoapods生成的所有框架,我终于可以在iPhone5上运行我的应用程序了。

但是当我尝试上传二进制文件以提交给Apple时,我需要64位二进制文​​件而无法上传我的二进制文件。