Fastlane's black Magic: one-click Package compile upload App Store

Source: Internet
Author: User
Tags connection reset

Original article and code please poke the picture first, see Fastlane realize automatic upload function:

Work Flow:

Submitted successfully, awaiting review Fastlane introduction

Fastlane is a fully open source project that includes a set of Ruby-enabled tools that enable automated build, test, and release of IOS and Android projects that are now being purchased by Twitter as part of fabric. Fastlane The powerful thing is that it provides a full range of tools that can basically cover all the processes that are released by the packaged test, as shown in the following figure:

Each of Fastlane's tools corresponds to a Ruby script to perform a specific task, and the best thing is to be able to flexibly combine different tools through a configuration file to create a complete automated process that enables one-click upload of ITC to shorten time to build a release. 1. Main use: perform tests on delivery (including unit and integration tests) build and distribute internal test \ Open Beta build and upload to ITC (including update configuration files, create new screenshots, upload apps and submit audits) ... 2. Tool Set

Fastlane combines the following tool kits organically, from managing certificates to unit tests, from compiling to uploading and publishing, to easy completion via the command line. This suite supports integration with other third-party tools such as Jenkins and Cocoapods,xctools, and the ability to define multiple channels (lanes) to support different deployment goals. Deliver: Will apply to the ITC on the required data to the ITC (including: Screenshots, configuration files, IPA package) Snapshot: Complete screenshots with UI Test FrameIt: Quickly put the screenshot into the device box PEM: Can automate the generation and update of application push notification strokes Stated file sigh: create \ update \ Download and fix provisioning profiles, support app Store, Ad Hoc, development and Enterprise Profiles gym: Compile \ pack iOS app, generate signed IPA file ... 3. Common Commands

In the Fastlane command, the following two are more commonly used: List all the actions of the Fastlane:

$ Fastlane Actions
Fastlane action [Action_name]: Displays a detailed configuration of an action
$  Fastlane Action Match
Fastlane Introductory Combat 1. Install Fastlane 1.1 Creating the App id\ description fileThe goal of this tutorial is to upload the ITC, so you need to create the APP id\ profile in ADC and ITC ahead of time \app the project used here is AD Demo, code see GITHUB

1.2 Installation

View Ruby version, below 2.0 best upgrade

$ ruby-v

Check to see if Xcode CLT is installed

$ xcode-select--install

Install Fastlane

$ sudo gem install-n/usr/local/bin Fastlane

Check version Fastlane

$ fastlane--version
Fastlane installation at path:
/library/ruby/gems/2.0.0/gems/fastlane-2.14.2/bin/ Fastlane
-----------------------------
Fastlane 2.14.2

OK, Setup completes 1.3 for project configuration Fastlane

$ cd Project directory
$ fastlane init

If the period error Connection reset by Peer-ssl_connect, you need to perform:

$ Brew Update && Brew install ruby
//Reload
$ sudo gem install-n/usr/local/bin Fastlane

And then re-execute

$ Fastlane Init
The period will let you enter the Apple ID account password (this information will exist in the keychain, subsequent use without the need to enter a password) will detect whether the current app identifier in the ADC will detect whether the current app is in the ITC if the corresponding letter in ADC and ITC has been created , then the process will be smooth, as shown below:

The following files are generated in the Xcode project directory:

Note: If you do not create an App in ITC, the above two folders will not be created, and you can, of course, be created later, doing the following:

$ Fastlane Produce init
2.fastlane File Configuration

Fastlane's documents are explained as follows: Appfile: Used to store information such as application identifiers and Apple IDs fastfile: Configuration Management Lane Deliverfile: Information to be applied in ITC, uniformly configured in a deliverfile file, See 2.1 metadata: Features Ditto is also configured to apply the information in the ITC, but is the form of independent text configuration of the screenshots: include screenshot data

It should be noted that both metadata and Deliverfile can configure the ITC data, but the latter is high priority. As shown in the following figure:

The following is configured in the Metadata folder for demonstration, and the configuration text in metadata is deleted at the end of the article, all configured in Deliverfile. 2.1 Configure Metadata folder

Modify APP Description:

$ CD Metadata 
$ cd Zh-hans
$ vim description.txt

Modify Keywords:

$ vim Keywords.txt

Modify Support_url:

$ vim Support_url.txt

Modify the Copyright:

$ vim Copyright.txt

And so on, other information changes are similar.

Then create the rating file: Itunes_rating_config.json.

{"Cartoon_fantasy_violence": 0,
"realistic_violence": 0, 
"prolonged_graphic_sadistic_realistic_violence" : 0,
"Profanity_crude_humor": 0,
"mature_suggestive": 0, 
"horror": 2,
"Medical_treatment_info": 0 ,
"Alcohol_tobacco_drugs": 0, 
"gambling": 0, 
"sexual_content_nudity": 0,
"Graphic_sexual_ Content_nudity ": 0, 
" unrestricted_web_access ": 0,
" gambling_contests ": 0
}

See official documentation here

Then add the App icon to the folder, and then create the certificate: 2.2 Configure the certificate

Modify Fastfile:

$ vim Fastfile

The amendment reads as follows:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.