Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
iOS-AutoPackage
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
app
iOS-AutoPackage
Commits
5d680a9f
Commit
5d680a9f
authored
Jan 23, 2019
by
段志勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update README.md
parent
41f86748
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
1 deletions
+52
-1
README.md
+52
-1
No files found.
README.md
View file @
5d680a9f
iOS-Auto-Package
[
iOS 项目 自动打包+上传蒲公英+推送到钉钉群
]
## 一、打包要求
1.
自动打包;
2.
打出的
`ipa`
包上传到蒲公英;
3.
上传成功后,通知到钉钉开发群;
### 依赖:
1.
`fastlane`
的
`gym`
模块 (用于打包 ipa 文件);
2.
`fastlane`
的
`sign`
模块 (非必须);
3.
蒲公英和钉钉提供的
`webhook`
;
4.
`PlistBuddy`
解析
`plist`
文件(Mac 系统自带);
脚本都比较简单,没有使用
`fastlane`
的全套解决方案,只用了
`gym`
模块。好处是,开箱即用,不用了解过多的
`fastlane`
各种配置和用法。
推送到钉钉群用 curl 命令拼接
`json param`
时一直有问题,就改用
`python`
写了。
## 二、使用说明:
使用此脚本的的话,需要修改以下地方:
1.
`ios_package.sh`
文件中的
`IOS_SCHEME`
对应项目的
`YourProjiec.xcworkspace`
的
`YourProjiec`
2.
`ios_package.sh`
文件中的
`PGY_API_KEY`
对应
`蒲公英 API KEY`
3.
`ios_package.sh`
文件中的
`PGY_USER_KEY`
对应
`蒲公英 API KEY`
4.
`ios_package.sh`
文件中的
`DD_HOST_URL`
对应
`https://oapi.dingtalk.com/robot/send?access_token=ABCD`
的
`ABCD`
5.
`ios_package.sh`
文件中的
`DD_ICON_URL`
对应
`https://appicon.pgyer.com/image/view/app_icons/abcd/120Y`
的
`abcd/120Y`
6.
`ios_package.sh`
文件中的
`DD_DOWN_URL`
对应
`http://www.pgyer.com/abcd`
的
`abcd`
7.
sh
[
path/to/file
]
/ios_package.sh PRD yes
8.
参数1:PRD 对应工程的环境文件
9.
参数2:yes 代表使用钉钉通知
10.
参数2:no 不使用钉钉通知
## 三、Tips:
1.
打包依赖
`fastlane、gym`
安装:
```
shell
# fastlane 安装:
sudo
gem install fastlane
--verbose
xcode-select
--install
gem cleanup
# gym 安装:
sudo
gem install gym
xcode-select
--install
```
2.
使用
`fastlane`
全套完成以上需求的话,可以参考:
[
@czj_warrior
](
https://www.jianshu.com/p/d247d40e56fc
)
的
[
使用 fastlane 实现自动化打包
](
https://mp.weixin.qq.com/s/ByFxXKvsyS1fajES9SLInA
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment