Group Group Group Group Group Group Group Group Group

raywenderlich.com Forums

fastlane Tutorial: Getting Started

In this fastlane tutorial you'll learn how to take advantage of many of the tools provided to automate large and laborious parts of your life as an iOS dev!


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/778-fastlane-tutorial-getting-started

Wow. This is amazing. Doesn’t this mean that Apple could’ve done all this from within xCode? Will they implement something like this in the future?

ok i tried to do it, but I got this:

[12:54:20]: Connection reset by peer - SSL_connect
[12:54:20]: An error occured during the setup process. Falling back to manual     setup!
App Identifier (com.krausefx.app):

so I entered what should be there manually and continued, then I got this:

[12:57:25]: Verifying if app is available on the Apple Developer Portal and iTunes Connect...
[12:57:25]: Starting login with user '[censored]'
[12:57:46]: Error occurred with the setup program! Reverting changes now!
[12:57:46]: Deleting the 'fastlane' folder
[12:57:46]: -----------------------------------------------------------------------
[12:57:46]: Connection reset by peer - SSL_connect
[12:57:46]: 
[12:57:46]: SSL errors can be caused by various components on your local machine.
[12:57:46]: Apple has recently changed their servers to require TLS 1.2, which may
[12:57:46]: not be available to your system installed Ruby (2.0.0)
[12:57:46]: 
[12:57:46]: The best solution is to use the self-contained fastlane version.
[12:57:46]: Which ships with a bundled OpenSSL,ruby and all gems - so you don't depend on system libraries
[12:57:46]:  - Use One-Click-Installer:
[12:57:46]:     - download fastlane at https://download.fastlane.tools
[12:57:46]: -----------------------------------------------------------
[12:57:46]:     - extract the archive and double click the `install`
[12:57:46]: -----------------------------------------------------------
[12:57:46]:  - Use Homebrew
[12:57:46]:     - update brew with `brew update`
[12:57:46]:     - install fastlane:
[12:57:46]: -----------------------------------------------------------
[12:57:46]:       - 🚀 `brew cask install fastlane` 🚀
[12:57:46]: -----------------------------------------------------------
[12:57:46]: for more details on ways to install fastlane please refer the documentation:
[12:57:46]: -----------------------------------------------------------
[12:57:46]:         🚀       https://docs.fastlane.tools          🚀   
[12:57:46]: -----------------------------------------------------------
[12:57:46]: 
[12:57:46]: You can also install a new version of Ruby
[12:57:46]: 
[12:57:46]: - Make sure OpenSSL is installed with Homebrew: `brew update && brew upgrade openssl`
[12:57:46]: - If you use system Ruby:
[12:57:46]:   - Run `brew update && brew install ruby`
[12:57:46]: - If you use rbenv with ruby-build:
[12:57:46]:   - Run `brew update && brew upgrade ruby-build && rbenv install 2.3.1`
[12:57:46]:   - Run `rbenv global 2.3.1` to make it the new global default Ruby version
[12:57:46]: - If you use rvm:
[12:57:46]:   - First run `rvm osx-ssl-certs update all`
[12:57:46]:   - Then run `rvm reinstall ruby-2.3.1 --with-openssl-dir=/usr/local`
[12:57:46]: 
[12:57:46]: If that doesn't fix your issue, please google for the following error message:
[12:57:46]:   'Connection reset by peer - SSL_connect'
[12:57:46]: -----------------------------------------------------------------------

[!] Connection reset by peer - SSL_connect

I already installed homebrew and updated to the latest ruby. (at least it says it’s the latest)
now I’ll try to go to the fastlane site and get their bundled installer and see how that goes…

after following their instructions, I got a ruby that is about 2 weeks old, and now it is working, so i can proceed :smiley:

ok now I’m stuck. here’s what happened:

Daves-MacBook-Pro:~ dkliman$ cd /Users/dkliman/Downloads/mZone
Daves-MacBook-Pro:mZone dkliman$ ls
mZone Poker mZone Poker.xcodeproj
Daves-MacBook-Pro:mZone dkliman$ fastlane init
[13:27:19]: Detected iOS/Mac project in current directory…
[13:27:19]: This setup will help you get up and running in no time.
[13:27:19]: fastlane will check what tools you’re already using and set up
[13:27:19]: the tool automatically for you. Have fun!
[13:27:19]: Created new folder ‘./fastlane’.
[13:27:19]: $ xcodebuild clean -showBuildSettings -project ./mZone\ Poker.xcodeproj
Your Apple ID (e.g. fastlane@krausefx.com): [censored]
[13:27:32]: Verifying if app is available on the Apple Developer Portal and iTunes Connect…
[13:27:32]: Starting login with user ‘[censored]’

±---------------±-----------------------------------------------------+
| Detected Values |
±---------------±-----------------------------------------------------+
| Apple ID | [censored] |
| App Name | mZone Poker |
| App Identifier | com.mZone.mZone-Poker-[censored] |
| Project | /Users/dkliman/Downloads/mZone/mZone Poker.xcodeproj |
±---------------±-----------------------------------------------------+

[13:27:55]: This app identifier doesn’t exist on iTunes Connect yet, it will be created for you
Please confirm the above values (y/n)
y
[13:28:18]: Created new file ‘./fastlane/Appfile’. Edit it to manage your preferred app metadata information.
[13:28:18]: Loading up ‘deliver’, this might take a few seconds
[13:28:19]: Login to iTunes Connect ([censored])
[13:28:29]: Login successful
[13:28:32]: Could not find app with app identifier ‘com.mZone.mZone-Poker-[censored]’ in your iTunes Connect account ([censored] - Team: 60756)
[13:28:32]: An error occured during the setup process. Falling back to manual setup!
App Identifier (com.krausefx.app): com.mZone.mZone-Poker-[censored]
[13:29:12]: Created new file ‘./fastlane/Appfile’. Edit it to manage your preferred app metadata information.
Optional: The scheme name of your app (If you don’t need one, just hit Enter):

schemename
[13:29:26]: ‘snapshot’ not enabled.
[13:29:26]: ‘cocoapods’ not enabled.
[13:29:26]: ‘carthage’ not enabled.
[13:29:26]: Created new file ‘./fastlane/Fastfile’. Edit it to manage your own deployment lanes.
[13:29:26]: fastlane will send the number of errors for each action to
[13:29:26]: https://github.com/fastlane/enhancer to detect integration issues
[13:29:26]: No sensitive/private information will be uploaded
Daves-MacBook-Pro:mZone dkliman$

there is no Deliver file and no meta data directory.

how do I fix all this and proceed?

1 Like

According to Felix, the Fastlane creator, you probably have a mix-up with your Developer Portal Team and iTunes Connect and maybe only access to one of them.

Hm how do I fix that? I ought to have full access to everything, since it’s my account… but I’m also a total noob at this stuff…

I was having the same issue. How I resolve it was by logging into iTunes Connect and adding a new app. After doing so, in Terminal I then did fastlane init. From there, I saw the metadata and screenshot folders.

My guess is that fastlane was having issues creating the app identifier on iTunes connect…

adding any new app or this one in particular?

You would create a new app, and then for Bundle ID select “Register a new bundle ID on the Developer Portal.”.

This was an excellent introduction into Fastlane and its tools. Thank you so much for this!

hi,

help?

ever since I did this tutorial, some other stuff seems to have become permanently messed up on my computer. how can I get rid of any stuff in my os that is interfering with Xcode?

in particular, spritekit isn’t playing sounds now. I get crashes instead.

in particular:

I already reinstalled Xcode and the os, to no avail. can you help me clean up?

I newbie at fastlane I got a few questions.

When I install fastlane init and then ask for your Apple ID login but how do the code signing that the only thing I want to do before I start doing the beta testing?

@lyndsey Before I run snapshot, do I have to set provisioning profiles or change some build settings for the UI Test target as well?

Hi @lyndsey ,

A tutorial how to set up fastlane with different targets would be very very helpful. Thank you!

I solved this by changing the starter projects’s project name.

  1. Double click (slowly) on your projects root and rename it
  2. In the dialog that appears: agree on renaming all project content items
  3. Update your scheme name to match your project name (project > scheme > manage schemes)

The tutorial states that the following will be prompted at the fastlane init process:
“It looks like that mZone Poker has already been taken by someone else, please enter an alternative App Name:”

This was not the case with me, so I guess by simply renaming your Xcode project, fastlane can create a unique app on Itunes connect.

If you modify the following 3 values returned by the following grep so that they are unique you should be good to go:

grep 'productName\|name = \"\|PRODUCT_BUNDLE_IDENTIFIER' mZone/mZone\ Poker.xcodeproj/project.pbxproj

This tutorial is more than six months old so questions are no longer supported at the moment for it. We will update it as soon as possible. Thank you! :]