DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. Deployment
  4. New FastLane Plugin to Upload iOS Binary With altool

New FastLane Plugin to Upload iOS Binary With altool

Learn about altool, a plugin for FastLane which allows you to upload iOS binary to iTunes Connect for continuous deployment, and how to set up and use it.

Shashikant Jagtap user avatar by
Shashikant Jagtap
·
Jan. 24, 18 · Tutorial
Like (1)
Save
Tweet
Share
7.04K Views

Join the DZone community and get the full member experience.

Join For Free

apple doesn't want us to enable continuous deployment for whatever reason. there is no api to deal with itunes connect and apple still wants to approve your apps. apple's own continuous integration server a.k.a. xcode server doesn't allow us to upload the ipa files to itunes connect. the archive process creates an ipa file but stops there. we still need to rely on fastlane or manual processes to upload the build to itunes connect. in the previous blog post, we saw five ways to upload ios binaries to itunes connect. in this post, we will go through the fastlane plugin altool that i wrote to upload the ios binary to itunes connect using altool. you can find the details of the plugin here on github.

why i wrote this plugin

fastlane has solved the problem of uploading the ios binary to itunes connect with tools like deliver and pilot so that we can script the interaction with itunes connect. however, fastlane uses the itmstransporter tool to upload the binaries and dealing with itunes connect, which is a tricky and lengthy approach. there was an issue on github to discuss the use of altool over itmstransporter but the author decided to use itmstransporter to deliver tool.

altool is a command line interface for the application loader and seems slicker than itmstransporter. we don't need to install this utility explicitly, it comes up with the latest xcode. apple has brief documentation of altool here . with fastlane, there was no way to use this tool, so i thought it would be easy to write a plugin so that we can upload binaries to itunes connect.

how to use the altool plugin

using the altool plugin is as easy as using other plugins. to get started, add it to your project by running:

fastlane add_plugin altool

the only pre-requisite of this plugin is you have to have fastlane setup, this plugin has a configurable apple id and password but you probably don't want to code those values in the configuration. you need to have fastlane set up with a fastlane_user and fastlane_password environmental variable setup. fastlane will ask  when you run fastlane init , but if not, you have to set these variables.

you can set that easily for bash shell:

$ export fastlane_user="your_apple_id@yourcompany.com";
$ export fastlane_password="your_super_xecret_password";

you can do the same for your choice of the shell if you aren't using bash. this plugin can be used for uploading a generated ipa file using gym to itunes connect.

once installed, we can easily configure the plugin using the following configuration parameters:

altool(
        altool_username: env["fastlane_user"],
        altool_password: env["fastlane_password"],
        altool_app_type: "ios",
        altool_ipa_path: "./build/your-ipa.ipa",
        altool_output_format: "xml",
)

you can configure this once you have created an ios binary or ipa file using gym.

a little bit about security

in the above configuration, we have used environmental variables for secure configuration. it's up to you how you want to use those credentials securely. when the altool plugin runs, it might print the username and password to the console commands, pipe the output to /dev/null or use a similar approach so that fastlane doesn't print the command to console. select the right way to secure your details.

example project

there is an example project called altool-demo available on github which has its own readme. feel free to check out the project and try it yourself. this project uses a dummy file so it fails the validation, but if you got real ipa, then it would be uploaded to itunes connect (hopefully).

this plugin is just a ruby wrapper on apple's command line tool altool ; if that altool works, then this plugin should 100% work. i would like to try this on a real app and see how it performs. try it at your own risk. good luck and happy continuous delivery for ios apps.

Upload Continuous Integration/Deployment ITunes Connect

Published at DZone with permission of Shashikant Jagtap, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Exploring the Benefits of Cloud Computing: From IaaS, PaaS, SaaS to Google Cloud, AWS, and Microsoft
  • Public Cloud-to-Cloud Repatriation Trend
  • Promises, Thenables, and Lazy-Evaluation: What, Why, How
  • Simulate Network Latency and Packet Drop In Linux

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: