美文网首页
IOS自动打包ipa发布到蒲公英中

IOS自动打包ipa发布到蒲公英中

作者: LeeDev | 来源:发表于2017-08-09 20:14 被阅读94次

发布到蒲公英

进入=>github下载链接

通过python 打包到蒲公英中

进入AutoPageDemo 里面有两个文件 。
1.autoUpToPGYBuild.py:python 可执行代码
2.exportOptions.plist:编译的包是ad-hoc 还是 app-store,打包到蒲公英中是用adhoc

autoUpToPGYBuild.py 里面
需要改的字段有:TARGETVERSIONBUILDPLIST_PATHUSER_KEYAPI_KEY

3.执行
如果是workspace 就执行 ./autoUpToPGYBuild.py -w AutoPageDemo.xcworkspace
如果是project 就执行 ./autoUpToPGYBuild.py -p youproject.xcodeproj

4.其他
获取蒲公英的APIKey 和 UserKey

获取APIKey和UserKey.png
打包ipa:    
exportCmd = "xcodebuild -exportArchive -archivePath %s -exportPath %s -exportOptionsPlist %s" %(ARCHIVEPATH, EXPORT_MAIN_DIRECTORY, EXPORT_OPTIONS_PLIST)
process = subprocess.Popen(exportCmd, shell=True)   
 (stdoutdata, stderrdata) = process.communicate()

打包SDK
xcodebuild -target "${FMNAME}" ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphoneos BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build
xcodebuild -target "${FMNAME}" ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphonesimulator BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build


jenkins:

https://www.pgyer.com/doc/view/jenkins_ios

python

http://www.devashen.com/blog/2017/02/22/autobuild/
这个会报错

1.错误:File "./autobuild.py", line 9, in <module>
    import requests
ImportError: No module named requests

通过命令去解决 sudo easy_install -U requests

相关文章

网友评论

      本文标题:IOS自动打包ipa发布到蒲公英中

      本文链接:https://www.haomeiwen.com/subject/vfgqrxtx.html