Xamarin Android code signing

Deprecating Xamarin on Bitrise

We are deprecating our Xamarin support on Bitrise from the end of October 2021 and remove Xamarin support entirely from Bitrise in January 2022. What does this mean for Xamarin users?

  • Xamarin Steps: You can continue to use the deprecated Xamarin Steps in your Workflows, but the Xamarin Steps won’t be listed in the Step Library of the Workflow Editor.

  • VS stacks: We won’t continue updating the VS stack and highlight it as deprecated.

  • Project scanner: Our project scanner will not recognize the Xamarin platform anymore. In January 2022 we will fully remove Xamarin support from Bitrise.

  • No Xamarin Steps will be present in Workflows or in the Step Library. The VS stack won’t be selectable from the Stack Library and builds will fail on that stack.

You can specify the code signing configuration for your Xamarin Android project by creating a signed APK in Visual Studio.

  1. Open Visual Studio.

  2. Select APK or AAB as package format in your Android project config in Visual Studio. For more information, check out Microsoft's blog post.

  3. Double click on your Xamarin Android project to open Project Options.

  4. Select the Android Package Signing in Build group.

  5. Select your configuration and platform in Configuration - Platform.

  6. Check the Sign .APK file using the following keystore details.

  7. Fill out the signing information.

You can not use Environment Variables in your keystore path in your Xamarin project! The keystore path has to be relative to the folder of your Xamarin Android project. You can also use an absolute path.

You can use the same path on your local machine and on bitrise.io by putting your keystore into your repository.

Gitignore your keystore

Don’t forget to gitignore your keystore in your repository!

Since your keystore is gitignored, you have to upload your keystore to the GENERIC FILE STORAGE of Bitrise and download it to the same location in the build.

  1. On the Dashboard select your app.

  2. Click the Workflow tab to open the Workflow Editor.

  3. Click Code signing.

  4. Scroll down to the GENERIC FILE STORAGE field.

  5. Type your Environment Variable name here in the first field. In our example, we use XAMARIN_KEYSTORE.

    Xamarin Android code signing
  6. Upload your keystore file in the Upload file field.

    Your Environment Variable (for example, $BITRISEIO_XAMARIN_KEYSTORE_URL) will be automatically available with the download URL of your keystore file.

    Xamarin Android code signing
  7. Navigate back to your workflow.

  8. Insert the File Downloader Step before the Xamarin Archive Step. The File Downloader Step will get a Download source url input.

  9. Type your Environment Variable, for example, $BITRISEIO_XAMARIN_KEYSTORE_URL in the Download source url field.

  10. Set your keystore path in the Download destination path.

Xamarin Android code signing

Bitrise keystore path

Ensure that your Bitrise keystore path is the same as your local path relative to your project root. For example, if keystore.jks is in your project’s root, then your Bitrise keystore path has to be $BITRISE_SOURCE_DIR/keystore.jks.