Skip to content

Commit 40681c1

Browse files
committed
iOS build doc
1 parent 87236db commit 40681c1

7 files changed

Lines changed: 65 additions & 1 deletion

File tree

49.3 KB
Loading
48.2 KB
Loading
35.4 KB
Loading
44.8 KB
Loading

azure-docs/builds/xamarin-android.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Xamarin Android Build
22

3-
Follow these steps to create a VSTS build for your eShopOnContainers app.
3+
Follow these steps to create a VSTS build for your eShopOnContainers app (android).
44

55
**Note**: This document assumes basic knowledge about creating builds and configuring external VSTS connections
66

azure-docs/builds/xamarin-iOS.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Xamarin iOS Build
2+
3+
Follow these steps to create a VSTS build for your eShopOnContainers app (iOS)
4+
5+
**Note**: This document assumes basic knowledge about creating builds and configuring external VSTS connections
6+
7+
## Creating the build
8+
9+
Despite the _"Get Sources"_ task there are three tasks more in the build:
10+
11+
1. Build Xamarin iOS Project
12+
2. Copy generated packages
13+
3. Publish the build artifact.
14+
15+
![iOS Build Steps](images/android-ios.png)
16+
17+
Let's discuss each of them.
18+
19+
### Build the project
20+
21+
Add a "Xamarin iOS" task with following configuration:
22+
23+
1. `eShopOnContainers-iOS.sln` in "Solution". This solution has been created ex professo for the build.
24+
2. Ensure that the "Create App Package" checkbox is enabled
25+
26+
**About signing & Provisioning section**
27+
28+
In order to deploy your app to a physical device you must sign it using a certificate with a provisioning profile. Refer to [this blog
29+
post of the Xamarin team](https://blog.xamarin.com/continuous-integration-for-ios-apps-with-visual-studio-team-services/) for more info.
30+
31+
Basically you have three options for setting the certificate (p12 file) and the provisioning profile:
32+
33+
1. Use MacInCloud VSTS agent and setup the p12 file and provisioning profile in the setup [https://blogs.msdn.microsoft.com/visualstudioalm/2015/11/18/macincloud-visual-studio-team-services-build-and-improvements-to-ios-build-support/](https://blogs.msdn.microsoft.com/visualstudioalm/2015/11/18/macincloud-visual-studio-team-services-build-and-improvements-to-ios-build-support/)
34+
2. Use a custom mac machine with the certificate and provisioning profile installed. In this case you don't have to do anything else.
35+
3. Have the p12 file and the provisioning profile reachable on somewhere
36+
37+
If you choose option 3, you need to download the certificate and the provisioning profile into the build agent (using a previous build task).
38+
Once downloaded two files, you have to specify the location of both in the "Signing & Provisioning Section".
39+
40+
![iOS Build Step 1](images/ios-build-step1.png)
41+
42+
### Copy generated files to output folder
43+
44+
Add a "Copy files" task with following configuration:
45+
46+
1. `src/Mobile/eShopOnContainers/eShopOnContainers.iOS/bin/iPhone/$(BuildConfiguration)` in "Source Folder"
47+
2. `**/*.ipa` in "Contents"
48+
3. `$(Build.ArtifactStagingDirectory)` in "Target Folder"
49+
4. Ensure that "Clean Target folder" (under "Advanced" section) is checked
50+
51+
This way we copy the generated IPA in the _Build.ArtifactStagingDirectory_ folder (and remove any previous IPA generated by a previous build).
52+
53+
![iOS Build Step 2](images/ios-build-step2.png)
54+
55+
### Publishing build artifact
56+
57+
Add a "Publish Build Artifacts" task, with following configuration:
58+
59+
1. `$(Build.ArtifactStagingDirectory)` in "Path to publish"
60+
2. `drop` in "Artifact Name"
61+
3. `Server` in "Artifact Type"
62+
63+
![Android Build Step 3](images/ios-build-step3.png)

azure-docs/readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
## Builds and releases
44

55
1. [VSTS build for Xamarin App (Android)](builds/xamarin-android.md)
6+
2. [VSTS build for Xamarin App (iOS)](builds/xamarin-iOS.md)

0 commit comments

Comments
 (0)