Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,336 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
In a Xamarin.forms project I am trying to create the build using below YML script. I have added the tasks to install both Appstore distribution and APNS certificate .p12 file. whole script is working fine, Build is working fine only push notifications are not working, below is the script I am using:
stage: iOSBuildProd
displayName: iOS Build Prod
dependsOn: iOSBuildQA
pool:
vmImage: 'macOS-latest'
jobs:
- job: iOSBuildSolution
displayName: iOS Build Solution
steps:
- script: sudo $AGENT_HOMEDIRECTORY/scripts/select-xamarin-sdk.sh 5_0_0
displayName: 'Select Xamarin SDK version'
enabled: false
- task: InstallAppleCertificate@2
displayName: installing Build certificate
inputs:
certSecureFile: '$(certAPNSFile)'
certPwd: '$(certificatePassword)'
keychain: 'temp'
deleteCert: true
- task: InstallAppleCertificate@2
displayName: installing Build certificate
inputs:
certSecureFile: '$(certDistributionFile)'
certPwd: '$(certificatePassword)'
keychain: 'temp'
deleteCert: true
- task: InstallAppleProvisioningProfile@1
displayName: installing provisioning profiles
inputs:
provisioningProfileLocation: 'secureFiles'
provProfileSecureFile: $(AppStoreProfileName)
removeProfile: true
- task: NuGetToolInstaller@1
displayName: 'NuGet Installer'
- task: NuGetCommand@2
displayName: 'NuGet Command'
inputs:
restoreSolution: '$(solutionPath)'
- task: XamariniOS@2
displayName: 'iOS Build'
inputs:
solutionFile: '$(iOSSolutionPath)'
configuration: '$(solutionConfiguration)'
args: '/p:IpaPackageDir="$(outputDirectory)"'
packageApp: true
buildForSimulator: false
runNugetRestore: true
signingIdentity: '$(APPLE_CERTIFICATE_SIGNING_IDENTITY)'
signingProvisioningProfileID: '$(APPLE_PROV_PROFILE_UUID)'
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: '$(outputDirectory)'
ArtifactName: 'prodStage'