先为工程初始化fastlane 配置:
1. fastlane init执行
[✔] 🚀
[✔] Looking for iOS and Android projects in current directory...
[09:27:48]: Detected an iOS/macOS project in the current directory: 'CIProjectTest.xcodeproj'
[09:27:48]: -----------------------------
[09:27:48]: --- Welcome to fastlane 🚀 ---
[09:27:48]: -----------------------------
[09:27:48]: fastlane can help you with all kinds of automation for your mobile app
[09:27:48]: We recommend automating one task first, and then gradually automating more over time
[09:27:48]: What would you like to use fastlane for?
1. 📸 Automate screenshots
2. 👩✈️ Automate beta distribution to TestFlight
3. 🚀 Automate App Store distribution
4. 🛠 Manual setup - manually setup your project to automate your tasks
? 2
[09:27:51]: -----------------------------------------------------------
[09:27:51]: --- Setting up fastlane for iOS TestFlight distribution ---
[09:27:51]: -----------------------------------------------------------
[09:27:51]: Parsing your local Xcode project to find the available schemes and the app identifier
[09:27:51]: $ xcodebuild -showBuildSettings -scheme CIProjectTest -project CIProjectTest.xcodeproj
[09:27:52]: $ cd /Users/hanxiaomaoaichiyu/Desktop/test/CIProjectTest && agvtool what-version -terse
[09:27:53]: --------------------------------
2. Fastfile配置(archive,export配置)
# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
# https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
# https://docs.fastlane.tools/plugins/available-plugins
#
# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane
default_platform(:ios)
platform :ios do
desc "Description of what the lane does"
lane :beta do
build_app(export_method: "development")
pgyer(api_key: "f85fddd8a03aa250e07193e4751d5e22", user_key: "67891edefb90ac5c45d222897726b741")
end
end
3. fastlane beta 执行:
[✔] 🚀
+-----------------------+---------+--------+
| Used plugins |
+-----------------------+---------+--------+
| Plugin | Version | Action |
+-----------------------+---------+--------+
| fastlane-plugin-pgyer | 0.2.1 | pgyer |
+-----------------------+---------+--------+
[11:05:17]: ------------------------------
[11:05:17]: --- Step: default_platform ---
[11:05:17]: ------------------------------
[11:05:17]: Driving the lane 'ios beta' 🚀
[11:05:17]: -----------------------
[11:05:17]: --- Step: build_app ---
[11:05:17]: -----------------------
[11:05:17]: $ xcodebuild -showBuildSettings -scheme CIProjectTest -project ./CIProjectTest.xcodeproj
+------------------------+--------------------------------------+
| Summary for gym 2.99.1 |
+------------------------+--------------------------------------+
| export_method | development |
| project | ./CIProjectTest.xcodeproj |
| scheme | CIProjectTest |
| destination | generic/platform=iOS |
| output_name | CIProjectTest |
| build_path | /Users/hanxiaomaoaichiyu/Library/De |
| | veloper/Xcode/Archives/2018-07-15 |
| clean | false |
| output_directory | . |
| silent | false |
| skip_package_ipa | false |
| result_bundle | false |
| buildlog_path | ~/Library/Logs/gym |
| skip_profile_detection | false |
| xcode_path | /Applications/Xcode.app |
+------------------------+--------------------------------------+
[11:05:20]: $ set -o pipefail && xcodebuild -scheme CIProjectTest -project ./CIProjectTest.xcodeproj -destination 'generic/platform=iOS' -archivePath /Users/hanxiaomaoaichiyu/Library/Developer/Xcode/Archives/2018-07-15/CIProjectTest\ 2018-07-15\ 11.05.20.xcarchive archive | tee /Users/hanxiaomaoaichiyu/Library/Logs/gym/CIProjectTest-CIProjectTest.log | xcpretty
[11:05:21]: ▸ --- xcodebuild: WARNING: Using the first of multiple matching destinations:
[11:05:21]: ▸ { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Generic iOS Device }
[11:05:21]: ▸ { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Generic iOS Device }
[11:05:21]: ▸ { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Generic iOS Device }
[11:05:21]: ▸ { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Generic iOS Device }
[11:05:21]: ▸ { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Generic iOS Device }
[11:05:21]: ▸ { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Generic iOS Device }
[11:05:21]: ▸ { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Generic iOS Device }
[11:05:21]: ▸ { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Generic iOS Device }
[11:05:21]: ▸ Building CIProjectTest/CIProjectTest [Release]
[11:05:21]: ▸ Check Dependencies
[11:05:21]: ▸ Compiling ViewController.m
[11:05:22]: ▸ Compiling AppDelegate.m
[11:05:22]: ▸ Compiling main.m
[11:05:22]: ▸ Linking CIProjectTest
[11:05:22]: ▸ Compiling LaunchScreen.storyboard
[11:05:25]: ▸ Compiling Main.storyboard
[11:05:25]: ▸ Processing Info.plist
[11:05:25]: ▸ Generating 'CIProjectTest.app.dSYM'
[11:05:26]: ▸ Touching CIProjectTest.app
[11:05:26]: ▸ Signing /Users/hanxiaomaoaichiyu/Library/Developer/Xcode/DerivedData/CIProjectTest-bmxqwunsksdkrbftscspxdbhkkth/Build/Intermediates.noindex/ArchiveIntermediates/CIProjectTest/InstallationBuildProductsLocation/Applications/CIProjectTest.app
[11:05:26]: ▸ Touching CIProjectTest.app.dSYM
[11:05:26]: ▸ Archive Succeeded
[11:05:26]: Generated plist file with the following values:
[11:05:26]: ▸ -----------------------------------------
[11:05:26]: ▸ {
[11:05:26]: ▸ "method": "development"
[11:05:26]: ▸ }
[11:05:26]: ▸ -----------------------------------------
[11:05:26]: $ /usr/bin/xcrun /Users/hanxiaomaoaichiyu/.rvm/gems/ruby-2.4.0/gems/fastlane-2.99.1/gym/lib/assets/wrap_xcodebuild/xcbuild-safe.sh -exportArchive -exportOptionsPlist '/var/folders/42/vxjhp2bj1c1c01xtrphffxgh0000gn/T/gym_config20180715-3258-dwsrs.plist' -archivePath /Users/hanxiaomaoaichiyu/Library/Developer/Xcode/Archives/2018-07-15/CIProjectTest\ 2018-07-15\ 11.05.20.xcarchive -exportPath '/var/folders/42/vxjhp2bj1c1c01xtrphffxgh0000gn/T/gym_output20180715-3258-1fsbron'
[11:05:29]: Mapping dSYM(s) using generated BCSymbolMaps
[11:05:29]: $ dsymutil --symbol-map /Users/hanxiaomaoaichiyu/Library/Developer/Xcode/Archives/2018-07-15/CIProjectTest\ 2018-07-15\ 11.05.20.xcarchive/BCSymbolMaps /Users/hanxiaomaoaichiyu/Library/Developer/Xcode/Archives/2018-07-15/CIProjectTest\ 2018-07-15\ 11.05.20.xcarchive/dSYMs/7153F36C-634D-31BF-BBAF-4FE0BA80C65A.dSYM
[11:05:30]: $ dsymutil --symbol-map /Users/hanxiaomaoaichiyu/Library/Developer/Xcode/Archives/2018-07-15/CIProjectTest\ 2018-07-15\ 11.05.20.xcarchive/BCSymbolMaps /Users/hanxiaomaoaichiyu/Library/Developer/Xcode/Archives/2018-07-15/CIProjectTest\ 2018-07-15\ 11.05.20.xcarchive/dSYMs/CIProjectTest.app.dSYM
warning: /Users/hanxiaomaoaichiyu/Library/Developer/Xcode/Archives/2018-07-15/CIProjectTest 2018-07-15 11.05.20.xcarchive/BCSymbolMaps/CIProjectTest-arm64.bcsymbolmap: No such file or directory. Not unobfuscating.
[11:05:30]: Compressing 2 dSYM(s)
[11:05:30]: $ cd '/Users/hanxiaomaoaichiyu/Library/Developer/Xcode/Archives/2018-07-15/CIProjectTest 2018-07-15 11.05.20.xcarchive/dSYMs' && zip -r '/Users/hanxiaomaoaichiyu/Desktop/test/CIProjectTest/CIProjectTest.app.dSYM.zip' *.dSYM
[11:05:30]: ▸ updating: 7153F36C-634D-31BF-BBAF-4FE0BA80C65A.dSYM/ (stored 0%)
[11:05:30]: ▸ updating: 7153F36C-634D-31BF-BBAF-4FE0BA80C65A.dSYM/Contents/ (stored 0%)
[11:05:30]: ▸ updating: 7153F36C-634D-31BF-BBAF-4FE0BA80C65A.dSYM/Contents/Info.plist (deflated 52%)
[11:05:30]: ▸ updating: 7153F36C-634D-31BF-BBAF-4FE0BA80C65A.dSYM/Contents/Resources/ (stored 0%)
[11:05:30]: ▸ updating: 7153F36C-634D-31BF-BBAF-4FE0BA80C65A.dSYM/Contents/Resources/7153F36C-634D-31BF-BBAF-4FE0BA80C65A.plist (deflated 21%)
[11:05:30]: ▸ updating: 7153F36C-634D-31BF-BBAF-4FE0BA80C65A.dSYM/Contents/Resources/DWARF/ (stored 0%)
[11:05:30]: ▸ updating: 7153F36C-634D-31BF-BBAF-4FE0BA80C65A.dSYM/Contents/Resources/DWARF/CIProjectTest (deflated 82%)
[11:05:30]: ▸ updating: CIProjectTest.app.dSYM/ (stored 0%)
[11:05:30]: ▸ updating: CIProjectTest.app.dSYM/Contents/ (stored 0%)
[11:05:30]: ▸ updating: CIProjectTest.app.dSYM/Contents/Info.plist (deflated 52%)
[11:05:30]: ▸ updating: CIProjectTest.app.dSYM/Contents/Resources/ (stored 0%)
[11:05:30]: ▸ updating: CIProjectTest.app.dSYM/Contents/Resources/DWARF/ (stored 0%)
[11:05:30]: ▸ updating: CIProjectTest.app.dSYM/Contents/Resources/DWARF/CIProjectTest (deflated 62%)
[11:05:30]: Successfully exported and compressed dSYM file
[11:05:30]: Successfully exported and signed the ipa file:
[11:05:30]: /Users/hanxiaomaoaichiyu/Desktop/test/CIProjectTest/CIProjectTest.ipa
[11:05:30]: -------------------
[11:05:30]: --- Step: pgyer ---
[11:05:30]: -------------------
[11:05:30]: The pgyer plugin is working.
[11:05:30]: build_file: /Users/hanxiaomaoaichiyu/Desktop/test/CIProjectTest/CIProjectTest.ipa
[11:05:30]: Start upload /Users/hanxiaomaoaichiyu/Desktop/test/CIProjectTest/CIProjectTest.ipa to pgyer...
[11:05:31]: Upload success. Visit this URL to see: https://www.pgyer.com/mXwT
+------+------------------+-------------+
| fastlane summary |
+------+------------------+-------------+
| Step | Action | Time (in s) |
+------+------------------+-------------+
| 1 | default_platform | 0 |
| 2 | build_app | 12 |
| 3 | pgyer | 1 |
+------+------------------+-------------+
[11:05:31]: fastlane.tools finished successfully 🎉
hanxiaomaoaichiyudeMacBook-Pro:CIProjectTest hanxiaomaoaichiyu$ fastlane beta
[✔] 🚀
+-----------------------+---------+--------+
| Used plugins |
+-----------------------+---------+--------+
| Plugin | Version | Action |
+-----------------------+---------+--------+
| fastlane-plugin-pgyer | 0.2.1 | pgyer |
+-----------------------+---------+--------+
[11:07:38]: ------------------------------
[11:07:38]: --- Step: default_platform ---
[11:07:38]: ------------------------------
[11:07:38]: Driving the lane 'ios beta' 🚀
[11:07:38]: -----------------------
[11:07:38]: --- Step: build_app ---
[11:07:38]: -----------------------
[11:07:38]: $ xcodebuild -showBuildSettings -scheme CIProjectTest -project ./CIProjectTest.xcodeproj
+------------------------+--------------------------------------+
| Summary for gym 2.99.1 |
+------------------------+--------------------------------------+
| export_method | development |
| project | ./CIProjectTest.xcodeproj |
| scheme | CIProjectTest |
| destination | generic/platform=iOS |
| output_name | CIProjectTest |
| build_path | /Users/hanxiaomaoaichiyu/Library/De |
| | veloper/Xcode/Archives/2018-07-15 |
| clean | false |
| output_directory | . |
| silent | false |
| skip_package_ipa | false |
| result_bundle | false |
| buildlog_path | ~/Library/Logs/gym |
| skip_profile_detection | false |
| xcode_path | /Applications/Xcode.app |
+------------------------+--------------------------------------+
[11:07:40]: $ set -o pipefail && xcodebuild -scheme CIProjectTest -project ./CIProjectTest.xcodeproj -destination 'generic/platform=iOS' -archivePath /Users/hanxiaomaoaichiyu/Library/Developer/Xcode/Archives/2018-07-15/CIProjectTest\ 2018-07-15\ 11.07.40.xcarchive archive | tee /Users/hanxiaomaoaichiyu/Library/Logs/gym/CIProjectTest-CIProjectTest.log | xcpretty
[11:07:41]: ▸ --- xcodebuild: WARNING: Using the first of multiple matching destinations:
[11:07:41]: ▸ { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Generic iOS Device }
[11:07:41]: ▸ { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Generic iOS Device }
[11:07:41]: ▸ { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Generic iOS Device }
[11:07:41]: ▸ { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Generic iOS Device }
[11:07:41]: ▸ { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Generic iOS Device }
[11:07:41]: ▸ { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Generic iOS Device }
[11:07:41]: ▸ { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Generic iOS Device }
[11:07:41]: ▸ { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Generic iOS Device }
[11:07:41]: ▸ Building CIProjectTest/CIProjectTest [Release]
[11:07:41]: ▸ Check Dependencies
[11:07:41]: ▸ Compiling ViewController.m
[11:07:41]: ▸ Compiling main.m
[11:07:41]: ▸ Compiling AppDelegate.m
[11:07:41]: ▸ Linking CIProjectTest
[11:07:43]: ▸ Compiling Main.storyboard
[11:07:45]: ▸ Compiling LaunchScreen.storyboard
[11:07:45]: ▸ Processing Info.plist
[11:07:45]: ▸ Generating 'CIProjectTest.app.dSYM'
[11:07:45]: ▸ Touching CIProjectTest.app
[11:07:45]: ▸ Signing /Users/hanxiaomaoaichiyu/Library/Developer/Xcode/DerivedData/CIProjectTest-bmxqwunsksdkrbftscspxdbhkkth/Build/Intermediates.noindex/ArchiveIntermediates/CIProjectTest/InstallationBuildProductsLocation/Applications/CIProjectTest.app
[11:07:45]: ▸ Touching CIProjectTest.app.dSYM
[11:07:45]: ▸ Archive Succeeded
[11:07:45]: Generated plist file with the following values:
[11:07:45]: ▸ -----------------------------------------
[11:07:45]: ▸ {
[11:07:45]: ▸ "method": "development"
[11:07:45]: ▸ }
[11:07:45]: ▸ -----------------------------------------
[11:07:45]: $ /usr/bin/xcrun /Users/hanxiaomaoaichiyu/.rvm/gems/ruby-2.4.0/gems/fastlane-2.99.1/gym/lib/assets/wrap_xcodebuild/xcbuild-safe.sh -exportArchive -exportOptionsPlist '/var/folders/42/vxjhp2bj1c1c01xtrphffxgh0000gn/T/gym_config20180715-3542-z3tnp6.plist' -archivePath /Users/hanxiaomaoaichiyu/Library/Developer/Xcode/Archives/2018-07-15/CIProjectTest\ 2018-07-15\ 11.07.40.xcarchive -exportPath '/var/folders/42/vxjhp2bj1c1c01xtrphffxgh0000gn/T/gym_output20180715-3542-76qu3'
[11:07:49]: Mapping dSYM(s) using generated BCSymbolMaps
[11:07:49]: $ dsymutil --symbol-map /Users/hanxiaomaoaichiyu/Library/Developer/Xcode/Archives/2018-07-15/CIProjectTest\ 2018-07-15\ 11.07.40.xcarchive/BCSymbolMaps /Users/hanxiaomaoaichiyu/Library/Developer/Xcode/Archives/2018-07-15/CIProjectTest\ 2018-07-15\ 11.07.40.xcarchive/dSYMs/7153F36C-634D-31BF-BBAF-4FE0BA80C65A.dSYM
[11:07:49]: $ dsymutil --symbol-map /Users/hanxiaomaoaichiyu/Library/Developer/Xcode/Archives/2018-07-15/CIProjectTest\ 2018-07-15\ 11.07.40.xcarchive/BCSymbolMaps /Users/hanxiaomaoaichiyu/Library/Developer/Xcode/Archives/2018-07-15/CIProjectTest\ 2018-07-15\ 11.07.40.xcarchive/dSYMs/CIProjectTest.app.dSYM
warning: /Users/hanxiaomaoaichiyu/Library/Developer/Xcode/Archives/2018-07-15/CIProjectTest 2018-07-15 11.07.40.xcarchive/BCSymbolMaps/CIProjectTest-arm64.bcsymbolmap: No such file or directory. Not unobfuscating.
[11:07:49]: Compressing 2 dSYM(s)
[11:07:49]: $ cd '/Users/hanxiaomaoaichiyu/Library/Developer/Xcode/Archives/2018-07-15/CIProjectTest 2018-07-15 11.07.40.xcarchive/dSYMs' && zip -r '/Users/hanxiaomaoaichiyu/Desktop/test/CIProjectTest/CIProjectTest.app.dSYM.zip' *.dSYM
[11:07:49]: ▸ updating: 7153F36C-634D-31BF-BBAF-4FE0BA80C65A.dSYM/ (stored 0%)
[11:07:49]: ▸ updating: 7153F36C-634D-31BF-BBAF-4FE0BA80C65A.dSYM/Contents/ (stored 0%)
[11:07:49]: ▸ updating: 7153F36C-634D-31BF-BBAF-4FE0BA80C65A.dSYM/Contents/Info.plist (deflated 52%)
[11:07:49]: ▸ updating: 7153F36C-634D-31BF-BBAF-4FE0BA80C65A.dSYM/Contents/Resources/ (stored 0%)
[11:07:49]: ▸ updating: 7153F36C-634D-31BF-BBAF-4FE0BA80C65A.dSYM/Contents/Resources/7153F36C-634D-31BF-BBAF-4FE0BA80C65A.plist (deflated 21%)
[11:07:49]: ▸ updating: 7153F36C-634D-31BF-BBAF-4FE0BA80C65A.dSYM/Contents/Resources/DWARF/ (stored 0%)
[11:07:49]: ▸ updating: 7153F36C-634D-31BF-BBAF-4FE0BA80C65A.dSYM/Contents/Resources/DWARF/CIProjectTest (deflated 82%)
[11:07:49]: ▸ updating: CIProjectTest.app.dSYM/ (stored 0%)
[11:07:49]: ▸ updating: CIProjectTest.app.dSYM/Contents/ (stored 0%)
[11:07:49]: ▸ updating: CIProjectTest.app.dSYM/Contents/Info.plist (deflated 52%)
[11:07:49]: ▸ updating: CIProjectTest.app.dSYM/Contents/Resources/ (stored 0%)
[11:07:49]: ▸ updating: CIProjectTest.app.dSYM/Contents/Resources/DWARF/ (stored 0%)
[11:07:49]: ▸ updating: CIProjectTest.app.dSYM/Contents/Resources/DWARF/CIProjectTest (deflated 62%)
[11:07:49]: Successfully exported and compressed dSYM file
[11:07:49]: Successfully exported and signed the ipa file:
[11:07:49]: /Users/hanxiaomaoaichiyu/Desktop/test/CIProjectTest/CIProjectTest.ipa
[11:07:49]: -------------------
[11:07:49]: --- Step: pgyer ---
[11:07:49]: -------------------
[11:07:49]: The pgyer plugin is working.
[11:07:49]: build_file: /Users/hanxiaomaoaichiyu/Desktop/test/CIProjectTest/CIProjectTest.ipa
[11:07:49]: Start upload /Users/hanxiaomaoaichiyu/Desktop/test/CIProjectTest/CIProjectTest.ipa to pgyer...
[11:07:50]: Upload success. Visit this URL to see: https://www.pgyer.com/mXwT
+------+------------------+-------------+
| fastlane summary |
+------+------------------+-------------+
| Step | Action | Time (in s) |
+------+------------------+-------------+
| 1 | default_platform | 0 |
| 2 | build_app | 11 |
| 3 | pgyer | 1 |
+------+------------------+-------------+
[11:07:50]: fastlane.tools finished successfully 🎉
hanxiaomaoaichiyudeMacBook-Pro:CIProjectTest hanxiaomaoaichiyu$
网友评论