cocoapods

CocoaPods的使用,和git配合使用的一些注意点。

99封情书 提交于 2019-12-03 19:35:08
CocoaPods 打场子 要先装 Ruby ,然后在终端里 sudo gem install cocoapods ,安装 cocoapods 。如果半天没反应,应该是被墙了,需要: $ gem sources --remove https://rubygems.org/ // 等有反应之后再敲入以下命令 $ gem sources -a http://ruby.taobao.org/ 为了验证你的 Ruby 镜像是并且仅是 taobao ,可以用以下命令查看: $ gem sources -l 只有在终端中出现下面文字才表明你上面的命令是成功的: *** CURRENT SOURCES *** http://ruby.taobao.org/ 这时候,你再次在终端中运行: $ sudo gem install cocoapods 等上十几秒钟, CocoaPods 就可以在你本地下载并且安装好了,不再需要其他设置。 使用 每个项目只需要一个 Podfile 文件,只能是这个文件名,不能有后缀。在终端 cd 到项目所在的目录,利用 vim 创建 Podfile : vim Podifle 然后再 Podfile 文件中输入以下文字(这只是一个例子,取决于项目需要) platform :ios, '7.0' pod "AFNetworking", '~> 2.0' pod

CocoaPods with XCode 6.0.1 - How can I fix Pods Frameworks appearing in red?

£可爱£侵袭症+ 提交于 2019-12-03 19:11:34
问题 I have created a new project in Xcode 6.0.1 and created the following Podfile: source 'https://github.com/CocoaPods/Specs' platform :ios, '8.0' pod 'AFNetworking', '~> 2.0' I then ran pod install , and opened the xcworkspace in Xcode. When I build the project, all the frameworks appear in red. For example, under the Pods project, the Foundation.framework appears in red, and refers to a path on my computer that doesn't exist: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS

ERROR: Error installing cocoapods: ERROR: Failed to build gem native extension

旧城冷巷雨未停 提交于 2019-12-03 19:03:32
问题 I am trying to install cocoapods to my macbook pro running with OSX 10.9.1 (new mavericks) and after type gem install cocoapods I get the following error: Building native extensions. This could take a while... ERROR: Error installing cocoapods: ERROR: Failed to build gem native extension. "/usr/local/rvm/rubies/ruby-1.9.3-p194/bin/ruby" -rubygems /usr/local/rvm/gems/ruby-1.9.3-p194/gems/rake-10.1.1/bin/rake RUBYARCHDIR=/Users/rangreenberg/gems/gems/xcodeproj-0.14.1/ext RUBYLIBDIR=/Users

Duplicate Module Name: react-native

不想你离开。 提交于 2019-12-03 18:59:40
问题 I ran Pod Update in my XCode Project and now my project isn't compiling due to duplicate modules being downloaded. Anyone know any solutions? Looking for JS files in /Users/.../App/Finalv2 Metro Bundler ready. Loading dependency graph...jest-haste-map: @providesModule naming collision: Duplicate module name: react-native Paths: /Users/.../App/Finalv2/node_modules/react-native/package.json collides with /Users/.../App/Finalv2/ios/Pods/React/package.json This warning is caused by a

【CocoaPods】CocoaPods安装

a 夏天 提交于 2019-12-03 18:30:16
一、配置ruby 如果ruby版本过低,则可能导致cocoapods 安装失败! A、 查看ruby 版本,在终端输入: $ ruby -v B、通过rvm更新ruby: rvm (Ruby Version Manager,Ruby版本管理器),包括Ruby的版本管理和Gem库管理(gemset) 1、安装ruby,耐心等待一段时间 $ curl -L https://get.rvm.io | bash -s stable 2、查看rvm版本 $ rvm -v 3、查看ruby版本列表 $ rvm list known 4、安装ruby,比如我选最新版2.3.0 $ rvm install 2.3.0 安装完成后查看ruby版本即可。 C、替换ruby源 由于默认的源地址无法访问cocoapods,我们需要用(注意是 https 哦)"https://gems.ruby-china.org/" 来替换默认的源地址。 替换步骤: 1、先删除默认源,终端输入如下命令: $ gem sources --remove https://rubygems.org/ 2、增加要替换的源: $ gem sources -a https://gems.ruby-china.org/ 3、验证是否添加成功: $ gem sources -l 输出结果如下,有且只有https://gems.ruby

Pod Install in Xcode Bots Trigger

僤鯓⒐⒋嵵緔 提交于 2019-12-03 17:02:56
I started the pre integration trigger with the following cd "${XCS_PRIMARY_REPO_DIR}" pwd pod install --verbose And it gave me pod: command not found Simple right? Can't find the pod binary so, I'll just point it over to the path. Easy. cd "${XCS_PRIMARY_REPO_DIR}" pwd /usr/local/bin/pod install --verbose Which gives me the following env: ruby_executable_hooks: No such file or directory This makes me think ruby isn't set up right to run for the triggers. Now understand a simple "pod install" in the terminal of the build server fixes all this and runs fine and dandy. The project definitely

iOS 最新版的 CocoaPods 安装流程

倾然丶 夕夏残阳落幕 提交于 2019-12-03 16:39:26
首先打开终端:(Launchpad-其他-终端)在终端中输入如下指令: 1.移除现有Ruby默认源 $gem sources --remove https://rubygems.org/ 2.使用新的源 $gem sources -a https://ruby.taobao.org/ 3.验证新源是否替换成功 $gem sources -l 4.更新gem $sudo gem update --system 5.安装CocoaPods (1) $sudo gem install cocoapods 备注:如果苹果系统升级OS X EL Capitan 版本后改为 $sudo gem install -n /usr/local/bin (2) $pod setup 提示:如果终端一直停留在 Setting up CocoaPods master repo 这个状态,是因为要进行下载安装,而且目录比较大,需要耐心等待一下。 6. 新建工程,并在终端用cd指令到文件夹内( 具体操作:终端输入cd+空格+工程文件夹直接拖拽到终端+回车 ) $pod search 第三方名字 例如:pod search 'AFNetworking' (退出搜索按 :wq ) 7.新建文件 vim “Podfile”, vim Podfile 写入以下内容并保存 提示:(终端vim文件 按 i 可编辑

The `master` repo requires CocoaPods 0.18.1 -

可紊 提交于 2019-12-03 16:25:18
问题 I am getting: [!] The `master` repo requires CocoaPods 0.18.1 - Update Cocoapods, or checkout the appropriate tag in the repo. How to checkout cocoapods? 回答1: To update CocoaPods you can run: $ [sudo] gem update cocoapods If you would like to try a pre-release version of CocoaPods you can run: $ [sudo] gem update cocoapods --pre from here 回答2: I had a similar problem and upgrading to cocoapods 0.18.1 is not an option for me (at the moment). In my case I wanted to stick with cocoapods 0.16.4.

Use AdobeMobileLibrary (for iOS) with cocoapods?

夙愿已清 提交于 2019-12-03 16:16:11
We are going to use Omniture-Tracking for iOS, which is part of AdobeMobileLibrary. AdobeAdobeMobileLibrary is not available via cocoapods-repo (only an older version of Omniture), but as a static-library, that you can download from the Adobe Website. I wonder if it is possible to maintain this static-library with cocoapods? I've created a podspec-file: Pod::Spec.new do |s| s.name = 'AdobeMobileLibrary' s.version = '4.0.2' s.license = 'Commercial' s.summary = 'Adobe Omniture SiteCatalyst analytics library for iOS.' s.homepage = 'https://developer.omniture.com/en_US/content_page/mobile/c

<PBXResourcesBuildPhase UUID=..> attempted to initialize an object with an unknown UUID

↘锁芯ラ 提交于 2019-12-03 15:48:42
问题 I have taken SVN check-in for a project. Thereafter I have installed pod via terminal . After installation of pod there are few warning stating <PBXResourcesBuildPhase UUID=...> attempted to initialise an object with an unknown UUID. What might be reason? Is this warning critical ? 回答1: The reason that happened in my case was some developer updated a pod A while I installed a new pod B (without updated pod A). So when I merged his codes I got the warning. An easy way to fix this is to 1.