iOS-自动化编译打包ipa脚本
2017-12-18 00:00
555 查看
脚本代码
#!/bin/bash #自动化编译打包脚本基于Xcode7.2 #相关设置 # 1.PROJECT->Info->Configuations点击加号添加自己需要的环境名 # 2.PROJECT->Build Settings->Preprocessor Macros设置对应环境的键值为1 # Config表示服务器环境 Dubug:开发 Prm:预生产 Release:生产 # `pwd`表示当前路径 # Project_Name根据工程的名字作修改 # sdk的版本根据自己安装的xcode来定 PROJECT_NAME="MyAppName" #开发Debug模式 Developer_name="iPhone Developer: xxxxxxxxxx" Provision_profile="xxxx.mobileprovision" Config="Debug" Project_Name="MyProjectName" xcodebuild -sdk iphoneos9.2 -configuration ${Config} xcrun -sdk iphoneos9.2PackageApplication -v build/Debug-iphoneos/${Project_Name}.app -o`pwd`/${Project_Name}.ipa #发布Release模式 修改Config="Release" #Developer_name="iPhone Distribution: xxxxxxxxxx" #Provision_profile="xxxx.mobileprovision" xcodebuild -sdk iphoneos9.2 -configuration ${Config} #如果配置好了签名和证书,可以去掉 --sign 和 --embed 确保证书和描述文件有效一一对应 xcrun -sdk iphoneos9.2 PackageApplication -v build/Debug-iphoneos/${Project_Name}.app -o`pwd`/${Project_Name}.ipa --sign "${Developer_name}" --embed "${Provision_profile}"
配置不同环境的URL的宏定义
#if Debug == 1 #define SERVERURL @"develop" #else #define SERVERURL @"product" #endif
相关文章推荐
- 详解Shell脚本实现iOS自动化编译打包提交
- 用python编写ios工程自动编译、打包ipa等脚本
- 详解Shell脚本实现iOS自动化编译打包提交
- iOS自动化编译打包提交-Shell脚本实现
- iOS 之xcode报错指南/打包ipa /archive /CommandB编译错误/ 上传APPstore错误
- 用 shell 脚本快速打包 iOS ipa 文件
- iOS利用(Shell脚本)自动打包项目工程生成ipa
- 【iOS】Xcode9 自动化脚本打包
- [iOS 自动打包]shell脚本使用-ipa_build 脚本使用
- IOS自动化打包介绍及脚本
- Cocos2d-x3.0 iOS 一键编译多个target并打包ipa
- xcode 脚本编译,打包ipa
- IOS 如何打包XCODE编译后的APP成IPA格式
- iOS自动打包并发布IPA脚本
- iOS 多渠道打包 编译脚本
- iOS 自动化编译&打包
- 使用脚本一键打包iOS应用ipa和上传到ftp服务器
- Cocos2d-x3.0 iOS 一键编译多个target并打包ipa。
- HTML5游戏Android再次编译以及iOS编译和实现打包iPa笔录
- iOS开发-ipa打包终极教程-使用终端和shell脚本实现