cocoapods

How do I create a CocoaPods podspec that has a dependency that exists outside of Specs?

谁都会走 提交于 2019-11-27 18:57:16
I have a public fork of a library that already exists in CocoaPods/Specs. In a Podfile, I can reference this forked pod by doing this: pod 'CoolLibrary', :git => 'git@github.com:myname/CoolLibrary-Forked.git', :commit => 'abcdef1234567890abcdef1234567890' I tried putting this in my MyLibrary.podspec : s.dependency 'CoolLibrary', :git => 'git@github.com:myname/CoolLibrary-Forked.git', :commit => 'abcdef1234567890abcdef1234567890' But get the following error message: -> MyLibrary.podspec - ERROR | The specification defined in `MyLibrary.podspec` could not be loaded. [!] Invalid `MyLibrary

App Icon missing iOS 11

回眸只為那壹抹淺笑 提交于 2019-11-27 18:46:32
问题 After updating to Xcode 9 (9A235), app icon was missing after running on iOS 11. It was working fine in previous version. This issue is caused by CocoaPods. I have tried this solution but this is giving me error. An error occurred while processing the post-install hook of the Podfile. 回答1: Try adding this script in your podfile. post_install do |installer| installer.aggregate_targets.each do |target| copy_pods_resources_path = "Pods/Target Support Files/#{target.name}/#{target.name}-resources

Using two versions of a Cocoapod dependency

好久不见. 提交于 2019-11-27 18:07:56
问题 So I'm trying to get with the times and use some of the new features offered in AFNetworking 2.0. However, I am also using RestKit 0.20 which has AFNetworking 1.3 as a dependency? Am I allowed to incorporate AFNetworking 1.3 and 2.0 into my Xcode project or can I only pick one? Is there a CocoaPod trick for this? https://github.com/AFNetworking/AFNetworking https://github.com/RestKit/RestKit 回答1: CocoaPods does not (currently) do dependency resolution with multiple versions of the same

Cocoapods - Unable to find a Specification for [Github framework]

十年热恋 提交于 2019-11-27 17:48:38
问题 When trying to pod install a new Podfile into an existing Xcode (iOS) project, I get the following error message from Terminal: [!] Unable to find a specification for 'XCDYouTubeKit (~> 2.1.1)' . The Podfile that I was trying to load looks like this: # Uncomment this line to define a global platform for your project # platform :ios, '6.0' target 'DemoApp' do pod 'XCDYouTubeKit', '~> 2.1.1' end target 'DemoAppTests' do end target 'TheDayByDay' do end Additionally, the file structure for my

Can I use CocoaPods when creating a Cocoa Touch Framework?

坚强是说给别人听的谎言 提交于 2019-11-27 17:41:55
I'm creating a new Cocoa Touch Framework (MyFramework.framework), which will have a dependency on Alamofire. This framework will be written in Swift. As a test I started a new Cocoa Touch Framework project: File > New > Project > Framework & Library > Cocoa Touch Framework Then, in the terminal I performed: pod init under this projects directory. In the newly created Podfile I added the following: source 'https://github.com/CocoaPods/Specs.git' # Uncomment this line to define a global platform for your project platform :ios, '8.0' # Uncomment this line if you're using Swift use_frameworks! pod

CocoaPods - pod setup Failed: /usr/bin/git checkout master

此生再无相见时 提交于 2019-11-27 17:25:46
问题 After I run $sudo gem install cocoapods and then $pod setup , there is an error. Please help me to fix it. [!] Pod::Executable pull Updating eaf98af..ba3c030 error: Your local changes to the following files would be overwritten by merge: Google-Maps-iOS-SDK/1.3.0/Google-Maps-iOS-SDK.podspec Please, commit your changes or stash them before you can merge. Aborting 回答1: Looks like you have an edited spec that's messing with the git repo. The easiest way to fix this would be to delete the local

CocoaPods 安装和使用教程

最后都变了- 提交于 2019-11-27 17:18:47
用淘宝镜像像下载安装: $ gem sources --remove https://rubygems.org/ //等有反应之后再敲入以下命令 $ gem sources -a https://ruby.taobao.org/ 为了验证你的Ruby镜像是并且仅是taobao,可以用以下命令查看: $ gem sources -l 最后在终端中运行: $ sudo gem install cocoapods 场景1:利用CocoaPods,在项目中导入AFNetworking类库 AFNetworking类库在GitHub地址是: https://github.com/AFNetworking/AFNetworking 为了确定AFNetworking是否支持CocoaPods,可以用CocoaPods的搜索功能验证一下。在终端中输入: $ pod search AFNetworking 在终端中进入(cd命令)你项目所在目录,然后在当前目录下,利用vim创建Podfile,运行: $ vim Podfile 然后在Podfile文件中输入以下文字: platform :ios, '7.0' pod "AFNetworking", "~> 2.0" 然后保存退出。vim环境下,保存退出命令是: :wq 这时候,你就可以利用CocoPods下载AFNetworking类库了

cocoaPods pod install Permission denied

為{幸葍}努か 提交于 2019-11-27 17:17:27
This is the short version: When I run pod install in an Xcode project I get [!] Pod::Executable pull error: cannot open .git/FETCH_HEAD: Permission denied If I run sudo pod install I get no error, but my files installed are owned by root and can't compile and I have to chown those files to a normal user to use the Xcode compiler. I am running Lion OSX. I installed cocoaPods using sudo gem install cocoaPods I had to use sudo because without it I got ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions into the /Library/Ruby/Gems/1.8 directory. so now I have

podfile gives an error on install

孤街浪徒 提交于 2019-11-27 17:07:40
I cloned a repo from git. Then removed the .git and .gitignore. The podFile looks like platform :ios, '6.1' pod 'AFNetworking', '~>1.3.3' pod 'AFOAuth1Client' After "pod install" I get the following errors: $ pod install Analyzing dependencies [!] Pod::Executable pull A ALPValidator/0.0.1/ALPValidator.podspec A APAsyncDictionary/0.0.3/APAsyncDictionary.podspec A ASCScreenBrightnessDetector/0.1.0/ASCScreenBrightnessDetector.podspec A AdBrixSDK/3.0.8/AdBrixSDK.podspec A AlertShortkut/1.0/AlertShortkut.podspec A AppStoreOpener/0.0.1/AppStoreOpener.podspec A Appboy-iOS-SDK/2.3.1/Appboy-iOS-SDK

How to integrate Cocoapods with a Swift project?

青春壹個敷衍的年華 提交于 2019-11-27 16:54:27
As Apple introduced Swift , their new programming language, I wonder how you can integrate it with existing Objective-C libraries that are available via CocoaPods ? Cocoapods 0.36 and above introduces the use_frameworks! instruction which implies that the bridging header is not required for importing Objective-C pods in Swift. Please find below a full example using MBProgressHUD and Alamofire : 1. Podfile source 'https://github.com/CocoaPods/Specs.git' platform :ios, '8.3' use_frameworks! pod 'Alamofire', '>= 1.2.2' # Swift pod pod 'MBProgressHUD', '>= 0.9.1' # Objective-C pod 2. Deletion