- 设置
Fastlane
将终端导航到项目目录并运行:
$ fastlane init
如果没有进入正确路径,会出现类似报错信息,重新定位到正确路径再次执行一次即可
localhost:iOS_13_adapter_demo Shen$ fastlane init
[✔] 🚀
[17:04:35]: Sending anonymous analytics information
[17:04:35]: Learn more at https://docs.fastlane.tools/#metrics
[17:04:35]: No personal or sensitive data is sent.
[17:04:35]: You can disable this by adding `opt_out_usage` at the top of your Fastfile
[✔] Looking for iOS and Android projects in current directory...
[17:04:35]: Created new folder './fastlane'.
[17:04:35]: It looks like there is no iOS project in the current directory, though we did find one in a sub-directory
[17:04:35]: Please `cd` into the directory of the intended Xcode project you wish to use.
[!] Please `cd` into the directory of the intended Xcode project you wish to use and run `fastlane init` again
提示选择:
localhost:iOS_13_Demo Shen$ fastlane init
[✔] 🚀
[✔] Looking for iOS and Android projects in current directory...
[17:09:24]: Created new folder './fastlane'.
[17:09:24]: Detected an iOS/macOS project in the current directory: 'iOS_13_Demo.xcworkspace'
[17:09:24]: -----------------------------
[17:09:24]: --- Welcome to fastlane 🚀 ---
[17:09:24]: -----------------------------
[17:09:24]: fastlane can help you with all kinds of automation for your mobile app
[17:09:24]: We recommend automating one task first, and then gradually automating more over time
[17:09:24]: 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
?
然后可能卡在$ updateing bundle
这时候先`Control + Z`取消,
然后打开项目路径下的Gemfile ,将里面的source跟换为https://gems.ruby-china.com保存,
然后再cd到你的项目目录下,执行bundle update,就可以看到bundle更新完成,
再执行fastlane init即可
![](https://img.haomeiwen.com/i2209298/f48372c4dda488cd.png)
网友评论