CocoaPods
是Swift
和Objective-C
Cocoa
项目的依赖管理器。类似 PHP
的 composer
, Java
的 Maven
$ brew install cocoapods
或者
$ sudo gem install cocoapods
https://mirrors.tuna.tsinghua.edu.cn/help/CocoaPods/
cd ~/.cocoapods/repos
#可能不需要移除
pod repo remove master
#很慢,最终master目录3.2G
pod repo add master https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git
在项目根目录创建文件Podfile
,类似
vi Podfile
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
target 'ui-tableView' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for ui-tableView
pod "Masonry"
pod "MJExtension"
end
target '2ui-tableViewDelegate' do
use_frameworks!
pod "MJExtension"
end
然后执行pod install
,不出意外会创建一个项目名.xcworkspace
文件,用Xcode
打开即可
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有