通过CocoaPods安装
初始化
进入工程更目录执行命令,生产Podfile文件
pod init
打开Podfile 文件
vim Podfile
编辑
# Uncomment the next line to define a global platform for your project # platform :ios,'9.0' target 'Aider' do # Comment the next line if you're not using Swift and don't want to use dynamic frameworks use_frameworks! pod 'SnapKit','~> 3.0' #增加此行 # Pods for Aider end
运行CocoaPods install 命令
leishendeMBP:Aider leishen$ pod install Analyzing dependencies Downloading dependencies Installing SnapKit (3.2.0) Generating Pods project Integrating client project [!] Please close any current Xcode sessions and use `Aider.xcworkspace` for this project from Now on. Sending stats Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed. [!] Automatically assigning platform ios with version 10.3 on target Aider because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/Syntax/podfile.html#platform`.
到此,不出意外的话,你已经将SnapKit集成到你的项目中了。
重新打开项目
项目名称.xcworkspace
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。