cocoapods

iOS-CocoaPods的安装与使用

拟墨画扇 提交于 2020-03-21 03:21:19
一、CocoaPods的安装    1、简介: CocoaPods是一个用来帮助我们管理第三方依赖库的工具。 在开发iOS应用时,会经常使用第三方类库,比如SDWebImage、AFNetworking等等,手动的下载与添加类库非常麻烦,通过CocoaPods可以便捷的下载与管理第三方类库。 使用CocoaPods的目的是让我们能自动化的、集中的、直观的管理第三方开源库。 官方链接:https://cocoapods.org    2、安装步骤 第一步:打开终端,查看自己电脑的ruby环境:gem sources -l。如果环境是
*** CURRENT SOURCES *** https://ruby.taobao.org/,则跳到第四步。如果环境是
*** CURRENT SOURCES ***https://rubygems.org/,则需要移除环境(CocoaPods是用Ruby实现的,要想使用它首先需要有Ruby的环境,OS X系统默认支持Ruby运行,但是Ruby的默认源使用的是rubygems.org,国内访问这个网址时,如果无法翻墙,则不能下载,解决方案是将其替换成可用的Ruby,比如淘宝。)。 第二步:移除环境:gem sources —remove https://rubygems.org/。结果:
https://rubygems.org/ removed

How to fix cocoapod .modulemap file not found

拜拜、爱过 提交于 2020-03-20 12:35:34
问题 When I try to build my project, I get a compile time error saying that a "Module map file" for my pod cannot be found and that I am missing a "SwiftShimes" module. This is weird because all my modulemap files are where they should be when I install my pods. I am using Xcode 10.2 and Cocoapods 1.6.1. I have tried the following -> deintegrating cocoapods from my project cleaning the project deleted ModuleCache and DerivedData restarting my computer This is the type of error I am getting ->

gem native extension error while installing cocoapods

送分小仙女□ 提交于 2020-03-20 06:20:57
问题 Am trying to reinstall cocoapods in my MacBook air after changing my SSD, now am getting this bellow error. sudo gem install cocoapods Building native extensions. This could take a while... ERROR: Error installing cocoapods: ERROR: Failed to build gem native extension. current directory: /Library/Ruby/Gems/2.3.0/gems/ffi-1.12.2/ext/ffi_c /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20200308-27204-6l0a5q.rb extconf.rb mkmf.rb can't find header files for ruby

gem native extension error while installing cocoapods

白昼怎懂夜的黑 提交于 2020-03-20 06:17:36
问题 Am trying to reinstall cocoapods in my MacBook air after changing my SSD, now am getting this bellow error. sudo gem install cocoapods Building native extensions. This could take a while... ERROR: Error installing cocoapods: ERROR: Failed to build gem native extension. current directory: /Library/Ruby/Gems/2.3.0/gems/ffi-1.12.2/ext/ffi_c /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20200308-27204-6l0a5q.rb extconf.rb mkmf.rb can't find header files for ruby

gem native extension error while installing cocoapods

我的梦境 提交于 2020-03-20 06:17:04
问题 Am trying to reinstall cocoapods in my MacBook air after changing my SSD, now am getting this bellow error. sudo gem install cocoapods Building native extensions. This could take a while... ERROR: Error installing cocoapods: ERROR: Failed to build gem native extension. current directory: /Library/Ruby/Gems/2.3.0/gems/ffi-1.12.2/ext/ffi_c /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20200308-27204-6l0a5q.rb extconf.rb mkmf.rb can't find header files for ruby

Use resource bundles in CocoaPods

我们两清 提交于 2020-03-19 19:36:36
问题 I am making a pod (MySDK) and would like to load the assets from the separate resource bundles CocoaPods generates. However, I can not get it to work. Here is how I tried to load the storyboard: let storyBoard = UIStoryboard(name: "SDK", bundle: Bundle(identifier:"org.cocoapods.SchedJoulesSDK")) This gives the error: 'Could not find a storyboard named 'SDK' in bundle The bundle is added in Xcode: And my podspec looks like this: s.resource_bundles = { 'MySDK' => ['SDK/*/*.{xib,storyboard

iOS补位动画、沙漏效果、移动UITableViewCell、模拟贪吃蛇、拖拽进度等源码

a 夏天 提交于 2020-03-19 13:42:43
3 月,跳不动了?>>> iOS精选源码 JHAlertView - 一款黑白配色的HUD之沙漏效果 继承UIButton的自定义按钮SPButton 用递归算法实现iOS补位动画 iOS 长按移动UITableViewCell JHLikeButton - 有趣的点赞动画 兼容Xcode10移除了libstdc++后程序无法运行的方案 贪吃蛇简单实现修正版 一个简单的alertView JHSlider - 动态展示当前进度 iOS优质博客 iOS Memory Deep Dive 前言仅以此文解答自己大学以来多年对内存管理的疑惑。经典操作系统的虚拟内存为什么要有虚拟内存?随着计算机的发展,我们的计算机处理的任务也变得越来越繁多,但是对于某台固定的计算机,CPU 和 Memory 都是固定的,如果有些直接使用物理内存地址的话会带来很多问题, 首先编译器不能以一种抽象的角度来描绘内存,在执行的过程中... 阅读原文 iOS 开发创建CocoaPods公有库以及subspec分支功能 一、主要内容1.1、阐述用CocoaPods使用框架的过程图1.2、开发框架项目的创建1.3、创建框架描述 spec1.4、上传 spec 到gitHub的远程索引库1.5、查看自己在CocoaPods的注册信息1.7、使用自己的框架二

一步步创建自己的 iOS 框架

*爱你&永不变心* 提交于 2020-03-19 13:37:25
3 月,跳不动了?>>> 创建你的第一个iOS框架 如果你曾经试图去创建一个自己的iOS框架的话,你应该知道这件事并不是那些畏惧困难的人能够成功完成的-毕竟管理依赖和编写测试并不容易。这篇文章将从开始到最终完成一步步的进行讲解,以便你掌握后可以更好的创建自己的框架。 在教程中我们会构建一个框架,框架里面会暴露一个名为 RGBUIColor(red:green:blue) 的函数,该函数会返回使用这些参数创建的 UIColor 对象。我们会使用 Swift 语言,并且使用 Carthage 作为依赖项的管理工具。我们的框架将会支持通过 Carthage 、 CocoaPods 或者 git 来使用。 让我们开始吧! 创建Xcode工程 选择 File -> New -> Project 在左侧的选择 iOS -> Framework & Library ,右侧选择“Cocoa Touch Framework”。 点击“下一步”,并填写选项提示。确保以及勾选了“Include Unit Tests”。 选择工程保存的位置。 不要勾选“Create Git repository on My Mac”,我们在后面手动进行设置。 点击“创建”并且打开工程。 选择 File -> Save As Workspace 并使用工程相同的名字保存到相同的目录中。之所以创建 workspace

IOS-CocoaPods

戏子无情 提交于 2020-03-19 02:55:35
一、概要 iOS开发时,项目中会引用许多第三方库,CocoaPods(https://github.com/CocoaPods/CocoaPods) 可以用来方便的统一管理这些第三方库。 二、安装 由于网上的教程基本都大同小异,但细节之处还不是很完善,所以借机会在这里补充下: 注:要使用CocoaPods,那就要下载安装它,而下载安装CocoaPods需要Ruby环境 1、Ruby环境搭建 Mac OS本身自带Ruby,但还是更新一下保险. a查看下当前ruby版本:打开终端输入 ruby -v(确实安装了,不过用这个版本接下来工作失败了,所以更新下ruby) // ruby -v 终端显示结果 ruby 2.0.0p645 (2015-04-13 revision 50299) [universal.x86_64-darwin15] b更新ruby 终端输入如下命令(把Ruby镜像指向taobao,避免被墙,你懂得) gem sources --remove https://rubygems.org/ gem sources -a https://ruby.taobao.org/ gem sources -l (用来检查使用替换镜像位置成功) 2、下载安装CocoaPods 终端输入:sudo gem install cocoapods 最终出现: 8 gem installed

Cocospod 升级到指定版本

社会主义新天地 提交于 2020-03-18 10:26:59
某厂面试归来,发现自己落伍了!>>> ​ 1.检查当前安装版本列表. gem list --local | grep cocoapods 2.卸载不用版本. sudo gem uninstall cocoapods 1.5.3 3.安装指定版本. sudo gem install cocoapods -v 1.6.1 或 sudo gem install -n /usr/local/bin cocoapods -v 1.6.1 (如果上边不成功,可以试试这个) 来源: oschina 链接: https://my.oschina.net/wenchengxu123/blog/3197274