Integration error with Cocoapods and XCode5

与世无争的帅哥 提交于 2019-12-03 10:43:00

问题


When building my project in the new XCode5, I receive the following warning: Pods-App was rejected as an implicit dependency for 'libPods-App.a' because its architectures 'i386' didn't contain all required architectures 'x86_64'.


回答1:


To fix that, select the Pods project in the left menu, then under the targets section select the Pods-#YourAppName# target and in the build settings click on the Architectures and press delete so it goes to the default option (Standard architectures (armv7, armv7s). More information can be found in this link.




回答2:


Non of the other answers worked for me.

What eventually solved it for me is to make sure Build Active Architecture Only is set to Yes for Debug and No for Release in my app's xcodeproj file.

Also, because I have custom configurations, I had to add the following to the Podfile:

xcodeproj 'MyApp.xcodeproj', 'MyDebugConfiguration' => :debug, 'MyReleaseConfiguration' => :release



回答3:


Take a look at the blog post here, it will do the work.

To make your Applications compatible for iPhone 5s and older models (till iPhone 3Gs running iOS6), select the following option for your architectures – “Standard Architectures – armv7, armv7s”. Do not select the option that says “Standard Architectures (including 64 bit)…”. Since the Arm instruction sets are backward compatible, any application compiled for armv7s will also run on the iPhone 5s or the iPhone 5c.

ARCHS = armv7 armv7s

For valid architectures in the build settings, you can specify arm64, armv7, armv7s.

VALID_ARCHS = armv6 armv7 armv7s arm64




回答4:


env:

  • CocoaPods v0.24.0
  • Xcode 5 from App Store

Add the following at the end of your Podfile.

post_install do |installer|
  installer.project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['ARCHS'] = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"
    end
  end
end



回答5:


Go to Project "pods", set "build active architecture only" to NO for debug.

Above solution is working for me.




回答6:


I have just upgraded one of my projects to Xcode 6 and experienced this problem. To fix it, I changed the Base SDK of the Pods project to a real one (previously it was like unknown SDK).




回答7:


I had this same issue. The warning suggested that the pod library was not included and as a result, the app failed to finish compiling. (It complained about a missing header file that was part of a Pod dependency).

If you are experiencing the same compilation issue, you might be able to resolve it with the following:

  1. Select Pods project in the workspace
  2. Select Pods project to access Pods project-wide settings
  3. Go to Build Settings
  4. Search for 'Build Active Architecture Only'
  5. Set to 'NO'

This seemed to work for me, but YMMV.



来源:https://stackoverflow.com/questions/18881986/integration-error-with-cocoapods-and-xcode5

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!