appstarter-pod-ios
示例
要运行示例项目,请克隆仓库,然后首先从Example目录中运行pod install
。
要求
安装
appstarter-pod-ios可以通过CocoaPods获取。要安装它,只需将以下行添加到Podfile中
pod 'appstarter-pod-ios'
使用appstarter-pod-ios设置新项目
- 在Xcode中创建一个新项目
- 按照上述描述设置cocoapods并安装appstarter-pod-ios
- 从
/appstarter-pod-ios/appstarter-pod-ios/Resources/Bundler
复制Gemfile
。这包括cocopods
和fastlane
钻石,并允许使用bundler
。使用以下命令:cp Pods/appstarter-pod-ios/appstarter-pod-ios/Resources/Bundler/Gemfile Gemfile
- 运行
bundle install
从 gem 文件安装依赖项 - 设置 fastlane
- 将
Fastfile
从/appstarter-pod-ios/appstarter-pod-ios/Resources/Fastlane
复制到项目的fastlane
目录 - 运行
bundle exec fastlane copyResources
复制其他所需资源 - 打开
/Fastlane/.env.default
(在上一步中已复制),并编辑应用于本项目的变量 - 将 SwiftLint 构建阶段添加到项目中
- Sourcery 设置
- 编辑
.sourcery.yml
以设置当前项目 - 编辑
SourceryTemplates/Test/LocalImports.stencil
以设置当前项目 - 将 Sourcery 构建阶段添加到项目中
- 设置自动版本。请按照以下步骤进行:[链接](https://developer.apple.com/library/content/qa/qa1827/_index.html)
- 设置证书和配置文件
- 确保源代码库无错误
- 编辑
Fastfile
并关闭:certificates
通道中的readonly
标志(请参阅文件中的注释以了解要注释的行) - 运行
bundle exec fastlane certificates
- 重置对 fastlane 脚本所做的更改
- 运行
bundle exec fastlane printVariables
并检查 Xcode 项目以确保设置正确
更新到 appstarter-pod-ios 最新版本
- 更新 pod:
bundle exec pod update appstarter-pod-ios
- 确保所有内容都已提交到源代码库(或将状态存档)
- 通过运行
bundle exec fastlane copyResources
更新脚本的最新版本 - 检查源代码库中的更改。某些文件,如
.env.default
将覆盖本地版本,因此您需要重置不需要的文件(或单个行)。
作者
gllittler, [email protected]
许可
appstarter-pod-ios 受 MIT 许可证的许可。有关更多信息,请参阅 LICENSE 文件。