问题描述:近期使用CocoaPods,无论是执行pod install还是pod update都卡在Analyzing dependencies不动了。
问题解决:问题可能是主干网络出口问题。
带--no-repo-update参数,不更新repo仓库。命令如下:
pod install --verbose --no-repo-update
pod update --verbose --no-repo-update
问题描述:近期使用CocoaPods,无论是执行pod install还是pod update都卡在Analyzing dependencies不动了。
问题解决:问题可能是主干网络出口问题。
带--no-repo-update参数,不更新repo仓库。命令如下:
pod install --verbose --no-repo-update
pod update --verbose --no-repo-update
问题描述:用“pod update”更新,遇到如下错误
Pull is not possible because you have unmerged files.
Please, fix them up in the work tree, and then use 'git add/rm <file>'
as appropriate to mark resolution, or use 'git commit -a'.
问题解决:
A bug was found in libgit2 and they had to execute a force push on the specs repo. This is what broke everyone's CocoaPods setup.
You can find the official post about this issue on the CocoaPods blog :http://blog.cocoapods.org/Repairing-Our-Broken-Specs-Repository/
The recommended way to fix your setup is to execute the following commands :
$ pod repo remove master
$ pod setup
If that doesn't work, you can also delete manually all your cached specs :
$ rm -rf ~/.cocoapods/
$ pod setup
问题描述:使用CocoaPods加了TestFlight类库:pod 'TestFlightSDK', '~> 2.0.2'
报如下错误:"_OBJC_CLASS_$_TestFlight", referenced from:
问题解决:先是觉得会不会和Crashlytics冲突,结果Google了很多,试了很多,最后试了如下方子成功!
In the Build Settings, do not override "Other Linker Flags". If it is bold, select it press backspace, it should be back to its normal state. If it is not fixed, delete all flags, remove and reinstall Pods and that should fix it.
可能是Other Linker Flags自定义的时候CocoaPods就不更新的关系。
问题描述:转用CocoaPods作为第三方类库管理加载后,测试提示找不到某类库的.h文件。
问题解决:Project->[Project Name]->Configurations->LogicTests->"None" to "Pods"
问题描述:想更新CocoaPods,在终端运行sudo gem update cocoapods,出现如下错误:
Updating cocoapods
Building native extensions. This could take a while...
ERROR: Error installing cocoapods:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h
Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/xcodeproj-0.13.1 for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/xcodeproj-0.13.1/ext/xcodeproj/gem_make.out
问题解决:Go to Xcode, Preferences -> Downloads,download Command Line Tools.
问题描述:想重装CocoaPods,在终端运行gem install cocoapods命令,出现如下错误:
ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions into the /Library/Ruby/Gems/1.8 directory.
问题分析:可能是没有权限
问题解决:sudo gem install cocoapods
问题描述:今天做TAG的时候,加入Parse并加好相应的frame,还是报如下错误:
Undefined symbols for architecture i386:
"_FBTokenInformationExpirationDateKey", referenced from:
-[PFFacebookTokenCachingStrategy cacheTokenInformation:] in Parse(PFFacebookTokenCachingStrategy.o)
-[PFFacebookTokenCachingStrategy expirationDate] in Parse(PFFacebookTokenCachingStrategy.o)
-[PFFacebookTokenCachingStrategy setExpirationDate:] in Parse(PFFacebookTokenCachingStrategy.o)
"_FBTokenInformationTokenKey", referenced from:
-[PFFacebookTokenCachingStrategy accessToken] in Parse(PFFacebookTokenCachingStrategy.o)
-[PFFacebookTokenCachingStrategy setAccessToken:] in Parse(PFFacebookTokenCachingStrategy.o)
"_FBTokenInformationUserFBIDKey", referenced from:
-[PFFacebookTokenCachingStrategy facebookId] in Parse(PFFacebookTokenCachingStrategy.o)
-[PFFacebookTokenCachingStrategy setFacebookId:] in Parse(PFFacebookTokenCachingStrategy.o)
"_OBJC_CLASS_$_FBAppCall", referenced from:
objc-class-ref in Parse(PFFacebookAuthenticationProvider.o)
"_OBJC_CLASS_$_FBRequest", referenced from:
objc-class-ref in Parse(PFFacebookAuthenticationProvider.o)
"_OBJC_CLASS_$_FBSession", referenced from:
objc-class-ref in Parse(PFFacebookAuthenticationProvider.o)
"_OBJC_CLASS_$_FBSessionTokenCachingStrategy", referenced from:
_OBJC_CLASS_$_PFFacebookTokenCachingStrategy in Parse(PFFacebookTokenCachingStrategy.o)
"_OBJC_METACLASS_$_FBSessionTokenCachingStrategy", referenced from:
_OBJC_METACLASS_$_PFFacebookTokenCachingStrategy in Parse(PFFacebookTokenCachingStrategy.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
问题解决:
方法一:加入FaceBookSDK.framework(>1M)
方法二:设置单独的静态库,使用-force_load /path/libname.a来替换之前的配置-all_load _ObjC
方法三:使用CocoaPods安装Parse
我选择了第三种方法,还是CocoaPods好啊