Connect, Configure and Build Android and iOS Apps in VSAC
In this lab we will Connect, Configure and Build Android and iOS Apps in Visual Studio App Center (VSAC). The lab is broken into two components and you can complete one of both of them depending on yuor preference.
DevOps MPP Course Source
- This lab is used in course DevOps200.8x: DevOps for Mobile Apps - Module 2.
Pre-requisites:
- Complete the earlier Mobile VSAC lab Getting Started in Visual Studio App Center
Lab Tasks:
- Android
- Connect to Your Repository Service
- Configuring and Build Your App
- iOS
- Connect to Your Repository Service
- Configuring and Build Your App
Estimated Lab Time:
- approx. 30 minutes
Android
Task 1: Connect to Your Repository Service
-
Select the Android or Xamarin.Android app that you want to work with.
-
Click the Build tab on the left menu.
-
Connect to your repository service: GitHub, Visual Studio Team System (VSTS), or BitBucket.
-
After you are connected, choose from the list of branches in your repo.
Task 2: Configuring and Building Your App
- Click the Configure Build button on the branch detail blade. The Build Configuration blade will appear pre-populated with fields from your selected branch. There are five sections in the configuration of an App Center build: Build, Sign, Test, Distribute, and Advanced. See these sections in the figure below.
-
Select the project that you want to build in the project drop-down. If no project is found, check that it’s shared and that you’ve selected the correct branch, and that everything is checked in.
-
Choose the release configuration from the drop-down.
-
For Xamarin.Android builds, select the Mono Version to run the build on.
-
Set the Build Freqency to the basic setting Manually Choose When to run builds.
-
For native Android projects, enter your build.gradle file. Your build.gradle file contains dependencies, build types, build tools version, and product flavors.
-
Click Save & Build. Building may take a few minutes.
-
When the build is completed, check if it succeeded. If it did not, click on the build and click Download Logs to see what went wrong.
-
If the build succeeded, click the build to bring up the build details. Select Download, then download build.
-
Take the .apk download and install and run the build on your own Android simulator.
iOS
Task 1: Connect to Your Repository Service
-
Select the iOS or Xamarin.iOS app you want to work with.
-
Click the Build Tab on the left menu.
-
Connect to your repository service: GitHub, Visual Studio Team System (VSTS), or BitBucket.
-
After you have connected, choose from the list of branches in your repo.
Task 2: Configuring and Building
-
Click the Configure Build button on the branch detail blade. The Build Configuration blade will appear pre-populated with fields from your selected branch. There are five sections in the configuration of an App Center build: Build, Sign, Test, Distribute, and Advanced.
-
Select the project that you want to build in the project drop-down. If no project is found, check that it’s shared and that you’ve selected the correct branch, and that everything is checked in.
-
Choose the Release configuration from the drop-down.
-
Set the XCode version to run the build on.
-
For Xamarin.iOS builds, select the Mono Version to run the build on.
-
Set the Build Freqency to the basic setting Manually Choose When to run builds.
-
Select CocoaPods for a native iOS project workspace. App Center searches the branch for Podfiles to install unless a /Pod folder exists.
-
Click Save & Build. Building may take a few minutes.
-
When the build is completed, check if it succeeded. If it did not, click on the build and click Download Logs to see what went wrong.
-
If the build succeeded, click the build to bring up the build details. Select Download, then Download build.
-
Take the .ipa download and install and run the build on your own iOS simulator.
Summary
In this lab you completed the following tasks for both, or either, Android or iOS:
- Connected to Your Repository Service
- Configured and Built Your Android or iOS App