Mobile DevOps: Release Xamarin Apps Automatically | Kristijan Kralj | Skillshare

Playback Speed

  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x

Mobile DevOps: Release Xamarin Apps Automatically

teacher avatar Kristijan Kralj

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Lessons in This Class

22 Lessons (2h 19m)
    • 1. Course Introduction

    • 2. MDO S1 L2 What is Devops

    • 3. MDO S1 L4 Create New Azure Devops Project

    • 4. MDO S2 L1 Meet the App We Are Going to Release

    • 5. MDO S2 L2 Build the Android App

    • 6. MDO S2 L3 Build the iOS App

    • 7. MDO S2 L4 Build iOS and Android Apps in Parallel

    • 8. MDO S2 L5 Run Tests

    • 9. MDO S2 L6 Run Pipeline on Every Pull Request

    • 10. MDO S3 L2 Android Prepare Keystore File

    • 11. MDO S3 L3 Setup App Center for Releasing Beta Versions

    • 12. MDO S3 L4 Sign the Android APK File

    • 13. MDO S3 L5 Create Android Beta Version

    • 14. MDO S3 L6 Separate Jobs Into Stages

    • 15. MDO S3 L7 iOS Prepare Certificate and Profiles

    • 16. MDO S3 L8 Create iOS Beta Version

    • 17. MDO S4 L2 Increase App Version Automatically

    • 18. MDO S4 L3 Setup iOS Production Release (App Store & App Center)

    • 19. MDO S4 L4 Setup Android Production Release (Google Play & App Center)

    • 20. MDO S4 L5 Create New Release Pipeline

    • 21. MDO S4 L6 Publish to the Google Play

    • 22. MDO S4 L7 Publish to the App Store

  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.





About This Class

How much time do you spend when you need to release a new version of your Xamarin app? Is it minutes, hours, or days?

To release the Xamarin.iOS project, you need to:

  • build the app

  • test to make sure it works properly

  • create an IPA file, and make sure it works properly

  • upload it manually to the AppStore...

and then repeat the same process for the Android version of your Xamarin app. If you need to show it to QA before you submit it, the process gets even longer.

But what if there was a way to run this process automatically? Without you having to bother with all mentioned above?

Wouldn't that be great?

QA gets the beta version, they approve it, and the version is automatically released to production every single time.

Luckily, this is possible.

Enter Azure DevOps.

Enter  "Mobile DevOps: Release Xamarin Apps Automatically"  course.

In this course, I'm going to show you how to quickly and easily set up the automated build and release process, that will:

  • Build both iOS and Android versions of your Xamarin app AUTOMATICALLY every time there is a change.

  • Run tests on every build so that those sneaky bugs don't end up in the production.

  • Continuously release BETA VERSIONS to your QA team without you having to do anything about it.

  • And finally, how to push QA-approved versions of your Xamarin app directly to the APP STORES, much faster than before. So that customers can sooner enjoy your new features!

I'm going to guide you step-by-step through the whole process, from start to finish.

In a clear and easy-to-understand way, you are going to learn how to set up your own release process, which will save you hours and hours of manual work in the years to come.

Meet Your Teacher

Hello, I'm Kristijan.

See full profile

Class Ratings

Expectations Met?
  • 0%
  • Yes
  • 0%
  • Somewhat
  • 0%
  • Not really
  • 0%
Reviews Archive

In October 2018, we updated our review system to improve the way we collect feedback. Below are the reviews written before that update.

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.


1. Course Introduction: Let me ask you a question. How much time do you spend every time you need to release a new version of your Xamarin app. Is it minutes, hours, or days? Do you get a headache every time you need to archive iOS app and upload it to the App Store. And then repeat the same process for the Android version. In case you need to show it to testers before you submit, the process gets even longer. But what did there was a way to run this process automatically without you having to bother with all mentioned above. Wouldn't that be great? Testers get the better versions, they approve it. And the whole process of releasing both iOS and Android apps happens automatically at the same time. And the only thing you need to do is to commit your changes. This is entirely possible. And this course, we'll show you how. Welcome to the Mobile DevOps course, where I will show you how to release iOS and Android apps automatically using Azure DevOps. We start with the basics of DevOps. I'm going to explain to you in a clear and understandable way, what is DevOps? So you understand why more and more companies use the DevOps. Then I'll walk you step-by-step on how to set up your first pipeline. Throughout this course, I'm going to show you how to build your Xamarin app. Every time there is a change, push the master branch, and how to check that everything still works fine. By executing unit tests, you are going to see how to automatically release better versions of the iOS and Android apps at the same time using the epicenter. And finally, the big things. You're going to learn how to release a new version of your app to the Apple App Store and Google Play Store at the same time. This course is not for you if you don't have experienced with it. But if you know how to use Git and have some Xamarin apps to release, then you are in the right place. You don't have to know anything about DevOps. In order to start with this course. This course show you the same process I have been using lately, barbershops. And it saved me hours and hours of my time. And who am I? My name is Christian. And are we developing mobile apps for several years now? And I want to show you how you can automate the release of your apps. So what reweighting for? If you are as excited as I am, then enroll in the course and let's get started. 2. MDO S1 L2 What is Devops: In this lecture, Let's learn what is Mobile DevOps, and why should you care about DevOps? First, let's start with what is DevOps? If you ask Wikipedia, DevOps is a set of practices that combines software development and IT operations. Here you can see that the word DevOps is made by combining dev and ops. The previous definition is maybe not too clear, so I will try to simplify it now. The way I see the DevOps, DevOps is a way to automatically release new versions of your apps to the production and do that as often as possible. To keywords is automatically, meaning deployment of new versions happens using some kind of tool. And as often as possible. This means that releases happened multiple times per week or even multiple times per day. Also, the two terms you heard often that are related to their homes. Our CI, which stands for Continuous Integration, and CD, which stands for Continuous Delivery. Let's define them using the simple language. Continuous integration means that developers push the code to the main branch several times per day. This means less merge conflicts and the code can sooner end up in the production. Continuous delivery is a process of releasing new app versions as often as possible. So what is mobile DevOps? More specific, what is Mobile DevOps for Xamarin, it means that you release iOS and Android versions of your app to the AppSource automatically and constantly. In this course, we will use Azure DevOps. In order to do that, I'm going to show you how to automate the whole process. But strictly speaking, DevOps is more than just releasing the code on this image. You can see that it also involves build, plan, operate, and feedback phases. It involves the whole organization, not just the developers and system admins. And now we're getting to the, why should you care part. First, there is on an increased speed at which the new features are developed. The reason for that is since the code ends up in the main branch fester. Next, those relies heavily on automated tests. By having tests, you're ensuring the abs continue to behave correctly even after new features are developed, we have faster delivery. Since the release is automated, the release can happen more often, which means new features end up in production quicker. New feature has been happier customers and more money. The rest of the advantages are automation. The boring and repetitive tasks are automated. And there are tools to monitor the whole process and have the better feedback. Lastly, the biggest advantage for you as a developer is the increase in the average salary. Then $1000. That's how much more DevOps engineer earns in one year in San Francisco, USA compared to the software developer with the same years of experience. This is according to the StackOverflow salary calculator. So the plan for you is to take this course, Larson DevOps. And then you can start yelling to the pupil to show you the money. 3. MDO S1 L4 Create New Azure Devops Project: Azure DevOps, is our Microsoft tool that helps you to build any release your applications. It has different services dot-dot-dot you usually need while working on their project. So before we dive into Azure DevOps, let's just quickly go through them. In Azure Boards. This is a tool that enables you to manage your projects. It has our board for tracking progress of your tasks. You can write user stories and acceptance scenarios, plan your features, and all other LinkedIn functionality. Azure pipeline. This will be a focus of this course. We will use the pipeline service to build our Xamarin apps. This includes building both for Android and iOS at the same time. But with the pipeline, you can build and deploy different applications, such as web apps, mobile apps, and services. The least is pretty big. Asia reposts, as the name suggests, you use this to store your code in a private Git repositories Azure Test Plans. This contains the tools for manual exploratory testing and Azure Artifacts. You can use this service to create and share packages such as NPM, Maven, et cetra. Let's go ahead and signing to Azure DevOps. You can sign in with Microsoft or GitHub account. Let's go ahead and create a new Azure DevOps project. Project is a centralized place for managing your app or the set of apps you need to build and release together. Perfect name is first, I'm going to name the project crypto. But since that's the name of the mobile app, you're going to see the sap in the next lecture. Description should be something awesome and explanatory. Visibility can be either private or public. Now, if your project is private, then the only people that can see what's inside the project is the people you give access. If the project is public, on the other hand, everyone can see it. But the public project has advantages since it's free to use pipeline to build the projects. And you can even have multiple free parallel jobs. So you can build both iOS and Android apps at the same time. With the private project, you have some limitations. So you have free up to 20 hours of pipelined build time. Does a time you can use to build and release apps. That's a lot. But if you use more than that, you can always buy more minutes for that month. I'm going to select public scenes. Why not? Version control can be either get or Team Foundation Server control. I'm going to select Git and finally, Work Item Process. This is the development process you have for planning and building the app. There are some pretty fine templates here. So such as Agile Scrum, CMMI, I'm going to just stick with the basic and create a new project here, here inside the board so you can see the development process. It's really simple. It only has columns do, doing and done for your tasks. In order to use pipelines, we need to enable it by default. It's turned off. I'm just going to turn that on. And now we're ready to build the app. 4. MDO S2 L1 Meet the App We Are Going to Release: Meet the cripple at AP, a cryptocurrency wallet app. The functionality of the app, it's not too important for this course since the pipeline can work with all sorts of apps. But let me just quickly go over some main functionalities. The app is built using Xamarin Forms, shell, and MVVM. In the resources of this lecture, you have access to the Git repository where the app is stored. Right from the start you see the volatile fuel. This contains the general overview of the cryptocurrencies you currently have in this wallet. You can see in the chart, the overview of the cryptocurrencies also taught three assets and I'll east of the latest transactions recorded in the wallet. We have a side menu here. We can see all the assets within the wallet or navigate to the transaction and see all transactions or, or only the positive sections or only with John transactions. We can also add a new transaction. Finally, we can also logout from the app. And if we want, we can also register a new account. The source code also contains some unit tests for the app. We are also going to execute this unit tests during the pipeline run. As you can see, pretty much all of your models are covered. We currently have 28 unit tests, and at the moment, they're all passing. Unit tests are a great way to ensure your app maintains the high-quality. So if we make a change and any of these tests fails, then the whole process of automatically building and releasing your app will stop. Since there is no point in releasing a broken app. And you will get the error that the Build didn't pass. We are going to see an example of this scenario at the end of the section. 5. MDO S2 L2 Build the Android App: Okay, we are now ready to build the Android app. But first, we need to create a new pipeline. So I went to the pipelines and here I only have one option in this is to create a new pipeline. A pipeline is a set of tasks you want to run to build and release your apps automatically. We will click on the Create pipeline and choose GitHub. Since that's where our code is. Now, I'm going to sign in to the GitHub and choose the crypto let repository. Now, this asked me to choose our predefined template based on the Git repository. I will choose the Xamarin Android project. And now we will get this YAML file. Quick pause here just to explain what this YAML file is. So YAML stands for YAML Ain't Markup Language. I know badass name. This is our standard most commonly used for storing different configurations in a file. Which is great, since you can commit that to the GitHub, intact changes to it. But also for our build process, we can define the steps in this single file and then execute that file over and over. Now, the template we have chosen resource, the NuGet packages and builds the Android app. Let's go over the template so you can understand how this whole thing works with the trigger we defined when we want to run this pipeline automatically. By default, eats whenever we merged something to master branch or when we create our pull requests that targets the master branch. Bool. This defines where we want to build this code on which machine microsoft is. Microsoft is very helpful here. It provides you with sound free machines where you can run the build. Like I mentioned before, it's free up to 30 hours per month. So you can use either Microsoft machines. The other option is to use your own machines. So in this case, this is a virtual machine named Mac OS latest. And I will prepare our link for you so you can see what agents are available by default. Our Mac OS latest. So this is macOS Catalina. And if we click on the link, we get the whole list of all installed programs. So you can see the list is quite huge. And it just goes on and on. Okay, variables. So this is just the values you want to reuse throughout this file. So you don't repeat those radio survey. In this case, it's easier to change just one variable later if you need. Every job has settled tasks you want to execute. So this is defined within steps. The first task is to install the NuGet install. We also get this pop-up if we hover over this task. The next task is restoring NuGet packages for the whole solution. Finally, there is a task for building the Xamarin Android app. So some ways we need to provide is where the project file is, output directory and configuration, in our case, configuration is released, okay, by default, this is enough to run and build the Android app. So if we click save and run, this will be committed to the master branch. And the build will automatically start, since we have triggered to automatically start this job. Whenever we push something to master branch. As you can see, it's skewing, uses MacOS agent. And now the job is running. Okay, the build is now finished. And we see green check mark. This mean they'll build has succeeded. Great. Let's just go over to the cryptoclidid project and make a quick change. Let's say Add README file. And I'm going to put some text here. So welcome to the group. And I'm going to push this new file. And now if we go back to the, our pipeline, we will see that we have new r1 cubed. So we have added README file and the build will be automatically triggered. Okay, This was a quick introduction. And if you're wondering how to add new tasks and how you, how you can know which tasks exist in the Azure Pipeline. We are going to answer that question in the next lecture and build Xamarin iOS application along the way. 6. MDO S2 L3 Build the iOS App: In the last lecture, because see how to build the Android application. In this lecture, we are going to build the iOS Xamarin application. First step, I'm just going to rename this pipeline. So I'm going to rename it to crypto wallet. Heat to refresh. Okay, this has been renamed. Let's go to the pipelined and edit pipeline. In order to build the iOS application, I will select the predefined task, Xamarin dot iOS, in order to build the iOS application. In case you didn't see this assistant, it might be hidden here. So just click on the Show assistant and you'll get access to the assistance where you can see all the tasks you have available. So again, Xamarin, iOS, and you'll get all the fields you can populate. These are not all the options, but these are most commonly used options. So solution is this one. We can leave it as wildcard for now, configuration is released. So instead of coded release, I'm going to use our variable named built configuration. In order to use these variable, I'm going to enter dollar sign, then parentheses, and build configuration. So clean, this is if you want to clean your project before the build. Create packages is generating IPA file. For now we won't be generating this and we will select build for iOS simulator. In case we don't select this, we will indicate that we want to build for physical device. And in order to build for physical device, we need to provide provisioning profiles and certificates and when. And we will leave all that complicated stuff for later sections. For now, we just want to see how to build. These are in iOS obligation. Okay? We are going to position where we want to put this task. So we want to put it here. Let's go to Add. And as you can see, the task has been added. We can now save. So let's say that's all. It's a build iOS application. And we will commit this directly to the master branch. So if we save that, we will run our pipeline once again. But now we will also execute the tasks. The task for building Xamarin iOS application. Now we are going to pipeline. Okay. It seems like the pipeline didn't recognize that I made some changes to the repository. In that case, I can easily fix this by clicking on the Iran pipeline select Run, and we will get a new pipeline run. You can see now we have our job. And Xamarin, iOS is also available as a task. Okay, while this is building, let me just show you what can you use in case you need more explanation on every available task. Azure DevOps has are pretty great documentation on how to use build and release tasks. So you can see if available tasks, it's a bunch of them. Let's say if we click on the Xamarin iOS task. So for every task, you have this YAML snippet and you can see all the available options also, what are some default values, whether or not some parameter is optional or not. And you get really great explanation for every parameter. I'm going to leave this link as our resource of this lecture. So you can take a look and use this as reference. Okay, the job has completed and the build has passed once again. So we have built both summer, both Xamarin Android, Xamarin, iOS. Now, all these runs and everything is nice. But instead of having these predefined names, we can make the, we can make these names and tasks are bit more organized and have better description of these names. Let's see how to do that in the next lecture. 7. MDO S2 L4 Build iOS and Android Apps in Parallel: In this lecture, we are going to edit our pipeline and organize our tasks into separate jobs. So by the end of this lecture, you will see how to run iOS built and Android build as separate jobs in parallel. And this means we can execute the whole pipeline much faster. So we can get our app built much faster. Okay, right-click and edit to get our Asia by employing CML. The first thing I'm going to remove this comment, since it doesn't have too much sense. At the moment. Since we haven't specified that we want to run Android and iOS, add separate jobs. There is no job stack and there is no job tag for every task. This means that this will be executed as 11. Big job. So let's change that. The first step, I'm going to add a new jobs. So if we want to have multiple separate jobs, we need to separate, then we need to indicate that we want to have multiple jobs. Now I'm going to hit Enter and creates new job. Drop identifier will be built Android. This is just id we assign to this job. And the display name for this job, it's going to be built Android app. So every job has multiple steps. We already have these steps tag. Let's just fix the indentation and also for this task. Okay, first job is done. Next thing I need to repeat the same process for the build iOS app. The identifier I'm going to assign is the build. Ios. Display name is going to be built iOS app. Let's fix the indentation by hitting the tab. So we're missing steps. So every job has multiple steps which are identified by task. And now, since this is a separate job, what we want to do is to have same two tasks for installing NuGet tool and executing our task for restoring NuGet packages, I can copy and paste that as well. This solution filename is starting to repeat itself. I would like to avoid having duplicates within, within the YAML file. So I'm going to define our new variable called solution name. And this is going to be crypto wallet dot epsilon. Now, this name comes from the actual name of my solution file. And instead of these wildcards, I am going to use variable name and just copy and paste this to other places. And while we're here, let's also fix this Android CSB ROI input parameter. So I can fix this by going to the ECS profile inside the GitHub repository. And I can copy and paste this. Just maybe if we want to have this file as reusable, then instead of that, we can define another variable called and the project. And copy and paste this value here. And instead of the string, we care in US variable Android project. Okay, let's save this and see if this will execute. Now. I will run pipeline from muster. Let's hit Run. And now we can see that we have multiple jobs. So one job is build up. The second job is build iOS job. And this will be executed as parallel jobs. So this will be executed on one separate machine, and this will be executed on another machine. As you can see, both Android and iOS app are being built at the same time. While this is building, let me just show you where you can see how, how many parallel jobs you have for your project. So if your project is private, you can see parallel jobs. So if your project is private, you have 1800 minutes to consume every month and one parallel job. So since I have created this as a public project, I have option to run up to 10 parallel jobs. And there is no limitation on how many minutes I can spend on building this pipeline. Let's go back to the pipeline. This is still running. As you can see, we currently have two pipeline runs. So this was this was automatically trigger after we have updated the YAML file and this was triggered by me. Okay, both R1's have been completed. As you can see. We saved one extra minute. Now this doesn't seem that much, but you need to have in mind that this is still a small pipeline. And as we progress through this course, we are going to see the impact of this saved time. 8. MDO S2 L5 Run Tests: The last job we are going to add in this section is the ability to run the unit tests. So let's add a task for, for that, we are going to use dotnet core task. If we go to the documentation, we can see that we can use this task to build test, package or publish dotnet application. So this is exactly what we need. First, I'm going to specify our new job. Let's give it IV run tests. Also, we will specify display, display name. This is going to be run unit tests. And let's add this task. So we won't use built. Instead, we will use test. Let's add it here. And we need to specify which project we are going to build. So we are going to be our test project. Let's just find that we need to specify where our CSV file is. So I'm going to copy and paste the path to the tests CSV file based out here. And the last step is to specify in which configuration we want to do that. So we want to build up in our Build configuration. If you remember, Build configuration is set to release. Now I have some errors here. So one thing we have to have in mind is that in YAML file, indentation is really important. If the file is not properly configured, you will have error. The Arctic is that I haven't defined steps keyword. That's why the YAML file was complaining. If I save this, now let's just save that. Go to the pipeline. Just refresh. We will have new automatic build for this pipeline. And now we have three jobs, 14 building Android, one for building iOS, and third for building, for running unit tests. Great, this has also passed. Now we'll see one scenario where everything is not so green. And let's see how unit tests can actually save us from committing some kind of bug to the master branch. 9. MDO S2 L6 Run Pipeline on Every Pull Request: Let's see how we can use pipeline to discover bugs if we have unit tests in our solution. So I'm going to go to the transaction of your model. And let's say I make a mistake and remove this line. We are we displaying alert. We don't have selected coin. So I'm going to remove that, go to the version control, manage branches and remotes. I'm just going to add a new branch, Let's say this pipeline. Okay? And let's switch to the new branch. So we have switched to the branch, and now let's review and commit our changes. Let's say that we made this change as part of fixing some kind of bug and commit and push those changes. Okay, Let's go to the GitHub, to the cryptoclidids solution. And now we have our test pipeline branch. And we can compare and pull request our changes. If you're not familiar with pull requests. Pull request is centralized place where you can discuss, review and seeing changes made in one branch. It's usually used in Teams for code review process. So I'm going to create a new pull request and the base branch is going to be muster. So after I create pull request and refresh this page, we will see that some checks will be automatically triggered. So these checks are from our pipeline. And we will have check to build Android app, build iOS app, and run unit tests. Let's just wait for the results. As you can see, files changed. So this is the change we have made. And we can also see this run in the biplane itself. So if we go to here, we can see that we have some errors. And there is an error that exit code one. So we have some kind of message. And the message is that the unit tests, that the unit test, which was cowering, that part of code we had deleted, has failed. Also, if we go to the pull request itself, we will see that the check door run unit tests has failed. So unit tests, combined with pipeline, are great way to ensure that your app contains our high-quality code, even after you continue to make changes to your repository. Let's go to the possession of your model one more time and undo our change. Let's just made some comment. Oops, commit that and see if they'll build will pass now. So wherever you and commit, commit, push, undo changes. Now all texts have passed, which means whatever changes I have on this branch, it's safe to merge them into master branch. 10. MDO S3 L2 Android Prepare Keystore File: In order to distribute our Android app to end-users through the better Destin channel and through the Google Play Store. We need to sign it with dark KeyStore file. Keystore file is a file that acts as a signing certificate for the APK files or Android application Beckett files. We are assigning the APK files to prove to others that the file is released by us. And the KeyStore file contains that signing information. Creating our new KeyStore file is very simple. In the Visual Studio. I'm going to show you how to do this in Visual Studio for Mac. But the process is almost the same in the Visual Studio on Windows. So let's go and create our new KeyStore file. The important thing is to set the configuration for the unreal projects to release. Then we go to right-click on the Android project and archive for publishing. And we have our new APK file here. But the APK file is not too important at the moment. Instead, I'm going to click on the Sign industry. But in order to create our new KeyStore file, we're going to use a talk and distribution channel. In order to create our new KeyStore file. I'm going to click Next and then create a new key. So let's say key name can be gripped the left and I'm going to fill the rest of the fields. And I'm done. As you can see, I tap really fast. I have populated the rest of the fields, so buzzwords and the rest of this required information. Now I click, Okay, and I have my new key sort of file. If I go on right-click Show aliasing for here, I will get location to the KeyStore file. So I'm going to navigate to this folder now, OK, and Cancel. And this is the location where my KeyStore file is. So I'm just going to copy that file and paste that to the fall. I have created on my desktop, and that's it. The Android app is now ready to be built. 11. MDO S3 L3 Setup App Center for Releasing Beta Versions: For releasing better versions of the boat, Android and iOS apps, we're going to use Microsoft tool called App Center. So I have navigated to the epicenter WMS to load the epicenter. Now, you can release the better versions through Google Play or to the desk light. If you are on iOS. I have chosen to use this service in order to show you how to quickly release new versions. Using App Center is a much faster way to distribute new, better versions then to Google Play or desk light. So what exactly is the epicenter? Well, center is kind of DevOps release tool for apps. You can use it for iOS and Android, native apps, windows apps, React Native naps, Xamarin apps, and much more. Eats mostly free. But if you want some additional features, you need to pay. For our purposes, we don't have to pay anything. So that's a good thing. The actual build enrollees process is not as much configurable as the Azure DevOps, but it's a great way to release better versions of the mobile apps. It also has support for UI testing. So you have or 1, 0, 0, 0, 0, 0, 0 real iOS and Android devices. This thing is not free. I think it costs, it costs about $99 per month. It also has some nice diagnostic libraries. You can put in your app. You'll get an elliptic zeta and even has reports when your app crashes. You can also see on which the devices, your users use, your apps, even the used iOS version or a 100 version, and also which countries. So you can see, you can define some custom events for tracking. You can see users by country. Since I already have the account, I'm going to click on the sign-in button. But if you are new and unfamiliar with the epicenter, then you need to click on the Get Started in order to create a new account. So I'm going to click on the sign-in. And here you can see that there are different services you can use to login and sign up to the center. I'm going to choose my live account. So in order to start, I'm going to just create a new organization. And organization is our centralized place for managing apps or groups of apps and collaborators. Collaborators can be developers, testers, and other people involved in the app development. So I'm just going to name this cripple at the organization name. And now I'm going to add a new app. So here we will create two new apps, one for iOS. Second for a summary. We are treating them as separate apps, even though they are developed with one codebase. In this case, that's Xamarin. But they are separated and they have separate separated earliest process. So aptly named can be also cripple at release type. Let's say better because we are going to release version is still the UPS center. I'm going to select iOS and then Xamarin. But you can see all the available options. So add your app. Okay, let's go back to the organization. Create the same app. But this time, this is going to be beta, but a 100 and Xamarin. And let's add these new app. Absent or provides you with different options for every app. So you can, you can have built test, does 3-bit diagnostics analytics. We are just going to use the distributed feature for distributing our beta versions. And for that, we will create a new group which will be distributed the beta version of our app. So I'm going to add these new group. Let's call it better this thirst. And for now, since I only have myself in this organization, I'm going to add myself as the a collaborator on this group. So we have our new group. If we go to the AA group settings, one thing that will be useful in few sections is these ID of the group. So this was, this will be the destination ID where we are going to push our buttons version. And up will be downloaded for anyone that will have this link axis. So I'm going to click, Okay, and I need to do the same thing for the iOS version. So I can go to the distributor and groups. And let's just create a new group called The same beta testers. Myself Create Group and allow access to anyone who has this link. Okay, now we have our release channel for both iOS and Android apps. Let's see how to actually use the app Center to release our new Android version. 12. MDO S3 L4 Sign the Android APK File: Now that we have the KeyStore file ready, Let's see how to sign the Android APK file. In my assistant, you can immediately see that there is an option altering signing. And this is Pacific what we need. So this is for signing Android APK files. So I'm going to click on this task. And there are some fields that needs to be filled in. Keystore file, KeyStore passwords, alias, and keep password. So the first thing we need to do is to upload the KeyStore file or to the pipeline in order to use it. So I can right-click on library homepage that in new tab. Then go to the secure files and upload the secure file from my DevOps folder like this. Okay? And I have my grip to let that KeyStore file here re okay. Next week what we need is KeyStore passwords and alias. The KeyStore password is sensitive information. So what I can do is to define a new variable, the variable a value that is used throughout the pipeline. We create a new variable by clicking on the variables. And then new variable. This is secret. I'm going to name it KeyStore passwords. And enter the value for my KeyStore file. Okay, I'll also add another variable for Alias. Alias. Alias is simply KeyStore name. So the name I gave to the KeyStore file, I'm going to enter it here. Okay? And the last most important step is to save those variables. Because if you don't save them, they won't be actually created. So save. And now I can populate this. So this was cryptology. The KeyStore file. Keystore password is our variable named key sort, sort, key store a password. Same thing with key password. And alias. P is another variable that is named KeyStore name. Okay, Let's position that task right below Xamarin, Android. Build a task and let's add it. Yaml file is completing, complaining since the indentation is not correct. So I'm going to tap that. And just like that, I have signed the Android up while we're here. Let's add another task. This task will be for publishing the content of our release folder so that we can actually use the Sign APK file and push it to the App Center. I can save this, let's say, and continue to work on the YAML file. So in any given time, if you don't know which exactly task do you need to insert or use at some point. What you can do is to always go to the Azure DevOps documentation. And here you have least of all build unreleased tasks. I have already shown you this. But also what you can do is to filter by title. So in this case, I need to publish artifact. What is artifact? Simply artifact is a file or more files which came out as a result of your build. So this is exactly what we need. And if we click on this, it will explain me what was the name of that task and how to create a new task. So you can see we need to use published pipeline artifact ID in order to publish some folder. So what I can do is to copy this whole task, the sample code, go to my pipeline. So I need to position after a 100 signing. And here I can add this new task. So I have some yellow warnings. I can fix that by fixing the indentation. And now for target pot, instead of this web up exemple Pat, I'm going to copy the path to the Sign APK file. So this whole path comes from the anderen signing. If we take a look at the underlying signing output, I'll show you that in a minute. You will see that the signed APK file ends up in this location. And for artifact name, I can name this Android APK. Saw. Let's now save this. And I think the neuron should be triggered. Okay, we call neuron. There is one warning here. So basically this pipeline is permission to access our resource before it can continue to execute builds. What this means is that we need to give permission to the crystal at that KeyStore secure file. So I'm going to give this permission and now to build should start. So now the R1 has been completed. So let's go to the Android build step. And if we go to the attorney signing. So at any given point for every task, you can see the very detailed output. And just to show you the path I have copied before. So you can see this is encrypted with Android that we release Android, been calm. Christiane cry, crypto that APK. So that's the bat I have entered for publishing task. Okay, one more thing I want to show you here is that now we have one published artifact. And if I expand this, this is our APK file and we are going to release that through the epicenter in the next lecture. 13. MDO S3 L5 Create Android Beta Version: Okay, We have the APK file. Let's publish it to the center. In order to pass some APK files for the App Center, we need to create our annual service connection to the epicenter. So what I'm going to do is to go to the project settings. Then I have service connection, and then here I will add new connection. And it will be of type Visual Studio App Center. Next, we'll need API token. I can enter here App Center, and let's go to the App Center to get the API token. So I'm in my App Center. I'm going to create a new user token. I'm going to go to the Account, then account settings. Here we can have user API tokens. And I'm going to create our new API token. I'm going to name it azure DevOps, and give it full axis. And now on the screen you will see token similar to this. So this is a secret key that you shouldn't show to anyone. And I'm going to copy that and I can close this window. Okay, going back to the Azure DevOps. And here I will answer, insert my API token. Hit Save. Okay, we have our apps interconnection now. And now what I can do is to go to the Pipeline and edited. So I can add a new job which will distribute the APK file to the epicenter. So the first step is to add a new job. So job is android better? View will have some display name. Let's say this will be release under it. Andrea Yates, better. I will add one extra property to this task. And this is depends on condition. So if you hover over this parameter, it means that which jobs needs to complete before we can run this task. Basically, what we want to do is we need to wait for Android build tools to succeed and finishes in order to have our Sign APK file. And next check we want to have is that we want to run Android better task only if run tests is successful. Now I'm going to add these two tasks through the list of depends on tasks. So we have built Android and run tests. Okay, we are ready for steps for this, for this job. The first task we need to add is to download the signed APK file to this job. The reason for that is that these are separate jobs that execute on separate virtual machines. And the machine which builds and signs the APK file is different than the machine that will execute the release of Android beta task. If we hit our to the Azure DevOps documentation. So we can scroll down and see how to download artifacts. So we have Donald pipeline artifacts task. I can copy and paste that to here. Again, fix the indentation. And instead of web up artifact, I'm going to download the artifact we felt were built in the previous lecture, and that's the Android APK file. So we have published that. Okay, we have our Android APK file here. And now what I can do is to add the app center distributed task. It has some properties. So let's fill out old all of this for service connection. This is the connection we have defined previously. Now, up slog. This is the unique identifier from the App Center. And basically it is this, so it's organization name and Application name without the apps part. So let me paste this and remove the apps part. And this is the epsilon for this application, binary file pot. So we need to define the file path to the APK. If we go back to the documentation, you will see that the files are downloaded to the pipeline workspace and then the artifact name. So what I can do is to use that. And here I will just define the APK name bill, Bill version. We will leave that empty for now. And for a release notes. So we have two options. One is to enter some notes here, and that will be hard-coded to the YAML file. And then every time you need to edit the earliest notes, you need to change the YAML file, which is not too great. The other option which I prefer is to select release notes file. This is the file which I have put in my repository. So I have these release notes text, and it has some simple text, new cryptocurrencies added to the vallate. I am going to use this text file as release notes. What's also great about having a separate text file for release notes is that as you commit your changes, you can also make changes to this file and then commit that together with your changes. And this will automatically be published together with the new version of your app. So your beta testers and users can see what's new and what was changed in this current version. Let's go back to the pipeline and copy these release notes texts as release notes file and release the destination. So I will release that to the beta testers group. And what I need to do is to specify the destination ID. If I go back to the App Center and then groups and my beta testers in the settings. I can see the ID. I'm going to copy and paste that here. And I think we have pretty much everything. I will position here and add this task. Now, let's save this and see how this R1 will execute. So you can see both build Android app and running tests are executed and release Android beta is spending. Basically it's, it waits for build Android app and run tests to finish before we can release our Android better version. So once this is done, if I hit over to my email, I will get the epicenter email, that new version is available. And same thing if I go to the Releases. Here, I will see the new release that it's available. So what I can do is to go to my Android device and install this new release. Okay? I'm on my Android device and there is an application you can download and installed called App Center. And this will next is your App Center apps. And if I open the app Center, click on the crypto let app, then download the app. You can also see the release notes here. So this is the same earliest nodes from the release notes file. And I can download this application. Hit Install. So in some cases, Play Protect will complain that this is unrecognized developer, but we can just install it anyway. It asks me to send for scanning. Don't send. I can now open the app. And this is the app. Hopefully you can see the benefit of having the Azure DevOps. Now, in just five minutes, almost six minutes, we have successfully built the entry that iOS app executed all unit tests and release our new Android but aversion app to the testers. 14. MDO S3 L6 Separate Jobs Into Stages: As we keep adding more and more jobs to our pipeline, let's separate those jobs into logical divisions called stages. So stages are major divisions in our pipeline. Some example, all stages are, let's say, build the app, run the tests, or release bit aversions. In our case, for now, we are going to separate the pipeline into two stages. First stage is going to be for building the apps, and the second stage is going to be for releasing the beta versions of our app. Let's add the stages. So I need to add stages keyword first. And now I can continue and keep adding stages. So first stage is going to be for the building, the apps. The stage identifier is going to be built. Apps. I will also define display name for this stage. The stage name is going to be build the apps. Now what I need to do is to fix the indentation for all these jobs. Let's hit Tab one time. Okay, We have either one stage. So this stage will have build Android and iOS and run tests job. Now the job 100 beta for releasing 100 better versions. This is going to be another stage. So I'm going to create another stage named versions. In this stage, we are going to release both Android and iOS versions of our app. Display name of the stage, it's going to be better release. Inside our stage, we are going to have jobs. So I now need to fix the indentation here, display name. Jobs and job needs to be it didn't. This time some issues with this. I need to identify it to the left. And now we have our second stage for better versions. Now, this job doesn't depend anymore On build Android and run tests. Instead, we will have two stages and the second stage, bit aversions, is going to depend on the first-stage. And first stage is named build, build apps. So if we now save and run this biplane, we see that we have two separate phases now. First phase is build the apps, and the second phase is just waiting for the first one to finish. So in order to start. 15. MDO S3 L7 iOS Prepare Certificate and Profiles: The second part of our better alleles process is to release the iOS version of the app. In order to release that, we need to sign d APA file. And to do that, we need our certificate filed and provisioning profile file. Upload requires you to sign your apps with the certificate in order to tell the end-users iOS device who actually developed the app and provisioning profile. This is our file that tells to Apple was the name Bundle ID and which requirements dApp needs on the app, maybe needs CloudKit, maybe push notification, and cetera. The other important thing is to say that provisioning profile is valid for one year. In order to create certificate and provisioning profiles, you need to sign-in to the Apple developer account. And in order to do this step, you need to pay ninety-nine dollars to the, to the apple in order to have access to the Apple Developer Program. So let's go ahead and create a new certificate and provisioning profile. I'm going to click on the certificates in identifiers and profile. Before I can create a certificate, I need to go to the identifier's and create a new App ID, identifier for my app. So I'm going to register a new app ID. Continue. So this is the app description can be cripple at and the Bundle ID. We will get these from the infobase plist file. My info.plist file contains the bundle identifier. It's really important that you copy and paste this file as is, since this is case insensitive. And if you Typing wrong bundle identifier, this whole process won't work. Once I have my Bundle ID, I can paste it. Click continue. By default. You'll have selected Game Center and in-app purchases. If you need anything else, you need to specify that here. I don't need anything else, so I can register my app. Okay, I have my crypto let App ID. The next thing I can do is to create a new certificate. This is going to be Apple distribution certificate. And I'm going to click Continue. And now this asks me to create a new certificate signing request. And to do that, I need to go back to the my MacOS and create the certificate signing request file. If you need any additional help with this, you can always click on Learn More. And he in here you'll get the exact steps you need to perform in order to create a new certificate signing request. So as you can see, we need key chain, and in the key chain, we need to request this new certificate. So you can run the key chain axis. Then let's go ahead and create a new CSS file. For that, I go to Keychain access certificate assistant. Request our certificate from our certificate authority, my e-mail address and common name. It's going to be repopulated. And we are going to save this file to the disk. Hit Continue. And I'm going to save that to my DevOps folder. Hit, Done. Now I can go back to my Apple developer account and choose that file. Click Continue. I have marched certificate now and this will be downloaded to my machine. What I need to do is to create provisioning profile for publishing the app to the App Center and later for publishing the app to the Apple App Store. So let's add new profile. This profile is going to be for ad hoc distribution. So in order to release to the app Center new versions, we need to use the Ad Hoc provisioning profile. I will click continue Up ID. This is the crypto let App ID. I can also click Continue. It will select certificate. Again, Continue, select all my devices. Continue. And I'm just going to define the name for my provisioning profile. Generate. And also I can download this. Okay? We need one more provisioning profile. Dispersion profile will be four, distributing the app later to the App Store. So again, continue up by the, is again a crypto let continue. Certificate is this one which we created. Continue again. Let's create App Store, click, Generate, and I can download this provisioning profile as well. Now that we have our provisioning profiles ready and our certificate, the last thing I need to do is to install the certificate on my local machine. So I'll just double-click on the certificate and it will be installed. Once it's installed, I go back to the kitchen axis. Then I need to locate my certificate. Expanded. Select both entries, right-click export two items. Let's save it as certificates. Save and enter phosphorus for this file. I'm just going to repeat it a password and hit. Okay. So this pit well file, this is our certificates file, which we need in order to sign our app in the Azure DevOps. 16. MDO S3 L8 Create iOS Beta Version: Okay, I have uploaded mobile Parisian files that we have created in the last lecture and also the PI 12th file. So I have gone to the secure file, then, then browse and uploaded these three files. Also what I did is went to Edit and authorize those for use in oil pipelines. So I need to do that for all of three. And deterred is the Bidwell file. Let's make sure that authorized for use your own pipelines is on. Okay. Now I can go and edit the pipeline. And Cindi built IPA files. So what I can do is to collapse this, to have more space clubs, this, and that's enough for now. And in our job, build iOS. The first thing I need to do after the NuGet packages have been restored. He's still installed a Apple certificate and provisioning profile. I have tasks available for that. So the first one is installed Apple certificate. Certificate, name is certificates that and in my case, the password is same as the KeyStore passwords. And I can add that task here. Okay, I have my certificate installed. The second step is to install the provisioning profile. The provisioning profile comes from the Secure Files. And I will enter the name of my provisioning profile and add that to the YAML file as well. Okay, now for the actual Xamarin iOS task, which builds the app. So packaged app, we will now change this to true. Bill for simulator, this goes for false to false. Now we are building for iOS device and we need to add two new properties to signed the app. The first one is signing identity. I'm going to copy the swell you automatically. So this is the y-value you get automatically after you download the certificate file. So the name will be stored in this environmental variable. Same thing for a provisioning profile ID. Azure DevOps provides you with a UUID of the profile LD, which we have downloaded. So you need to use these variables once you have installed April certificate and provisioning profile. And now, after this task has been built, we can actually go ahead and publish the result of build. So I can go to build Android and just copy and paste this task which will publish pipeline artifacts. I need to fix the indentation. Artifact name is iOS, IPA and the target but is the part where the IPA ends up. This is in bin folder, iPhone release folders. So this is where you can find your cripple it, that iOS IPA. Okay, we have now built and signed the iOS app. The next step is to actually publish the app to the epicenter. So I can follow these steps. Above that, we'll add on new job called iOS better. Display name can be release iOS better. And we will have two steps here. So the first step is to actually download the pipeline artifacts. Again, copy and paste that from above. And in this case, we are downloading iOS IPA artifact. And now, instead of distributing to the Android, I will distribute to the iOS App, Center app. So cetera, endpoint stays the same. Upslope fog is slightly different. So in case of iOS, It's script to let slash script talent, I need to remove this file is being the pipe clamp pipeline workspace. And this is the grip to let. Ios dot IPA, release notes stays the same. And distribution group ID, again, I need to go to my groups for the iOS app tools, better testers. Then go ahead in the settings and copy this ID. And hopefully that should be it. So I will now save and run this to see what's the result. And the build is finished now. And we see that everything has passed. So we've now released both Android and iOS beta. And if we go to the iOS application now and just refresh the screen, we will see that we have a new release available. So what I can also do is to go to my iOS device and assigning to the App Center and then release and use this app. 17. MDO S4 L2 Increase App Version Automatically: Up until now, we have been building and releasing beta versions that have the same burden. So if you could take a look at my earliest history, you will see that the old releases have the same version. In order to push new versions to the stores, we need to keep implementing this number with every build. And let's go and change that in this lecture. So I'm going to back to the pipeline. And what I'm going to use is the feature of the Azure DevOps called marketplace, where I can browse and add different extensions for Azure DevOps. So this is our collection made by the community and most of them are free. I'm going to search for mobile app tasks. Select the first one and install this package called mobile app tasks for iOS and Android. This is an extension from James Monte magno that will help us to increase our app versions quickly. Let's click on get it free. And we need to add it to the current organization. Click Install, proceed organization. And now I can use it in my pipeline. I'm going to navigate to the crypto asset pipeline, hit Edit. And here I have some new options. So the first option is Android manifest numbers. And this is going to increment our version a number within this built. The first parameter we need to provide is AndroidManifest file path. Let me just quickly navigate to the Cryptologic dot android to the properties. And this is the manifest file. So everything after muster in the URL, I'm going to copy that and paste that here. So this is the file path to the Android manifest. For Version code format, we have two options. First option is you that user-defined, which can be built ID. And second line is unique timestamp. In seconds, I'm going to choose your user-defined Build ID and select these Build, Build ID variable. So this is a variable that is automatically provided in the pipeline. This is a unique ever increasing number that identifies the current pipeline run. And for version name, I can leave this also as is. The last option is print file. So this is an option you feel want to take a look during the run, how the manifest file looks before and after, we have increased the version number. Okay, We have populated everything what we need. And let's go. And before Xamarin dot Andre task and this task, I just need to fix the indentation and I am done with the Android version increase. We need to repeat the same process for the Xamarin. Ios. I can search for iOS. And then here I have the similar option called iOS bundle version number. Again, I need to find where the enthalpy list file is located within the repository. I will go back to the root of my repository, then to triploid that iOS. And here is the infobase list file. Let me just copy and paste dot here. The rest of the thing scan stay as is in order to be aligned with the Android version. So we are going to have same version for both iOS and Android apps. Let's position our cursor before the Xamarin iOS task and add this task here. I can now hit Save. And let's see how this looks like. Okay, the bill has completed. And if you just take a look at the IRS bundled version, so you will see the detailed output and you see the was the new version name. So it's 1.88 and the build number is 88. So the same ease for Android. And if we go to the toilet Android App Center, we see that we have one new release and that's the same version. Also, if we go to the iOS part of this up, we will have this same version. 18. MDO S4 L3 Setup iOS Production Release (App Store & App Center): In order to release our iOS production version to the end users, we need to go to the App Store, connect, and create our new application, which we will submit for review. And hopefully after review is done, the end users will have access to the production version. So in my developer dot account, I can go to the App Store connect. The other options would be to go straight to the App Store connect dot You will get the same screen. Then go to my apps and I need to create our new app, which I will release. This is going to be iOS app. Up name is going to be crypto. Let primary language is English, UK Bundle ID. This is the App ID we have created previously. And this is crypto let App ID SKU. This is identifier within the App Store connect. So I can just enter the same name here and click on Create. Now, I need to fill out all this information. But before I do that, I will just go to the pricing and availability to the free tier fraud for my app and make it available in all countries. And hit Save. I also need to fill out all this information. I have populated all the necessary information. So let's just quickly go and provide a short summary. In the information tab. I have populated name, subtitle, and privacy policy URL. You need to provide these privacy policy. And in case you don't know how to write this privacy policy, there are lots of online privacy policy generators. Just type something like privacy policy, mobile app generator. And you will get our privacy policy generated almost immediately. After you generated that policy. Just make sure to make the necessary changes to that auto-generated policy to better suit your specific use case. Next, so we have this journal information and category is finance and education. And this is more or less done on what we have on up information for the specific version. So we see how we are currently preparing to submit version 1. The App Store. I have provided necessarily screenshots. So you need to provide screenshots for iPhone 6.5 interests five-point five, and I bet to iPad versions. Next, I have entered some keywords, so these are necessary to have Appstore optimized. So if someone types in crypto that they find your app support URL. So this is a web page where users can find more information about your app and short description. So this is our distribution that user will see in the App Store before they tried to download your app. What we have next is just copyright. So you get the example of the copyright you need to submit here. Next. These are some contact information. Obviously, these two are dummy data for now, but I'm going to change that and signing the required. So if you need to provide some kind of test demo account to the apple review team. Then you enter here username and password and provide some additional notes on how to test your app. I don't need to provide this, so I'm going to uncheck this. And here you can select how you want to release your app. I'm going to release this automatically. Then finally, other identifier. So if you are using other sizing identifier, you need to specify that I don't use. So I have selected no, it doesn't. And for distributing production versions of the iOS apps. I'm going to use the App Center. You have an option to add new task to the pipeline that goes directly to the App Store. But there are two reasons I choose to use the app center. First, if I use App Center, I have in one place detailed overview of all of my earliest versions, so both Beta and production versions. So under distributed and releases, I have an overview of all released versions. And second, it's lot easier to set up production, production, distribution using the App Center. The task that goes straight to the absorb connect need some additional configuration, which is really hard to get right. And with all that being said, I'm going to create a new connection in the center to the App Store. So we go to distribute and then stores. And then I can connect to the store. Here I choose App Store, connect and add my account. I have added my account. Now I can click on Connect, select my team, and use the crypto let app. Let's assign this. In case you get on error that Nobels exists for this app in App Store Connect. App Center only supports our grading existing apps. What you need to do is to submit your initial version, let's say using transporter tool or something similar. And then you can try again and then hit the Assign button. And in case you were wondering how to submit your initial version to the App Store. So let's go to the Visual Studio and click on the project, right-click archive for publishing. And then this window will open. You get the version and code, then sign and distribute. We need to distribute this to the App Store. So we have option to save to disc and published to the App Store. I'm going to click Next. And I can export that the APA file without the uploading directly to the App Store, connect and use the transporter tool to upload the IPA file. So I'm going to click Next. This is just an overview. Next, publish. And then hit Save. And you're up, is going to be published to the desktop, okay? One thing you need to be sure is to have the right signing options. So if you go to the Options and iOS bundle signing, so you need to have the distribution certificate and correct provisioning profiles. In my case, I'm using App Store provisioning profiles. If you remember, this is the provisioning ProPublica created a few lectures ago. So I need to select these two. And in case you don't have these provisioning profiles, you need to install it first to the, to your Mac machine. That's really simple to do. You just find your provisioning profile for App Store distribution and double-click on it, and that's it. So once you have your IPA file, now you can use a tool called transporter. So this is the free tool called transporter. And drag and drop your IPA file and heat deliver. And your app is going to be delivered to the App Store connect. Then if you go to the App Store connect and to your application and click activity. Here, you should see this build delivered. In case there are some issues with this bill. You'll get an email explaining was the issue and how to correct this. So I don't have any issues with this built. Which means I can go back to the App Store, scroll down, select that built. Just answer colleague Don. Safe. And I can submit that for review and hopefully everything will be okay. In case you have any earth, you need to correct them. So I have failed to submit the content rights in the F information. So I'm just going to enter that. And also I need to fix age rating. So I need to feel all of this. And I can finally submit these to review. After you have successfully submit your first version to the App Store, connect manually. Now you have the option to connect that with the App Center. But when you want to click on Assign the next error, that specific password is required for two-factor enable the counts. So you need to add this specific password in case you are not familiar with generating specific passwords. Here you have where he detail link on how to do that. Just follow these steps and generates this password. Now click on Update and click Assign. We have now successfully connected App Center with the App Store. You have the option to release to production. Or if you want to use the test flight, you can submit your new versions to the test flight. 19. MDO S4 L4 Setup Android Production Release (Google Play & App Center): Now let's see how to create a new app for publishing to the Google Play. In order to create a new app, I need to head to play dot slash console slash developers. In order to gain access, I need to pay $25 to Google. And once I'm in the Google Play console, I can hit Create app. Up name is going to be crypto. Let, let's say demo. Since I already have cripple it at default language is English, United States, and this is AP, and this is free app. I need to confirm these policies and heat create app. Once I created the new app, I will get access to this dashboard. And I need to follow these steps in order to complete the AP setup. So I have several tasks to complete. First one is up excess, so everything is available. Let's click Save back to their words and similar with other steps. So I need to fill out all these steps. I have my rating now. Provides the privacy policy URLs. So this is the same URL as used in the iOS version of the app. So I'm just going to save this and go back to the app content. So for ads, I don't contain any ads, so I will select, know. If you have ads, then you should select Yes, my app contains, adds back to content, target audience. So let's say 18 and over. Next. Next, save this back to app content again. So we have ugly green checkmarks here, here, here, here. So this is all fine. We can't go now back to the dashboard and select App category and store listing. So App category, this category, Let's say fell in finance. Tags. Let's say cryptocurrency apply. Email address is same as before. Phone number and website are optional. So I'm going to skip that for now. And for external marketing, I will just leave it by default. It's turned on. Let's go back to the dashboard and setup store listing. So many short description and full description. Also, we need some graphics. So the first thing we need is up icon. And you can see the requirements are specified here. So I'm going to upload that now. Next, these feature graphic. You can also see the requirements are beneath. And finally, you need to provide some form screenshots. So between 28 forms screenshots are required. You can also choose to upload seven-inch tablet screenshots or 10 each subscriptions. I'm going to skip that for now and hit Save. Okay, back to the password. And now I have steps for releasing our app. The final step, which we are interested in, IIS publish your app on Google Play. So I need to select countries and regions and create a new release. After that, I can review and roll out the release. So countries and regions, I need to add them. For me, it's fine to all of them to myList. So 150 one. And now I can go to releases and create a new release App Signing. So continue. And now we need to upload AV bundle or APK. In order to generate the APK file. I go, I said the triplet that Android as start the project, then set the mode to release. Then right-click and archive poor publishing. And you will get these archives window again. I have this initial APK ready to be signed. So I need to sign it. I will sign it using the Ad Hoc, which means I would like to save this to disk. And here I will select the crypto key store that I have created before. So click Next, publish and save this to desktop. Once my app is ready to go, I can upload the dot APK to the Google Play Console. Once I upload a BK, I will get this release all of you and released name. I also need to submit the release notes. So crypto violet on your device, save all the changes and review release. In case I have some kind of warnings and messages and errors. I need to check and fix them. But if there are no obstacles, I can hit start roll-out production. Since I already have the crypto that application in my Google Play Console, I'm not going to click that, but you should definitely click Start, roll out to production. So once we have done with the Google Play Store and we have the app in the Google Play. Now we can go to App Center in the distributed and store section and connect App Center with the store. So I'm going to connect it with Google Play. But in order to connect it with Google Play, I need to have a security token, which is a JSON file we need to generate next. In order to do that, I'm going to go to settings developer account API axis. And I need to create our new service account. So hit Create service account. And it tells me I need to go to Google Cloud Platform and create a new service account. So I'm going to do that. It's going to Google Cloud Platform, create new service account. Let's name it cryptoclidids publishing. And this is for cripple at publishing. Hit Create. For all I can select Owner. Hit Continue. And then Okay, Going back to the API Access, Let's refresh service accounts. So I need to grant access to my new cripple that publishing service account. Grant access. So you can also have expired date on this axis. I'm not going to do that. And now I'm going to select admin, all permissions and invite user. Once I'm done with that, I can go to Google Cloud Platform and click on this new service account. And here I can create new key with JSON format. Let's create that. And this will be downloaded automatically. Goes. Now I can go to App Center and upload this JSON file. Let's connect. And here I need to enter my app package name. This can be found in the manifest file under package name. So I can just paste that here and hit assigned. And now we can see production, beta and alpha release channels. 20. MDO S4 L5 Create New Release Pipeline: In order to release production versions of the app, we will create our new release pipeline. So under Pipeline and have releases option, and I'm going to click on that. So what is our earliest pipeline? This pipeline is a tool we use to publish the artifacts we have built in the build pipeline. The production release pipeline takes those artifacts and make sure they end up in production. Let's create our new pipeline by clicking on new biplane. So here we have different templates we can use. So let's say we can have Azure App Service deployment. We can deploy our app. We can deploy no dress, et cetera. For now, I'm going to choose the empty jump and click to hide this. The first step is to pick an artifact. We want to have us the start of the Release Pipeline. I'm going to click on art. Artifact. Project is crypto wallet and source is build pipeline. The pipeline is the cryptoclidid pipeline. We are going to use the latest version and source areas. This is the unique identifier for the artifact. I'm going to rename it, to cripple it and add. Next. We have this lightning bolt. This indicates when the release pipeline He's going to be triggered. So by default, continuous deployment trigger is disabled, which means that we need to manually trigger the release pipeline. I'm going to click on Enable and close this. Similar to what we have on the Build Pipeline. We can also have different stages. So we can have QA, production, etc. For this mobile app, I'm going to define three stages. The first stage, I'm going to rename this to QA. So this is the stage which will be first heat once we have new Beta version released and we have everything ready to publish to the production. You can see that every stage can also have different pre-deployment condition. So this is our condition that must be satisfied before we hit the stage. So we can have some artifact filters, some schedule or some, or some approvals. This means someone needs to approve deployment to this stage. And gates. These are some also different condition we can have. So we can invoke rest API function for example. And if the invoke is successful, then and only then after that, we can continue with the release pipeline. For our QA stage. We are going to remove this agent job. And instead, I'm going to add our new agentless job. The only purpose of this stage is still defined, our new post-deployment approval. And we are going to ask for approval from the QA team to approve better version of the app so that we can release to production the latest version. Since the only user I currently have is my iron and going to add dot. And I can let say specify some time out after which this particular release it's going to fail. I'm going to set this to seven days and leave rest unchanged. And I think I can do is to add more stages. This is also going to be empty job for now. And I'm going to name this stage Google Play. So within this stage, we are later going to define some jobs which will automatically deploy the app version to the Google Play. This agent job can also have all the tasks we have previously seen in the build pipeline and some additional related to publishing. To the production service. For now, I'm not going to add a new task, but we will later use the App Center distributed in order to release our new production version to the Google Play. And finally, since we have Google Play, we also need to add a new empty job for Apple App Store. And we want this Apple App Store to happen after stage Q0. So that we can then release in parallel both Android and iOS version of the app. Let's save this new release pipeline and see how this will be triggered. I need to go to the pipelines and run our new pipeline from the master branch. After the build is done, I can go to releases. And I see I have new release created, really a number tree. And it's currently in the stage QA. It says it has approval pending on me. So if I click on the new release pipeline, I can see that a release is the impending approval, so it waits for my approval before exiting, continue and deploy the version to the Google Play and Apple App Store. I will also get an e-mail stating the same that I have new pending approval. If I go to my inbox, I will see that it have new post deployment approval pending For at least number three. And I can view this approval. So if I click on Logs, I can see approval pending and I can approve or reject the release. I'm going to approach the soleus. So that's released, can continue. And now go to Google Play and Apple App Store. Stages are in progress at the moment. They are empty, so they should finish pretty soon. They are just downloading the artifacts. And after that, I think they should be completed. One final note on this pipeline is that you can also create new release manually. So you can select which stage you want to trigger. And you need to define which artifact you want to have deployed to rule this release, enter some description, and then you can hit on Create, and the same process is going to be triggered. So QA, Google Play and Apple App Store stages. 21. MDO S4 L6 Publish to the Google Play: Before we can release the Android version of the app to the Google Play store. The first thing we need to do is to make available release notes as an artifact in order to submit the release notes to the Google Play. So what I'm going to do is to edit the current pipeline and publish the new artifact for early cenotes, I can hide this editor. I'll just navigate to the YAML file after Android signing and published pipeline artifact. I can copy this task. Fix the indentation. And the target pot which we are going to publish is the release notes. Text and artifact name can be released notes. I'm going to fix the exchanges and just make one built in order to have this artifact available the release pipeline. After the build is done. Then we can go to the Release Pipeline. And I'll add a new task to the Google Play stage, which will deploy the app to the App Center and to the App Center, to the Google Play. But first, let me just rename this to grip the left release. And save that to rename pipeline. Okay, And now we can go to Google Play. So we have agent job. The thing we need to do here is to have a specification. What kind of demands that we have from this agent. I'm going to say that it needs to have latest macOS. And after that, I can add a new job for UPS center distributes. Let's add that. And now we need to fill out the remaining settings App Center series connection. So this is the connection that we have used previously. So this is Cryptoclidus slash script to let their Schwann and binary file of pet. Here we have our helper, this pop-up window, where we can just go ahead and select the APK built version. I'm going to leave this empty and release notes file. So this is what was included before. This is within her release notes folder, really snows text. And finally, we are going to release these to the store in order to get the destination ID. For the Google Play Store, what we need to do is to go to the App Center API. I'm going to paste this link to the ER sources of this lecture. And pink, the stores least endpoint. You can see this is the get method. To get the distribution stores. The first thing I need to do is to make sure I have entered the API token. This is the API token we can generate. If we go to the epicenter, then use our API tokens. And here you can create new API token. I have already created anew Open API token, and I'm going to paste that here. Now authorize. And I can close this window. Owner name. I need to click on the trial, try it out. Owner name. This is the name of the organization, app name. So this comes from the URL. And this is cryptoclidids. That one. Again, if we go to the App Center, then to the organization than Android. And this is the organization name, and this is the happening. We go entered API token and the response is in this format. So this is JSON and we are interested in ID, which is in form of a string. If I execute this, I get alpha, beta and production distribution stores. I need to copy the ID of the production and paste that to the destination ID. Now, I can save this, let's say the least to the Google Play. Okay? And go to the pipelines. And heat are new pipeline. And I have new release ready. This is the release number six. Go to the oval, will play stage. I will see that the job has been executed and this deploy APK to the center has succeeded. I can verify that this deployment is find by going to the epicenter. Here. I see I have the new release 1906 available both for beta testers. And this went to production. To see that this has hit D production. I can go to the stores and choose the production. I have the same release here. It says it has been submitted. And also, if I go to the Release this overview in the Google Play Console, this is the new interface currently in better. But if I go to the latest releases, I will see that I have the production version of 1.96 also ready to be released to the production. It will take some time by Google to review these versions before they can be released automatically. But once Google who reviews them, there will be automatically published to the Google Play. 22. MDO S4 L7 Publish to the App Store: The last job we need to do is to release our new iOS version to the Apple App Store. So I can click on the release pipeline, then go to Edit and configure the Apple App Store stage. And the moment we have this agent job. And also I'm going to change here specification. I'm going to require the latest macOS. Okay? Now I can add some jobs here. One problem that we have with our current APA file is that it was signed long, long time ago with the ad hoc provisioning profile. We need to change that and signed that file with the app store distribution provisioning profile. In order to have the task for resigning the IPA file, we again needs to need to use the marketplace extensions. And the market is extension we need is the Apple App Store extension. Just heats own, get it free. And once it has been installed, you'll have it available in this list of tasks. So I'm going to find it by clicking on IPA resigned. Okay. Ipa file. And this is the IPA file we have built entitlements. I have also edit the build pipeline to include these entitlements. Similar what we have in the previous lecture where we had to publish the release notes. Now I have found the entitlements that is file in the triplet. That iOS project just created a new task that has published that as well. In order to sign the IPA file, I need to download P2 and provisioning profile to the current agent. At this stage, I need to add some additional jobs. This is going to be for installing Apple certificate. This comes before resigning IPA file. I need to choose the certificate. This is the certificate P2P file, and the password is the KeyStore passwords. I'm going to sign I'm going to store that to do a temporary Keq chain. After the Apple certificate has been installed. I also need to install the provisioning profile. So I'm going to add task and install on a provisioning profile. Provisioning profile is going to be App Store mobile provisioning profile. Let's just save this as a temporary step. So comment is going to be at provisioning. Okay? Now we have everything to resign the APA file and I need to select certificate file and provisioning profile. I'm going to use identifier Apple certificate signing identity in order to resign the APA file. So this is the variable that is available after we have used the install on APL certificate. And also for the identifier. I'm going to use Apple Prof profile UUID. Again, this is the variable that is available to us after we have used the step installed an apple provisioning profile. So we just need to enter these two values and we are good to go. After we reassign that IPA file. We can add new prep center distributed task. Let's add that and configure these parameters. Up. Slug is cryptoclidids slash kryptonite binary file part this is the APA file. This one. We'll version empty and release notes file. This is also available here. So I'm going to click on the text file and store ID. Again, I have used the open API for the App Center to get the destination and D, this time this is the, this is the production ID. So I'm just going to paste DID here. Hit on Save, enter text, deployed to the Apple App Store. Ok. And now we can trigger another build. One thing that needs to be done is to define a new variable for signing the APA file using the new certificate. So inside variables, I have divided our new variable called KeyStore, KeyStore passwords. So this is a secure password and the scope is the whole release. You can see that you can limit the scope also by stages. Great news. The release has succeeded. Both Google Play and Apple App Store have been deployed. If we go to the Apple App Store, we see that IPA file has been resigned and that we have deployed the IPA file to the App Center. So if I go to the releases, I can see that I have 1.100 released both to better testers and production. Also, if I go to store, I can see that release has been released. The only issue here is that it has status failed. So if we examine this more closely, we will see that something went wrong under under the hood. And what I can do always is to download the fast lane lock in order to investigate this further. So I will open this. Now. You can see that in the background, this process is using the phosphine tool. If you are not familiar with the fondling tool, this is a set of tools for deploying mobile apps to two stores and for different signings. So you can use it both for iOS and Android. And if we scroll down through the logs, we can see that we have one issue that we haven't provided. Value for attribute. What's new. I think this might be some kind of error in the fast lane and centered communication. Since if we take a look at the release nodes within these release 18, it says that we have released notes. I have set this to minor fixes. Also, if I go to the App Store, connect to the crypto let application. You can see that what's new indeed is missing. So I can enter this here. He'd saved, but other things should be pre-populated. So the build has been processed and included here, and everything else is as before. So in case you have some kind of errors while deploying with the App Center, you always need to check what is the error. And then if nothing major occurs, then you can just fix what's the issue and submit the app for review. And that's it. We have successfully deployed new production version for review.