1. Background requirements
At present, ios development and test releases are all released to a third-party platform (Dandelion). This platform is more convenient to upload ipa and generate a QR code and link. Scan the code or visit the url to download and install. It is extremely convenient to realize one-click build and release to Dandelion.
2. Automated construction environment
jenkins (mac version)+SVN+xcode+ third-party platform Dandelion
3. Automate the build process
The construction of jenkins and general plug-in configuration will not be described in detail here, but the construction operations and post-build operations are mainly recorded.
1. Build operation
Here I use the Xcode command line to compile and build.
The explanation for the four commands here is as follows
a. Project configuration file, used to set the configuration of the test sit environment
cp -r sit/HttpUrls.h horeniTransfer/HttpUrls.h
b. Engineering clean
xcodebuild clean
d. output ipa
xcodebuild -exportArchive -exportOptionsPlist horenproject/info.plist -archivePath build/horenCoRtp.xcarchive -exportPath build/
After success, the ipa package we need will be generated in the build directory of the current project
2. Post-build operations
Automatically update to Dandelion (jenkins is required to install the upload to pgyer plugin)
For the parameter description of the dandelion plugin, please refer to: https://www.pgyer.com/doc/view/jenkins_plugin
At this point, one-click update code packaging signature ipa and upload Dandelion are implemented.
Problems encountered:
At the beginning, I used the xcode plugin of jenkins for configuration, but I kept reporting an error that the pp configuration file did not match the certificate and finally gave up. It was much simpler to use the command line to compile.
But still encountered some problems, reset the xcode tool command in our application used by the xcodebuild command
The terminal command line is as follows:
cd /usr/bin/
rm -rf /usr/bin/xcodebuild
ln -s /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild xcodebuild