.NET MAUI iOS – Azure Pipelines error: ‘x’ is not available in iOS 16

This content has 12 months. Some of the information in this post may be out of date or no longer work. Please, read this page keeping its age in your mind.The Error: The error message suggests that the ‘UIKit.UISceneSessionActivationRequest’ type, used as a parameter in ‘UIKit.UIApplication.ActivateSceneSession,’ is not available in iOS 16.2 and was introduced in iOS 17.0. This discrepancy indicates a version misalignment in the development environment, specifically with the iOS SDK and Xcode. Root cause The root cause of this error lies in the version of the macOS image used in the Azure Pipelines configuration. By default, the ‘macOS-latest’ image is pulled, which corresponds to macOS 12 (at the time of the blog post). However, the .NET MAUI app with Azure Pipelines requires macOS v13 to work seamlessly, as it aligns with the necessary dependencies for iOS development. Resolution To resolve this error, developers need to update the macOS image specified in the Azure Pipelines configuration. Instead of using ‘macOS-latest,’ the configuration should be modified to use ‘macOS-13.’ This ensures that the appropriate version of macOS is utilized during the build process, addressing the compatibility issues with iOS 16.2 and the required UIKit types. Step-by-Step -Open your Azure Pipelines configuration file (typically named azure-pipelines.yml).-Locate the section where the macOS image is specified. It might look something like this: -Update the image reference to ‘macOS-13’: -Save the changes to the configuration file.-Commit the updated configuration file to your version control system (e.g., Git).-Trigger a new build in Azure Pipelines,…

Azure DevOps: Setup private NuGet feed with CI

This content has 3 years. Some of the information in this post may be out of date or no longer work. Please, read this page keeping its age in your mind.In case you need a private NuGet feed, you can do it in Azure DevOps. This can be handy for businesses reusing their code between several codebases. What will contain the example In this tutorial, I will show you how to share code through NuGet packages so that it can be used in multiple projects. The Example will walk you through the game engine of an IDLE game. IDLE games are games that do not require much user interaction. The point of games is that they run or produce even when the user is not playing them. The goods produced offline can eventually be used by the player, to upgrade producers or to buy more producers. The game engine is developed on the IDLEGAMEENGINE branch. Different games, such as a restaurant game or a programming game, can use this game engine. The games have a common logic of operation, only the story of the games differs. This design helps in development to fix bugs by only having to fix the bug in one place and it will be fixed in all games. Step 0: Create your shared code I will not go into details about the implementation of the game engine in this tutorial. The point is to create source code that you want to share with other source code….

Complete CI/CD tutorial for Xamarin Android with Google Play publish in Azure DevOps | Part 2.

This content has 4 years. Some of the information in this post may be out of date or no longer work. Please, read this page keeping its age in your mind.If you haven’t seen part 1, click here, and start build up your CI/CD pipeline now. Part 2 Contains: Configuring build with creating signed APK, and making artifacts from it Setting up branch policy to master Configure some magic Let’s go back to Pipelines. Edit your previously created pipeline by clicking the three dot on the pipelines row. CI is based on cloud machines hosted somewhere over the world. This computers called as agents. They are used to follow your instructions, defined in the yml file. The base Xamarin.Android yml is only to build your code. But we will make some additional steps in order to create a signed APK of every build. Follow up, to complete this setup. Recommended branching strategy for this is to keep a development branch, and pull request your feature branches to it, and finally pull request the development branch to the master, and keep your master is always at your production version. The figure below shows visually this method. Source: https://dzone.com/articles/feature-branching-using-feature-flags-1 Create a signed APK or bundle from every build First, set up some variables for this pipeline. You will find a Variables button on the right top of the tab. Click on it. Let’s add a new variable by clicking the “New variable” button. We will need 4 vars. Remember, that i told…

Complete CI/CD tutorial for Xamarin Android with Google Play publish in Azure DevOps | Part 1.

This content has 4 years. Some of the information in this post may be out of date or no longer work. Please, read this page keeping its age in your mind.This tutorial will drive you through setting up a great CI/CD pipeline for Xamarin Android in a fully hosted Azure DevOps enviroment. Part 1 contains: Creating an empty Xamarin.Android build pipeline Uploading keystore file to secure files Start with some code I have added some basic code to my demo repository. It is a boilerplate Xamarin Application, with no additional customized code. If you have code in your repo, make sure it builds successfully. Create your first pipeline On the left side menu, go to Pipelines/Pipelines. This menu will show up a welcome page, to create new pipeline. Click on ‘Create Pipeline’ button, or if you have already created your first pipeline, find a button to add a new one. On the next page, a wizard will guide you through the basic setup. If you have your code in Azure Repos, click the button for that. Select your repository where your Xamarin Android code lives. On the next page, you can select a template to create your pipeline yml. Let’s choose Xamarin.Android. If you want, you can rename your yml file. Pipeline files will be placed in your repository root by default. YML file extension stands for YAML files. Review your newly created file, how it looks like. Luckily, you do not have to write yaml too much, but good…