cocoapods

Cocoapods公有库与私有库

﹥>﹥吖頭↗ 提交于 2019-12-02 02:57:14
####为什么要使用Cocoapods来管理第三方库呢? 传统使用第三方库的劣势 使用一个第三方SDK,需要在工程里面添加一堆配置,少添加一步配置就会报一大堆错误。这个时候为了排查少了哪一个步骤,只能从头开始重做一遍,太浪费时间和精力。有些配置还不好配置,就更使人烦躁郁闷了。 如果使用的第三方SDK有比较重要的更新,想使用最新的SDK只能到官方下载最新的SDK,重新导入到自己的项目工程中。 如果公司有多个项目,每一个工程都这样配置一遍,这是多么痛苦的领悟呀。 使用Cocoapods管理第三方库的优势 我们看下使用Cocoapods是如何管理一个第三方库的?在Podfile里面写入这些内容: platform :ios, '8.0' use_frameworks! target 'MyApp' do pod 'AFNetworking' pod 'ORStackView' pod 'SwiftyJSON' end‘ 上面做完之后,只需要在命令终端敲入以下命令即可完成安装: $ pod install 是不是很简单,只需要敲入pod install命令,就能完成各种繁琐的配置,如果第三方库有更新,只需要敲入以下命令即可完成更新: $ pod update --no-repo-update #--no-repo-update忽略本地repo更新,这个会在下面做解释的。

Manifest.lock gives warning about Podfile.lock, what caused?

 ̄綄美尐妖づ 提交于 2019-12-02 02:39:46
1 - I have tried update cocoapods and re-install pod for my project many times. But Manifest.lock still looks like having a problem. My app works well. Can It be affect something later? How Can I solve it? 2 - In addition Pods_Projectname.framework has red title in Xcode navigator. I continue developing my app but these things worried me, I don't know what happened. I couldn't find solution. Still continue problem, In addition looks below problems: Build Phases - Embed Pods Frameworks: "${SRCROOT}/Pods/Target Support Files/Pods-ProjectName/Pods-ProjectName-frameworks.sh" Build Phases - Copy

GooglePlus with CocoaPods linking error

末鹿安然 提交于 2019-12-02 02:32:50
问题 I added to my pod file pod 'google-plus-ios-sdk', '1.4.1' I did a pod update I imported #import <GooglePlus/GooglePlus.h> But if i try to [GPPSignIn sharedInstance].clientID = kClientID; I get this error from linker: Undefined symbols for architecture i386: "_OBJC_CLASS_$_GPPSignIn", referenced from: objc-class-ref in SDSocialManager.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation) 回答1: In my experience linker

CocoaPods libraries errors building for some iOS simulators

妖精的绣舞 提交于 2019-12-02 02:14:07
问题 Short error: file was built for archive which is not the architecture being linked (i386) Expanded: For some simulators, I receive these errors when building my project: ld: warning: ignoring file /Users/admin/Library/Developer/Xcode/DerivedData/myApp-ekwldvjyuxwkykbareyvvydbtero/Build/Products/Debug-iphonesimulator/libFSCalendar.a, file was built for archive which is not the architecture being linked (i386): /Users/admin/Library/Developer/Xcode/DerivedData/myApp-ekwldvjyuxwkykbareyvvydbtero

Adding/Edit a pod file after initial init “firebase”

妖精的绣舞 提交于 2019-12-02 01:50:47
问题 So when I installed the pod file into my project I forgot to add in FirebaseDatabase and now I want to add it in how do I do that? Will going through the pod init process again mess things up? Photo Of My Pod File: 回答1: You Should just add the new pod you want, and run: pod install And it would work, and won`t mess up you code. Iy will Update (If necessary) Older Pods, and Install New Ones. You should not Run pod init, just pod install. 来源: https://stackoverflow.com/questions/41960382/adding

Xcode 10 GM multiple command produce… Pods issues

冷暖自知 提交于 2019-12-02 01:33:34
Just switched to xcode 10 Golden Master and start getting the error with one of my pods, FDTake . Tried this thread but I don't have a plist in my build phases, so it didn't work. Is this issue pod related? Showing All Messages :-1: Multiple commands produce '***/Xcode/DerivedData/app-fgyqhwrvkbjquheilgwhyjltujtz/Build/Products/Dev-iphonesimulator/FDTake/FDTake.framework/Info.plist': 1) Target 'FDTake' (project 'Pods') has copy command from '***/GoogleDrive/dev/_ios/Work/sutulp/Pods/FDTake/Source/Info.plist' to '***Xcode/DerivedData/app-fgyqhwrvkbjquheilgwhyjltujtz/Build/Products/Dev

Adding/Edit a pod file after initial init “firebase”

蹲街弑〆低调 提交于 2019-12-02 00:25:20
So when I installed the pod file into my project I forgot to add in FirebaseDatabase and now I want to add it in how do I do that? Will going through the pod init process again mess things up? Photo Of My Pod File: You Should just add the new pod you want, and run: pod install And it would work, and won`t mess up you code. Iy will Update (If necessary) Older Pods, and Install New Ones. You should not Run pod init, just pod install. 来源: https://stackoverflow.com/questions/41960382/adding-edit-a-pod-file-after-initial-init-firebase

Kiwi and CocoaPods with a static shared library

 ̄綄美尐妖づ 提交于 2019-12-01 23:15:57
问题 I have a workspace with 3 projects: MyApp Common Pods Common is a common library that MyApp depends on. I'd like to setup CocoaPods and Kiwi to work correctly in this project. How do I go about this? I found https://stackoverflow.com/a/16472563/62, but when I try to follow this approach, I get an error when building MyApp before I even try adding Kiwi: ld: library not found for -lPods Here's the repo on GitHub: https://github.com/lyahdav/cocoapods_kiwi_shared_library My Podfile is: workspace

Google SignIn without CocoaPods

允我心安 提交于 2019-12-01 22:48:20
I am trying to integrate the GoogleSign-In for iOS with the documentation found here: https://developers.google.com/identity/sign-in/ios/start-integrating How can I do this without using Cocoapods? I've tried using the libraries and headers that Cocoapods download directly, but this led to many issues. Has anyone successfully converted a Cocoapod into a standalone library/framework? The standalone SDK is available here now: https://developers.google.com/identity/sign-in/ios/sdk/ As mentioned by other posters, you must add the following dependent frameworks: AddressBook.framework StoreKit

Kiwi and CocoaPods with a static shared library

陌路散爱 提交于 2019-12-01 21:52:23
I have a workspace with 3 projects: MyApp Common Pods Common is a common library that MyApp depends on. I'd like to setup CocoaPods and Kiwi to work correctly in this project. How do I go about this? I found https://stackoverflow.com/a/16472563/62 , but when I try to follow this approach, I get an error when building MyApp before I even try adding Kiwi: ld: library not found for -lPods Here's the repo on GitHub: https://github.com/lyahdav/cocoapods_kiwi_shared_library My Podfile is: workspace 'MyApp.xcworkspace' platform :ios, '7.0' target 'Common' do xcodeproj 'Common/Common.xcodeproj' pod