cocoapods

Mac下安装CoCoaPods及使用CoCoaPods管理第3方库

我的未来我决定 提交于 2020-01-05 17:37:40
一、CoCoaPods安装步骤 由于CoCoaPods服务器在国外,速度比较慢,所以使用淘宝的镜像,内容是一样的 1.终端中添加淘宝源地址 sudo gem sources - a https : //ruby.taobao.org/ 2.删除国外地址 sudo gem sources - r https : //rubygems.org/ 3.安装CoCoaPods,安装过程需要一段时间,请等待,出现gem installed就成功了 sudo gem install cocoapods 4.启动CoCoaPods pod setup 二、 CoCoaPods管理第3方库 1.在终端切换Xcode工程目录,需要提前创建工程 2.在工作目录执行命令,创建Podfile文件 pod init 3.搜索第三方库名字,复制出现的类似于pod 'AFNetworking'的命令 pod search 'xxx' 3.打开并修改Podfile文件,打开注释,在target和end之间添加需要安装框架 //最低支持版本 platform :ios, '8.0' //swift项目才需要打开的注释 #use_frameworks! pod 'AFNetworking' pod 'SVProgressHUD' pod 'SDWebImage’ pod ‘Masonry’ 4.安装 pod

Cocoapods claims to install but does not work

与世无争的帅哥 提交于 2020-01-05 09:10:01
问题 I ran the install of cocoapods by using sudo gem install cocoapods . The command claims to have completed successfully. However when I do gem list cocoapods it doesn’t show in list. And when I do pod --version I get an error: /Users/myname/.rvm/rubies/ruby-2.3.0/lib/ruby/site_ruby/2.3.0/rubygems.rb:271:in `find_spec_for_exe': can't find gem cocoapods (>= 0.a) (Gem::GemNotFoundException) from /Users/myname/.rvm/rubies/ruby-2.3.0/lib/ruby/site_ruby/2.3.0/rubygems.rb:299:in `activate_bin_path'

Using private pod and public pod in the same project

孤街醉人 提交于 2020-01-05 08:17:36
问题 I've just pushed a private pod to my.domain.com:apps/MyPrivatePod.git . I'd like to use both this private pod and other public pods in my project platform :ios, '8.0' target 'Testing' do pod 'AFNetworking', '2.6.0 ' // This is supposed to be a public Pod pod 'MyPrivatePod', '~> 1.1' // This is the private pod I talked about end How can I achieve this? 回答1: Assume you have built the private pod refer to the official docs and push it to your private spec index repo, for example, https:/

Using private pod and public pod in the same project

蓝咒 提交于 2020-01-05 08:17:31
问题 I've just pushed a private pod to my.domain.com:apps/MyPrivatePod.git . I'd like to use both this private pod and other public pods in my project platform :ios, '8.0' target 'Testing' do pod 'AFNetworking', '2.6.0 ' // This is supposed to be a public Pod pod 'MyPrivatePod', '~> 1.1' // This is the private pod I talked about end How can I achieve this? 回答1: Assume you have built the private pod refer to the official docs and push it to your private spec index repo, for example, https:/

CocoaPods project depend on a local static C library

僤鯓⒐⒋嵵緔 提交于 2020-01-05 06:23:05
问题 I have locally built C library ( .h and .a files) that I want to include in a Swift-based CocoaPods pod. How do I configure the podspec to depend on the .a files and the module.map ? With a normal non-CocoaPods Xcode project, I simply drag in the directory that contains include and lib and then add a module.map . With CocoaPods I can't do this because pod install will overwrite the Xcode project file. s.library won't work because the the static library isn't hosted anywhere. I tried s

Undefined symbols for architecture x86_64 : referenced from: _YGConfigNew in libyoga.a(Yoga.o)

∥☆過路亽.° 提交于 2020-01-05 05:00:09
问题 Xcode Version - 10.0 React-Native - 0.57.8 Undefined symbols for architecture x86_64: "YGConfig::YGConfig(int ( )(YGConfig , YGNode*, YGLogLevel, char const*, __va_list_tag*))", referenced from: _YGConfigNew in libyoga.a(Yoga.o) Please help Thanks. 来源: https://stackoverflow.com/questions/54320321/undefined-symbols-for-architecture-x86-64-referenced-from-ygconfignew-in-lib

Creating a pod with cocoapods fails

一个人想着一个人 提交于 2020-01-05 04:17:11
问题 I've just tried to create a pod using pod lib create Test and went with all the defaults. However, when it is done asking me questions I get: Running pod install on your new library. [!] No `Podfile' found in the project directory. Ace! you're ready to go! We will start you off by opening your project in Xcode open 'Test/Example/Test' The file /Users/macattack/Documents/Xcode/Test/Example/Test.xcworkspace does not exist. I don't understand what I've done wrong. I'm using XCode 8, cocoapods 1

Swift iOS don't recognize GCM library imports?

时光总嘲笑我的痴心妄想 提交于 2020-01-04 18:14:46
问题 I downloaded GCM sdk through cocoapods successfully and everything is fine. But Swift don't recognize GCM library imports this image in Xcode: and this Podfile : how to fix this problem. thanks. 回答1: Updated: I recommend Stefan Scoarta's answer to add use_frameworks! to your podfile if you're targeting iOS 8 or higher and can use frameworks. Original answer: Make sure that you've configured a bridging header as described in Apple's Using Swift with Cocoa and Objective-C document. To import a

CocoaPods and Realm in Swift

荒凉一梦 提交于 2020-01-04 02:41:06
问题 Using Xcode-6.3.1, iOS-8.3 and MacOS-10.10.3, I am trying to use RealmSwift (0.92.3) and CocoaPods 0.37.1 I use the following procedure : install cocoapods (in terminal): $ sudo gem install cocoapods Create new Xcode project (named MyApp) Create Podfile platform :ios, '8.3' use_frameworks! target 'MyApp' do pod 'RealmSwift', '>= 0.92.3' end target 'MyAppTests' do pod 'RealmSwift', '>= 0.92.3' end Place the Podfile in the MyApp folder (next to MyApp.xcodeproj) Download the newest Realm (0.92.3

Getting error while installing realm through cocoapods

孤人 提交于 2020-01-03 21:03:03
问题 I am getting this strange error while installing realm on xcode 8 , cocoa pods version cocoapods-1.2.0 The error is - Installing Realm (2.4.3) [!] /bin/bash -c set -e sh build.sh cocoapods-setup ./scripts/swift-version.sh: line 59: [: =: unary operator expected No version of Xcode found that supports Swift 3.0.2 All other pods work great. Thanks for the help in advance. 回答1: Hey for anyone looking for an answer - I did find out that I had the second xcode installed (xcode 7), due to which the