cocoapods

CocoaPods的安装和使用

点点圈 提交于 2020-01-12 19:56:47
转自阿福的博客,地址:http://blog.csdn.net/lizhongfu2013/article/details/26384029 一、概要 iOS开发时,项目中会引用许多第三方库,CocoaPods( https://github.com/CocoaPods/CocoaPods )可以用来方便的统一管理这些第三方库。 二、安装 由于网上的教程基本都大同小异,但细节之处还不是很完善,所以借机会在这里补充下: 注:要使用CocoaPods,那就要下载安装它,而下载安装CocoaPods需要Ruby环境 1、Ruby环境搭建 当前安装环境为Mac mini 10.8.5。Mac OS本身自带Ruby,但还是更新一下保险,因为我第一次安装在没有更新Ruby的情况下就失败了。 a 查看下当前ruby版本:打开终端输入 ruby -v(确实安装了,不过用这个版本接下来工作失败了,所以更新下ruby) [objc] view plain copy print ? ritekiMac-mini:PodTest lucky$ ruby -v ruby 1 .8 .7 ( 2 0 1 2- 0 2- 0 8 patchlevel 3 5 8) [universal-darwin 1 2 .0] ritekiMac-mini:PodTest lucky$ b 更新ruby 终端输入如下命令

iOS开发~CocoaPods使用详细说明

两盒软妹~` 提交于 2020-01-12 09:17:05
一、概要 iOS开发时,项目中会引用许多第三方库,CocoaPods( https://github.com/CocoaPods/CocoaPods )可以用来方便的统一管理这些第三方库。 二、安装 由于网上的教程基本都大同小异,但细节之处还不是很完善,所以借机会在这里补充下: 注:要使用CocoaPods,那就要下载安装它,而下载安装CocoaPods需要Ruby环境 1、Ruby环境搭建 当前安装环境为Mac mini 10.8.5。Mac OS本身自带Ruby,但还是更新一下保险,因为我第一次安装在没有更新Ruby的情况下就失败了。 a 查看下当前ruby版本:打开终端输入 ruby -v(确实安装了,不过用这个版本接下来工作失败了,所以更新下ruby) ritekiMac-mini:PodTest lucky$ ruby -v ruby 1 .8 .7 ( 2 0 1 2- 0 2- 0 8 patchlevel 3 5 8) [universal-darwin 1 2 .0] ritekiMac-mini:PodTest lucky$ b 更新ruby 终端输入如下命令(把Ruby镜像指向taobao,避免被墙,你懂得) gem sources --remove https://rubygems.org/ gem sources -a https://ruby

Access Resources in pod

眉间皱痕 提交于 2020-01-11 18:48:06
问题 I would like to include image assets in a cocoapod library, but I'm having trouble accessing them. I've read these resources for help: Cocoapods Resources Cocoapods Resource Bundles Mokacoding Resource Bundles David Potter Resource Bundles However, none point me in the direction of accessing the resources. I've tried the following: [UIImage imageWithData:[NSData dataWithContentsOfURL:[(NSBundle *)[NSBundle bundleWithIdentifier:@"Assets"] URLForResource:@"my-image@2x" withExtension:@"png"]]]

Cocoapods - Flurry & TestFlight - Undefined symbols for architecture

倖福魔咒の 提交于 2020-01-11 17:40:21
问题 I'm upgrading my project to use Cocoapods and when I try building my project for an iOS device or for a simulator I get: Undefined symbols for architecture armv7: "_OBJC_CLASS_$_TestFlight", referenced from: objc-class-ref in PhotoPreviewViewController.o "_OBJC_CLASS_$_Flurry", referenced from: objc-class-ref in MyAppDelegate.o objc-class-ref in InitialSetupViewController.o objc-class-ref in InitialDownloadViewController.o objc-class-ref in HistoryViewController.o ld: symbol(s) not found for

No Such Module “Sinch” Xcode 9.1 Swift 4

*爱你&永不变心* 提交于 2020-01-11 12:01:26
问题 This question may be duplicate of this "Sinch Integration in swift project" But i am doing all these steps But getting same error " No such module 'Sinch'. Below steps i have followed please check and let me know if i missed any steps or need to add?? I have Added this in my podfile: pod 'SinchRTC' Pod installed successfully with no warning: Added this in Bridge-Header file: #import<Sinch/Sinch.h> Note: Update pod more then 10 times and restarted xcode multiple times. 回答1: I have done same

No Such Module “Sinch” Xcode 9.1 Swift 4

橙三吉。 提交于 2020-01-11 12:01:13
问题 This question may be duplicate of this "Sinch Integration in swift project" But i am doing all these steps But getting same error " No such module 'Sinch'. Below steps i have followed please check and let me know if i missed any steps or need to add?? I have Added this in my podfile: pod 'SinchRTC' Pod installed successfully with no warning: Added this in Bridge-Header file: #import<Sinch/Sinch.h> Note: Update pod more then 10 times and restarted xcode multiple times. 回答1: I have done same

GoogleMapsUtils Framework wrapped in Cocoapods Build error on Xcode

痴心易碎 提交于 2020-01-11 06:52:08
问题 I'm trying to develop a Cocoapods library that wraps the Google Maps Utils for iOS in a Objective C Projects. I succeded building and passing the lint and link validation, but when I execute the project in a Xcode I get bulding error. 'GoogleMaps/GMSAddress.h' file not found I imported the Google Maps manualy and trying to use this pod: https://github.com/googlemaps/google-maps-ios-utils Here is podspec file Pod::Spec.new do |s| s.name = 'Core' s.version = '0.1.0' s.summary = 'Core. Core for

Cocoapods : Library Not found

戏子无情 提交于 2020-01-11 05:45:29
问题 I am trying to run a Cocoapods project and getting the following error I tried to pod deintegrate and then pod install but it's still there. I also tried removing the pod.debug.xcconfig file from Project->Info->Configuration and then pod install but nothing. pod.debug.xcconfig generated by pod install contain path like ${PODS_ROOT}/Headers/Public/AttributedMarkdown but I can't find 'Headers/Public' in Project Navigator 回答1: First line of defense : (Quit Xcode first, which is part of the

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

非 Y 不嫁゛ 提交于 2020-01-11 00:53:27
一、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安装与使用

本秂侑毒 提交于 2020-01-10 16:25:09
來源: https://www.jianshu.com/p/a3b803457b08 CocoaPods的简介 CocoaPods是一个管理Swift和Objective-C的Cocoa项目的依赖工具。它包含了github上所有的第三方库,我们使用它来管理我们项目依赖的第三方库,可以节省设置和更新第三方开源库的时间。 安装CocoaPods 因为我只用过Mac版本,这里只介绍Mac版本的安装步骤: 1.安装ruby Mac上面本来就自带了ruby,因此我们跳过这个步骤。 2.安装cocoapods 由于天朝网络的原因,我们无法使用它自带的官方源(服务器毕竟在国外),这就要求我们替换掉它,首先移除官方源 $ gem sources --remove https://rubygems.org/ 添加上我们国内的源,这里通常有两个选择一个是 https://ruby.taobao.org/ 一个是 https://gems.ruby-china.org ( 注意:不要写错任何地方,最好粘贴复制,后面是否有斜线,是否是https等问题 )这里我们以后者为例,在终端输入 $ gem source -a https://gems.ruby-china.org 执行完毕后我们输入命令看下是否替换成功 $ gem source 如果终端输出如下,则代表成功替换掉了(当然如果使用的是 https:/