Create and publish a phone app with Xamarin and Prism Forms

What is is?

Steps:

  1. Create Xamarin.Forms app from Prism template
  2. Modify the template to show a browser and load my webpage
  3. Build app
  4. Publish app

1. Create Xamarin.Forms app from Prism template

2. Modify the template

Modify the template
– Change splash screen image
– Load only a webpage
– Block all external webpage calls and navigation
– Navigate in my webpage on back button press
– Remove the titlebar to show the webpage full screen

3. Build

https://docs.microsoft.com/en-us/azure/devops/pipelines/ecosystems/xamarin?view=azure-devops&tabs=yaml

Sign

Build app bundle

https://damienaicheh.github.io/xamarin/azure/devops/2020/02/03/generate-android-app-bundle-xamarin-azure-devops-en.html

# Xamarin.Android
# Build a Xamarin.Android project.
# Add steps that test, sign, and distribute an app, save build artifacts, and more:

trigger:
- master

pool:
  vmImage: 'macos-latest'

variables:
  buildConfiguration: 'Release'
  outputDirectory: '$(build.binariesDirectory)/$(buildConfiguration)'

steps:
- task: DownloadSecureFile@1
  name: keyStore
  inputs:
    secureFile: 'upload.keystore'

- task: Bash@3
  inputs:
    targetType: 'inline'
    script: 'msbuild -restore $(Build.SourcesDirectory)/AllDance.Mobile/AllDance.Mobile.Android/*.csproj -t:SignAndroidPackage -p:AndroidPackageFormat=aab -p:Configuration=$(buildConfiguration) -p:AndroidKeyStore=True -p:AndroidSigningKeyStore=$(keyStore.secureFilePath) -p:AndroidSigningStorePass=$(storePass) -p:AndroidSigningKeyAlias=upload -p:AndroidSigningKeyPass=$(keyPass)'

- task: CopyFiles@2
  inputs:
    contents: '**/*.aab'
    targetFolder: '$(build.artifactStagingDirectory)'
- task: PublishBuildArtifacts@1

Comments are closed.