简体   繁体   中英

No suitable image found for iPhone5's architecture

I'm using Xcode6.4 and Cocoapods 0.38.2. When I use Alamofire through Cocoapods, some strage error happens.

When I use iPhone6(iOS8.4), everything is fine. I can compile and use Alamofire. But when I use iPhone5(iOS8.4), even if I can compile without errors, I get errors like below.

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

I don't know exactly when this problem happens, but I could use cocoapods and Amamofire with iPhone5 a while ago.

Please help.

Actually I even don't know what kind of information I should put here.

Thanks,

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.

As mentioned here , I Embedded all frameworks generated by Cocoapods, and I finally could run my app on iPhone5.

But when I tried to upload binary to submit to Apple, I was required 64bit binary and I could not upload my binary.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM