SlideShare a Scribd company logo
1 of 13
TeamCity CI & CD Setup
(iOS)
By: Gagan Vishal Mishra
Introduction
First off, If you are interested in CI (Continuous Integration) & CD (Continuous development) for
iOS app then you are at right place. In this presentation, I will show how to set up CI server & CD
using TeamCity & Hockey App.
We will use:
1. TeamCity
2. Xcode
3. Hockey (create an account if you don’t have)
4. Java Updated version must be in your mac system.
Download TeamCity for Mac OS and unzip anywhere you want in your system.
Create a Hockey app Account.
Create a certificate & provisioning profile (Dev/Adhoc/Prod) on Apple developer account & install
in Xcode.
TeamCity Server Setup
Steps configure TeamCity Server
1. Unzip TeamCity in your Mac system
2. Move to folder bin (YourFolder ->TeamCity -> bin). You will get a file named ‘runAll.sh’
3. Open Terminal in your mac
4. Move to bin folder path on terminal (e.g. cd /Users/Gagan/Documents/TeamCity/bin) & enter
5. Type sh runAll.sh start and press enter.
6. On success, open http://localhost:8111 in your browser & wait.
7. When all configuration information is stored. Click Proceed.
8. Next screen Accept Licence & in next screen create account.
Adding Project VCS
In order to add a project on TeamCity, Open localhost:8111 browser
1. Click ‘Administration’ on top right hand of the screen.
2. Select option ‘Create Project’ under projects.
3. On next page, select ‘Manually’ option & enter your project detail. Note that parent project
would be by default ‘Root Project’.
4. Click ‘Create’
5. On Next Screen under Build configuration , select ‘Create Build Configuration’
6. On next screen add Build Id & other detail & select ‘Create’. Here Parent project would be your
project name (Already populated).
7. New Screen would be VCS screen.
8. Select type of VCS (in my case git).
9. Add a VCS Root Name what you wish.
10. Add your Git fetch URL. Add your brach name (by default would be master).
11. Select ‘Authentication Method’ as password & enter your GIT username & password detail.
12. Select ‘Test Connection’. It must be successful if you have entered correct info.
13. Select create.
Adding Project Build Steps
Build steps are the most important in CI & CD setup.
From right hand side of the local browser screen of your added app, Select ‘Build Steps’.
BUILD-STEP 1: Compile App
1. Select ‘Add Build Steps’
2. Choose Runner Type as ‘Xcode project’.
3. Give the step name as ‘Compile App’.(optional & you may put what you want).
4. Add ‘Path to the project or workspace’ by selecting most right hand side icon. it will
automatically parse your project & populates available option in project. In my case I am using
Workspace.
5. Select your scheme. if you are unable to find scheme then you need to make your app
schemes as shared & push the code again to reflect here (How to: on Last Screen of this
tutorial)
6. Select your scheme name & save.
Adding Project Build Steps
From right hand side of the local browser screen of your added app, Select ‘RUN’.
• It will take time and must be successful.
• Once completed move to your TeamCity folder at path /yourFolder/TeamCity/buildAgent/work’
• You will get a complete copy of your source code under a alphanumeric name folder.
• Now create a plist file name as ‘exportOptions.plist’
• Add following content in your plist from this PAGE. Read it carefully. You have to modify as per
your requirement.
• Place ‘exportOptions.plist’ file inside your downloaded project root folder.
Adding Project Build Steps
In this step we will create Archive file of the app, Select ‘Build Steps’ & add a new build step
BUILD-STEP 2: Archive App
1. Choose Runner Type as ‘Command Line’.
2. Give the step name as ‘Archive App’.
3. Select Run as ‘Custom Script’
4. Add below script in ‘Custom Script’ section
xcodebuild -workspace <WorkSpaceName>.xcworkspace -scheme <AppName> archive -
archivePath PathToAchive/<AppName>.xcarchive
For example:
xcodebuild -workspace DemoApps.xcworkspace -scheme AppOne archive -archivePath
/Users/Gagan/Documents/TeamCity/buildAgent/work/e9007099257627f0/AppOne.xcarchive
5. Click to Save
Adding Project Build Steps
In this step we will create IPA file of the app, Select ‘Build Steps’ & add a new build step
BUILD-STEP 3: Create App IPA
1. Choose Runner Type as ‘Command Line’.
2. Give the step name as ‘Create App IPA’.
3. Select Run as ‘Custom Script’
4. Add below script in ‘Custom Script’ section
xcrun xcodebuild -exportArchive -exportPath build -archivePath <AppName>.xcarchive -
exportOptionsPlist exportOptions.plist
For example:
xcrun xcodebuild -exportArchive -exportPath build -archivePath AppOne.xcarchive -
exportOptionsPlist exportOptions.plist
Adding Project Build Steps
In this step we will upload IPA file on Hockey app account, Select ‘Build Steps’ & add a new build step
BUILD-STEP 4: Upload App IPA on Hockey App
1. Choose Runner Type as ‘Command Line’.
2. Give the step name as ‘Upload App IPA’.
3. Select Run as ‘Custom Script’
4. Add below script in ‘Custom Script’ section
set -x
curl -F “status=2” -F “notify=0” -F “notes=Build %build.counter%” -F "notes_type=0" -F
“ipa=@/pathToIPA/<AppName>.ipa" -H "X-HockeyAppToken: <HokeyAppToken>"
https://rink.hockeyapp.net/api/2/apps/upload
For example:
set -x
curl -F “status=2” -F “notify=0” -F “notes=Build %build.counter%” -F "notes_type=0" -F
"ipa=@/Users/Gagan/Documents/TeamCity/buildAgent/work/e9007099257627f0/build/AppOne.ipa" -H "X-
HockeyAppToken: 23WXXXXXX38065168eeec6” https://rink.hockeyapp.net/api/2/apps/upload
Adding Project Build Steps
In this step we will remove created IPA file, Select ‘Build Steps’ & add a new build step
BUILD-STEP 5: Delete App’s IPA
1. Choose Runner Type as ‘Command Line’.
2. Give the step name as ‘Delete App IPA’.
3. Select Run as ‘Custom Script’
4. Add below script in ‘Custom Script’ section
rm /<PathToIPA>/<AppName>.ipa
rm -rf
For example:
rm /Users/Gagan/Documents/TeamCity/buildAgent/work/e9007099257627f0/build/AppOne.ipa
rm -rf
Adding Project Build Steps
In the last you would have total FIVE steps in your app ‘Build Steps’. See Screen Shot. Now you
can run the app on Local host to compile & upload IPA on Hockey. DONE :) Enjoy.
Shared Scheme Setting in
Xcode
• In Xcode, Select Edit Scheme under Product.
• Click on Manage Scheme.
• For your project, choose workspace name from drop down & Click on shared. See screen shot
• Chose close.
• Push the code in Git repo. After these steps you would able to find schemes name in Build step1.
–Gagan Vishal Mishra
Cheers. You have done it.

More Related Content

Recently uploaded

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfOverkill Security
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 

Recently uploaded (20)

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Team city ci &amp; cd for ios app

  • 1. TeamCity CI & CD Setup (iOS) By: Gagan Vishal Mishra
  • 2. Introduction First off, If you are interested in CI (Continuous Integration) & CD (Continuous development) for iOS app then you are at right place. In this presentation, I will show how to set up CI server & CD using TeamCity & Hockey App. We will use: 1. TeamCity 2. Xcode 3. Hockey (create an account if you don’t have) 4. Java Updated version must be in your mac system. Download TeamCity for Mac OS and unzip anywhere you want in your system. Create a Hockey app Account. Create a certificate & provisioning profile (Dev/Adhoc/Prod) on Apple developer account & install in Xcode.
  • 3. TeamCity Server Setup Steps configure TeamCity Server 1. Unzip TeamCity in your Mac system 2. Move to folder bin (YourFolder ->TeamCity -> bin). You will get a file named ‘runAll.sh’ 3. Open Terminal in your mac 4. Move to bin folder path on terminal (e.g. cd /Users/Gagan/Documents/TeamCity/bin) & enter 5. Type sh runAll.sh start and press enter. 6. On success, open http://localhost:8111 in your browser & wait. 7. When all configuration information is stored. Click Proceed. 8. Next screen Accept Licence & in next screen create account.
  • 4. Adding Project VCS In order to add a project on TeamCity, Open localhost:8111 browser 1. Click ‘Administration’ on top right hand of the screen. 2. Select option ‘Create Project’ under projects. 3. On next page, select ‘Manually’ option & enter your project detail. Note that parent project would be by default ‘Root Project’. 4. Click ‘Create’ 5. On Next Screen under Build configuration , select ‘Create Build Configuration’ 6. On next screen add Build Id & other detail & select ‘Create’. Here Parent project would be your project name (Already populated). 7. New Screen would be VCS screen. 8. Select type of VCS (in my case git). 9. Add a VCS Root Name what you wish. 10. Add your Git fetch URL. Add your brach name (by default would be master). 11. Select ‘Authentication Method’ as password & enter your GIT username & password detail. 12. Select ‘Test Connection’. It must be successful if you have entered correct info. 13. Select create.
  • 5. Adding Project Build Steps Build steps are the most important in CI & CD setup. From right hand side of the local browser screen of your added app, Select ‘Build Steps’. BUILD-STEP 1: Compile App 1. Select ‘Add Build Steps’ 2. Choose Runner Type as ‘Xcode project’. 3. Give the step name as ‘Compile App’.(optional & you may put what you want). 4. Add ‘Path to the project or workspace’ by selecting most right hand side icon. it will automatically parse your project & populates available option in project. In my case I am using Workspace. 5. Select your scheme. if you are unable to find scheme then you need to make your app schemes as shared & push the code again to reflect here (How to: on Last Screen of this tutorial) 6. Select your scheme name & save.
  • 6. Adding Project Build Steps From right hand side of the local browser screen of your added app, Select ‘RUN’. • It will take time and must be successful. • Once completed move to your TeamCity folder at path /yourFolder/TeamCity/buildAgent/work’ • You will get a complete copy of your source code under a alphanumeric name folder. • Now create a plist file name as ‘exportOptions.plist’ • Add following content in your plist from this PAGE. Read it carefully. You have to modify as per your requirement. • Place ‘exportOptions.plist’ file inside your downloaded project root folder.
  • 7. Adding Project Build Steps In this step we will create Archive file of the app, Select ‘Build Steps’ & add a new build step BUILD-STEP 2: Archive App 1. Choose Runner Type as ‘Command Line’. 2. Give the step name as ‘Archive App’. 3. Select Run as ‘Custom Script’ 4. Add below script in ‘Custom Script’ section xcodebuild -workspace <WorkSpaceName>.xcworkspace -scheme <AppName> archive - archivePath PathToAchive/<AppName>.xcarchive For example: xcodebuild -workspace DemoApps.xcworkspace -scheme AppOne archive -archivePath /Users/Gagan/Documents/TeamCity/buildAgent/work/e9007099257627f0/AppOne.xcarchive 5. Click to Save
  • 8. Adding Project Build Steps In this step we will create IPA file of the app, Select ‘Build Steps’ & add a new build step BUILD-STEP 3: Create App IPA 1. Choose Runner Type as ‘Command Line’. 2. Give the step name as ‘Create App IPA’. 3. Select Run as ‘Custom Script’ 4. Add below script in ‘Custom Script’ section xcrun xcodebuild -exportArchive -exportPath build -archivePath <AppName>.xcarchive - exportOptionsPlist exportOptions.plist For example: xcrun xcodebuild -exportArchive -exportPath build -archivePath AppOne.xcarchive - exportOptionsPlist exportOptions.plist
  • 9. Adding Project Build Steps In this step we will upload IPA file on Hockey app account, Select ‘Build Steps’ & add a new build step BUILD-STEP 4: Upload App IPA on Hockey App 1. Choose Runner Type as ‘Command Line’. 2. Give the step name as ‘Upload App IPA’. 3. Select Run as ‘Custom Script’ 4. Add below script in ‘Custom Script’ section set -x curl -F “status=2” -F “notify=0” -F “notes=Build %build.counter%” -F "notes_type=0" -F “ipa=@/pathToIPA/<AppName>.ipa" -H "X-HockeyAppToken: <HokeyAppToken>" https://rink.hockeyapp.net/api/2/apps/upload For example: set -x curl -F “status=2” -F “notify=0” -F “notes=Build %build.counter%” -F "notes_type=0" -F "ipa=@/Users/Gagan/Documents/TeamCity/buildAgent/work/e9007099257627f0/build/AppOne.ipa" -H "X- HockeyAppToken: 23WXXXXXX38065168eeec6” https://rink.hockeyapp.net/api/2/apps/upload
  • 10. Adding Project Build Steps In this step we will remove created IPA file, Select ‘Build Steps’ & add a new build step BUILD-STEP 5: Delete App’s IPA 1. Choose Runner Type as ‘Command Line’. 2. Give the step name as ‘Delete App IPA’. 3. Select Run as ‘Custom Script’ 4. Add below script in ‘Custom Script’ section rm /<PathToIPA>/<AppName>.ipa rm -rf For example: rm /Users/Gagan/Documents/TeamCity/buildAgent/work/e9007099257627f0/build/AppOne.ipa rm -rf
  • 11. Adding Project Build Steps In the last you would have total FIVE steps in your app ‘Build Steps’. See Screen Shot. Now you can run the app on Local host to compile & upload IPA on Hockey. DONE :) Enjoy.
  • 12. Shared Scheme Setting in Xcode • In Xcode, Select Edit Scheme under Product. • Click on Manage Scheme. • For your project, choose workspace name from drop down & Click on shared. See screen shot • Chose close. • Push the code in Git repo. After these steps you would able to find schemes name in Build step1.
  • 13. –Gagan Vishal Mishra Cheers. You have done it.