CocoaPods Error with undefined symbols for architecture armv7

升级Mac os x 10.10+xcode6.1之后,运行工程出现如下问题:

undefined symbols for architecture armv7 referenced from

参考如下:

http://blog.sina.com.cn/s/blog_5920503a0100zbda.html

发现出现问题的类在cocoapods中,关键之前用cocoapods的第三方类从未出现问题。

唯一问题产生原因:与升级有关。

解决:即使知道原因问题也是很难解决的,因为cocoapods新版本的问题网上搜到的结果参考如下:

http://stackoverflow.com/questions/24018355/cocoapods-with-xcode-6-and-10-10-yosemite


Follow these steps:

1- Open Xcode 6, open Preferences, click the Locations tab, change the Command Line Tools version to Xcode 6.0

2- sudo gem uninstall cocoapods

3- sudo gem uninstall xcodeproj

4- ruby -e "$(curl -fsSLhttps://raw.githubusercontent.com/Homebrew/install/master/install)"

5- curl -Lhttps://get.rvm.io| bash -s stable --ruby

6- source /Users/your_user_name/.rvm/scripts/rvm

7- rvm reload

8- rvm rubygems latest --force

9- gem install xcodeproj

10- gem install cocoapods

8- pod --version


显然跟我问题有出入。只能打开原工程比较 ,发现新版本(pod --version  0.35.0)没有自动添加静态裤的引用。所以需要手动在Build Phrase 页的Link Binary with Libraries 项中添加相应的.a  文件。


------------------------------

续上篇,后来引入新库的时候,又发生同样问题。

仔细研究其实跟pod install的CocoaPods did not set the base configuration of your project because your project already has a custom config set. 提示有关,参考下列链接调整Target的相应pod的config,问题解决。 

参考如下:

https://github.com/CocoaPods/CocoaPods/issues/2633

https://github.com/CocoaPods/CocoaPods/issues/2752

http://stackoverflow.com/questions/26287103/cocoapods-warning

你可能感兴趣的:(CocoaPods Error with undefined symbols for architecture armv7)