SlideShare a Scribd company logo
Continuos Integration For
Mobile Application Using
Ship.iO CI Tool

1
PREFACE:
As a mobile application developer,I always wondered about the
process of continuous Integration and delivery for mobile applications.
Because of its advantages In faster code deployment and detecting the
defects in the application earlier.
So, I started doing online R&D for the continuous Integration tool for
mobile applications both for Android and iOS.
As a result, I found the tool called Ship.io, which I thought will meet the
process requirement for CI and CD for mobile applications.
In this document, the CI and CD process will be explained for iOS
project in 3 steps.
Step-1: The project workspace structure - iOS .
Step-2 : Ship.Io
2.1: The process of setting up the ship.io tool
2.2: Giving access of your project repo to Ship.io.
Step-3: Continuous Deployment of iOS app for beta test through
Ship.io
2
Before we prepare our project for CI process. Let us know…
1. What is continuous Integration?
“Continuous Integration is a development practice, where
developers needs to Integrate source code Into repository several times
a day. Each code push into repo, Is then verified by automated build,
allowing developers to detect problem early”.
“Continuous Integration doesn’t get rid of bugs, but it does make them
dramatically easier to find and remove.”
- Martin Fowler,
Chief Scientist, ThoughtWorks.
2. How continuous Integration process helps In mobile
application development?
The process of continuous Integration is very cost effective. If we don't
follow the CI process, there will long gap between the each
Integrations, which make it exponentially difficult to find and fix
problems In your applications as early as possible .
For example ,the release of iOS application much different from
Android application or web application.On average Apple review
process takes 5 days compare to 1 day review process of Google
Android. If end user finds any of the Issue In the released application. It
takes much time to fix that Issue and release it again to end users.
The cost of a mobile application error is greater than that of a web
application error. Because it takes much longer time to fix. Making it
even more complex, with the number of different test devices.
So, by applying CI for mobile applications. Developer can constantly
Check-In the developed code to repo and verified automated build will
alert the team members , In case of build fails. Then the team fix the
issue at the earliest, before going out for production.
3
STEP-1: The project workspace structure - iOS
To prepare any of the iOS project for CI or CD. You need to an
workspace of the existing project.
(A workspace is a concept of grouping together a set of related
project, configuration files and library .So you can work on them.A
workspace provides implicit and explicit relationships among the
included projects and their targets.)
Open a existing iOS project (.Xcodeproj) In Xcode. Click on the File in
the menu bar >> New >> Workspace
Once you click on the workspace, It will ask you to save the workspace
project. So, save the workspace In your respected project folder.
4
You should be able to see, empty project and Project Structure as
below .
Project Structure.
5
Drag the project file (.Xcodeproj) into the Xcode.
Finally, go to the Product In the menu bar and select >> Scheme >>
Manage Scheme.
6
Once you click on the manage scheme, a dialog box will appear. Make
sure the projectName.xcodeproj have a shared checkbox clicked,
otherwise click the shared checkbox to make your project shared one to
work with workspace project.
Now, our project meets all the setup requirement needed by Ship.io
tool .Once you done with your project setup and next Important thing
Is to check-in the code In Github repo or Bit-Bucket. Since Ship.io
need access to your code repo to build the automated build.
Assuming everyone know how to check-In the code to Github repo. I’m
moving to step-2.
7
Step-2 :Ship.io
2.1. The process of setting up the ship.io tool.
Visit https://ship.io and create a free account by clicking on Signup.
Enter your E-mail Address and Password. That’s it your Ship.io account
is ready for CI.
8
Once you done with the creating of your account.You should be able to
see the below screen.
Click on “Select you app via Github,SSH or HTTPS”. Once you clicked
on that button, you will be redirected to Github access page.This Is the
page, where we going to give access of our Github or Bit-Bucket repo
to Ship.io tool.
9
Just click on “GITHUB” and tap connect button on the bottom right
corner. Once you click on the connect, the Ship.io tool will ask you for
the authorisation access to your Github repo. Provide the access by
tapping on access granted.
Once the access is granted, the ship.io will start fetching all the repo’s
present In your Github account and list it out.
These are basic necessary setup In ship.io tool to Implement CI and CD
for any project.
10
2.2. Giving access of your project repo to Ship.io.
Once all the projects listed out, you need to select the project from the
list, which already have workspace setup for ship.io. Once your select
your project from the list, click on the scan.
Clicking on scan allows the Ship.io to scan through the project repo.
Which In turn starts cloning the project and analysis all the project
dependencies,library,framework and especially workspace availability.
Once analysis of the repo Is completed. You will be redirected to “Create
Job” page. Must sure schedule is selected to commit hook, the commit
hook will take care of any newly made commit to your repo and
instantaneously tells the ship.io to scan the repo once again.
As of now, you might seen a warning showing “You haven’t added any
steps to this job yet.” under build steps. Ship.io asking you to specify,
what type of automated build you want to setup, either application or
tests.
11
Click on the “+ Add build step” and select “Build An iOS Application”.
Here we are telling Ship.io to build automated build for application.
Once clicked on “Build An iOS Application”, a new dialog box will appear.
Which already have a populated workspace and Scheme name. Now click
on “Package App with ship.io Build Number” and click OK, which will
automatically update a build number when new code scanned by Github
repo.
12
Now the “Create Job” page should look something like below and finally
click on “+Create Job”.
Clicking on “+Create Job”, Ship.io tool start constructing automated
build.
If the build Is succeed. The Status will be shown as “Succeeded” or else
“failing”
13
You can see complete automated build process, by clicking on status tile.
Once you tap on the tile, It will show the detail process of complication
and automated build.
Hurry!.We successfully built our first build. You can intimate your team
member about successful build, by adding team mate email address. To
add team mate email address,click on menu button, right next to your
account name and Click on Team option from the drop down.
Clicking on Team, will redirect you to team page. Where you need to add
team name, specify Job name(project name) and enter the team mate
mail address to send an Invite.
14
After adding team member.Your team page should look like this.
Thats It. Your team mates will receive a notification, Whenever new build
get succeed. An mail will notify your team mate about the successful
build.
15
Step-3: Continuous Deployment of iOS app for beta test
through Ship.io
To deploy the iOS application for beta testing through ship.io. Go to
menu and select “Code Signing” from drop down.
Once you clicked on “Code Signing”. It will open a code signing page,
where you need to add the developer and distribution certificate(.p12 file)
to ship.io dashboard. (Download the developer or distribution certificate
(.cer)from Apple member account. Double click on the certificate to open
It on keychain access, then right click on the certificate and select
“Export”. It will generate the .p12 file).
16
Add both developer.p12 and distribution.p12 file by clicking on “+ Add
Certificate” and finally add the application distribution provisional profile
certificate by clicking on “Provisional profile” Tab and add the certificate.
17
Now Ship.io tool is ready for your application deployment. Now we need
to go back to our Xcode project. In order to generate the .ipa file, once
you generate the .ipa file, add it to the project structure and update the
Github repo.
To generate an .ipa for your application. Open a distribution certificate by
double clicking on it. Select a project target >> Build Setting >> Code
Signing.
Once you add the distribution certificate, clean the code(command+shift
+K). Now archive the application to create .ipa, select the product from
menu bar >> Archive.(Make sure that, active scheme is pointing to iOS
device).
18
Once archiving of the application completed successfully, save the .ipa file
In the project folder and commit/Check-In the code to Github repo.
Your project structure should like this. Now go to Jobs page In Ship.io tool
and click on edit below the project name.
Clicking on edit will open Create job page. Select the edit button from
Build step >> Build An iOS Application >> Edit. It will open a dialog box,
choose code signing and give distribution access by clicking check box
“Sign this build”,selecting developer certificate and provisional profile
and finally save the create job.
19
Click here
Once you done with giving certificate access. Click on “Start build” In
Jobs page, which will start analysing new code and .ipa file, which has
been newly Checked-In to repo. Then Ship.io starts creating a package
file of ipa for distribution.
20
You can see successful packaging of .ipa file by tapping on build tile.
Once application and .ipa is successfully complied and packaging Is done.
You can send .ipa file for beta tester. To do so, click on send OTA
notification.
Once the beta tester receive an application build file, he/she can Install It
Into there device.
Build Notification:
21
This Is the basic way to Integrate your mobile application for Continuous
Integration and Continuous deployment.
Resources:
1. https://support.ship.io/ios
2. https://www.youtube.com/watch?v=joc1QbYhqhw
3. [PDF] Why CI Should Be Part of Your Mobile Dev Process - from Sauce
Labs
4. Logo - Ship.io copyright.
-Kishan Ravindra
iOS Developer
Qwinix Technologies Pvt Ltd
22

More Related Content

PDF
Cordova + Ionic + MobileFirst
PPTX
Getting started with Appcelerator Titanium
PPTX
Mobile Test Automation at eBay
PPTX
Publishing strategies for API documentation
PPTX
API Documentation -- Presentation to East Bay STC Chapter
PDF
"I have a framework idea" - Repeat less, share more.
PPTX
Mobile WebDriver Selendroid
Cordova + Ionic + MobileFirst
Getting started with Appcelerator Titanium
Mobile Test Automation at eBay
Publishing strategies for API documentation
API Documentation -- Presentation to East Bay STC Chapter
"I have a framework idea" - Repeat less, share more.
Mobile WebDriver Selendroid

What's hot (20)

PPTX
[ApacheCon 2016] Advanced Apache Cordova
PDF
Mobile test automation with Selenium, Selendroid and ios-driver
PPTX
[Devoxx Morocco 2015] Apache Cordova In Action
PPTX
PDF
Xamarin v.Now
ODP
Create ABS Project In Twenty Minutes
PDF
Getting started with appium
PPTX
Apache Cordova In Action
PPTX
Android Test Automation – one year later
PPTX
[JavaLand 2015] Developing JavaScript Mobile Apps Using Apache Cordova
PDF
20180618 wwdc cherrypick_xcode10beta
PDF
Deploy your app with one Slack command
PDF
Appcelerator Titanium Intro (2014)
PDF
Apache cordova
PDF
Mobile Apps Using AngularJS - Adam Klein @ AngularJS IL
PDF
Samsung Indonesia: Tizen Native App
PPTX
Nom Nom: Consuming REST APIs
PPTX
REST Development made Easy with ColdFusion Aether
PPTX
[JMaghreb 2014] Developing JavaScript Mobile Apps Using Apache Cordova
[ApacheCon 2016] Advanced Apache Cordova
Mobile test automation with Selenium, Selendroid and ios-driver
[Devoxx Morocco 2015] Apache Cordova In Action
Xamarin v.Now
Create ABS Project In Twenty Minutes
Getting started with appium
Apache Cordova In Action
Android Test Automation – one year later
[JavaLand 2015] Developing JavaScript Mobile Apps Using Apache Cordova
20180618 wwdc cherrypick_xcode10beta
Deploy your app with one Slack command
Appcelerator Titanium Intro (2014)
Apache cordova
Mobile Apps Using AngularJS - Adam Klein @ AngularJS IL
Samsung Indonesia: Tizen Native App
Nom Nom: Consuming REST APIs
REST Development made Easy with ColdFusion Aether
[JMaghreb 2014] Developing JavaScript Mobile Apps Using Apache Cordova
Ad

Viewers also liked (7)

PDF
Gitlab and Lingvokot
PDF
Infra-as-Code and Enterprise ITSM Governance - ChefConf 2015
PPTX
Heuristics to scale your framework
PDF
Software Security: In the World of Cloud & CI-CD
PPTX
CI, CD with Docker, Jenkins and Tutum
PPTX
Integration of automation framework with ci tools
PPTX
Continuous Delivery Maturity Model
Gitlab and Lingvokot
Infra-as-Code and Enterprise ITSM Governance - ChefConf 2015
Heuristics to scale your framework
Software Security: In the World of Cloud & CI-CD
CI, CD with Docker, Jenkins and Tutum
Integration of automation framework with ci tools
Continuous Delivery Maturity Model
Ad

Similar to CI & CD- mobile application (20)

PDF
How we integrate & deploy Mobile Apps with Travis CI
PPTX
How we integrate & deploy Mobile Apps with Travis CI part 2
PPTX
Jenkins CI/CD setup for iOS in Mac OSX
PDF
iOS CI/CD: Continuous Integration and Continuous Delivery Explained
PDF
Automate your iOS deployment a bit
PPTX
Mobile CICD
PDF
12 simple steps to prepare your i os app for development and distribution (1)...
PPTX
How to submit ios app in Appstore
PPTX
Building CI_CD for Mobile Development.pptx
PDF
Ci for i-os-codemash-01.2013
KEY
iOS Auto Build
PDF
Push Notification - Part 3 - Transcript.pdf
PDF
Automating Your Way out of the Dark Ages: Our Experience with (And Without) P...
PPTX
Uber mobility - Build & Release
PDF
Jazoon12 355 aleksandra_gavrilovska-1
PPTX
1, 2, 3 build - continuous integration for mobile apps
PPTX
Ciprian redinciuc continuous integration with jenkins for i os
PPTX
Basic iOS Training with SWIFT - Part 4
DOCX
Hospital app project (how to upload app)
PPTX
Wrapping with PhoneGap
How we integrate & deploy Mobile Apps with Travis CI
How we integrate & deploy Mobile Apps with Travis CI part 2
Jenkins CI/CD setup for iOS in Mac OSX
iOS CI/CD: Continuous Integration and Continuous Delivery Explained
Automate your iOS deployment a bit
Mobile CICD
12 simple steps to prepare your i os app for development and distribution (1)...
How to submit ios app in Appstore
Building CI_CD for Mobile Development.pptx
Ci for i-os-codemash-01.2013
iOS Auto Build
Push Notification - Part 3 - Transcript.pdf
Automating Your Way out of the Dark Ages: Our Experience with (And Without) P...
Uber mobility - Build & Release
Jazoon12 355 aleksandra_gavrilovska-1
1, 2, 3 build - continuous integration for mobile apps
Ciprian redinciuc continuous integration with jenkins for i os
Basic iOS Training with SWIFT - Part 4
Hospital app project (how to upload app)
Wrapping with PhoneGap

CI & CD- mobile application

  • 1. Continuos Integration For Mobile Application Using Ship.iO CI Tool
 1
  • 2. PREFACE: As a mobile application developer,I always wondered about the process of continuous Integration and delivery for mobile applications. Because of its advantages In faster code deployment and detecting the defects in the application earlier. So, I started doing online R&D for the continuous Integration tool for mobile applications both for Android and iOS. As a result, I found the tool called Ship.io, which I thought will meet the process requirement for CI and CD for mobile applications. In this document, the CI and CD process will be explained for iOS project in 3 steps. Step-1: The project workspace structure - iOS . Step-2 : Ship.Io 2.1: The process of setting up the ship.io tool 2.2: Giving access of your project repo to Ship.io. Step-3: Continuous Deployment of iOS app for beta test through Ship.io 2
  • 3. Before we prepare our project for CI process. Let us know… 1. What is continuous Integration? “Continuous Integration is a development practice, where developers needs to Integrate source code Into repository several times a day. Each code push into repo, Is then verified by automated build, allowing developers to detect problem early”. “Continuous Integration doesn’t get rid of bugs, but it does make them dramatically easier to find and remove.” - Martin Fowler, Chief Scientist, ThoughtWorks. 2. How continuous Integration process helps In mobile application development? The process of continuous Integration is very cost effective. If we don't follow the CI process, there will long gap between the each Integrations, which make it exponentially difficult to find and fix problems In your applications as early as possible . For example ,the release of iOS application much different from Android application or web application.On average Apple review process takes 5 days compare to 1 day review process of Google Android. If end user finds any of the Issue In the released application. It takes much time to fix that Issue and release it again to end users. The cost of a mobile application error is greater than that of a web application error. Because it takes much longer time to fix. Making it even more complex, with the number of different test devices. So, by applying CI for mobile applications. Developer can constantly Check-In the developed code to repo and verified automated build will alert the team members , In case of build fails. Then the team fix the issue at the earliest, before going out for production. 3
  • 4. STEP-1: The project workspace structure - iOS To prepare any of the iOS project for CI or CD. You need to an workspace of the existing project. (A workspace is a concept of grouping together a set of related project, configuration files and library .So you can work on them.A workspace provides implicit and explicit relationships among the included projects and their targets.) Open a existing iOS project (.Xcodeproj) In Xcode. Click on the File in the menu bar >> New >> Workspace Once you click on the workspace, It will ask you to save the workspace project. So, save the workspace In your respected project folder. 4
  • 5. You should be able to see, empty project and Project Structure as below . Project Structure. 5
  • 6. Drag the project file (.Xcodeproj) into the Xcode. Finally, go to the Product In the menu bar and select >> Scheme >> Manage Scheme. 6
  • 7. Once you click on the manage scheme, a dialog box will appear. Make sure the projectName.xcodeproj have a shared checkbox clicked, otherwise click the shared checkbox to make your project shared one to work with workspace project. Now, our project meets all the setup requirement needed by Ship.io tool .Once you done with your project setup and next Important thing Is to check-in the code In Github repo or Bit-Bucket. Since Ship.io need access to your code repo to build the automated build. Assuming everyone know how to check-In the code to Github repo. I’m moving to step-2. 7
  • 8. Step-2 :Ship.io 2.1. The process of setting up the ship.io tool. Visit https://ship.io and create a free account by clicking on Signup. Enter your E-mail Address and Password. That’s it your Ship.io account is ready for CI. 8
  • 9. Once you done with the creating of your account.You should be able to see the below screen. Click on “Select you app via Github,SSH or HTTPS”. Once you clicked on that button, you will be redirected to Github access page.This Is the page, where we going to give access of our Github or Bit-Bucket repo to Ship.io tool. 9
  • 10. Just click on “GITHUB” and tap connect button on the bottom right corner. Once you click on the connect, the Ship.io tool will ask you for the authorisation access to your Github repo. Provide the access by tapping on access granted. Once the access is granted, the ship.io will start fetching all the repo’s present In your Github account and list it out. These are basic necessary setup In ship.io tool to Implement CI and CD for any project. 10
  • 11. 2.2. Giving access of your project repo to Ship.io. Once all the projects listed out, you need to select the project from the list, which already have workspace setup for ship.io. Once your select your project from the list, click on the scan. Clicking on scan allows the Ship.io to scan through the project repo. Which In turn starts cloning the project and analysis all the project dependencies,library,framework and especially workspace availability. Once analysis of the repo Is completed. You will be redirected to “Create Job” page. Must sure schedule is selected to commit hook, the commit hook will take care of any newly made commit to your repo and instantaneously tells the ship.io to scan the repo once again. As of now, you might seen a warning showing “You haven’t added any steps to this job yet.” under build steps. Ship.io asking you to specify, what type of automated build you want to setup, either application or tests. 11
  • 12. Click on the “+ Add build step” and select “Build An iOS Application”. Here we are telling Ship.io to build automated build for application. Once clicked on “Build An iOS Application”, a new dialog box will appear. Which already have a populated workspace and Scheme name. Now click on “Package App with ship.io Build Number” and click OK, which will automatically update a build number when new code scanned by Github repo. 12
  • 13. Now the “Create Job” page should look something like below and finally click on “+Create Job”. Clicking on “+Create Job”, Ship.io tool start constructing automated build. If the build Is succeed. The Status will be shown as “Succeeded” or else “failing” 13
  • 14. You can see complete automated build process, by clicking on status tile. Once you tap on the tile, It will show the detail process of complication and automated build. Hurry!.We successfully built our first build. You can intimate your team member about successful build, by adding team mate email address. To add team mate email address,click on menu button, right next to your account name and Click on Team option from the drop down. Clicking on Team, will redirect you to team page. Where you need to add team name, specify Job name(project name) and enter the team mate mail address to send an Invite. 14
  • 15. After adding team member.Your team page should look like this. Thats It. Your team mates will receive a notification, Whenever new build get succeed. An mail will notify your team mate about the successful build. 15
  • 16. Step-3: Continuous Deployment of iOS app for beta test through Ship.io To deploy the iOS application for beta testing through ship.io. Go to menu and select “Code Signing” from drop down. Once you clicked on “Code Signing”. It will open a code signing page, where you need to add the developer and distribution certificate(.p12 file) to ship.io dashboard. (Download the developer or distribution certificate (.cer)from Apple member account. Double click on the certificate to open It on keychain access, then right click on the certificate and select “Export”. It will generate the .p12 file). 16
  • 17. Add both developer.p12 and distribution.p12 file by clicking on “+ Add Certificate” and finally add the application distribution provisional profile certificate by clicking on “Provisional profile” Tab and add the certificate. 17
  • 18. Now Ship.io tool is ready for your application deployment. Now we need to go back to our Xcode project. In order to generate the .ipa file, once you generate the .ipa file, add it to the project structure and update the Github repo. To generate an .ipa for your application. Open a distribution certificate by double clicking on it. Select a project target >> Build Setting >> Code Signing. Once you add the distribution certificate, clean the code(command+shift +K). Now archive the application to create .ipa, select the product from menu bar >> Archive.(Make sure that, active scheme is pointing to iOS device). 18
  • 19. Once archiving of the application completed successfully, save the .ipa file In the project folder and commit/Check-In the code to Github repo. Your project structure should like this. Now go to Jobs page In Ship.io tool and click on edit below the project name. Clicking on edit will open Create job page. Select the edit button from Build step >> Build An iOS Application >> Edit. It will open a dialog box, choose code signing and give distribution access by clicking check box “Sign this build”,selecting developer certificate and provisional profile and finally save the create job. 19 Click here
  • 20. Once you done with giving certificate access. Click on “Start build” In Jobs page, which will start analysing new code and .ipa file, which has been newly Checked-In to repo. Then Ship.io starts creating a package file of ipa for distribution. 20
  • 21. You can see successful packaging of .ipa file by tapping on build tile. Once application and .ipa is successfully complied and packaging Is done. You can send .ipa file for beta tester. To do so, click on send OTA notification. Once the beta tester receive an application build file, he/she can Install It Into there device. Build Notification: 21
  • 22. This Is the basic way to Integrate your mobile application for Continuous Integration and Continuous deployment. Resources: 1. https://support.ship.io/ios 2. https://www.youtube.com/watch?v=joc1QbYhqhw 3. [PDF] Why CI Should Be Part of Your Mobile Dev Process - from Sauce Labs 4. Logo - Ship.io copyright. -Kishan Ravindra iOS Developer Qwinix Technologies Pvt Ltd 22