Push notifications are not working in the iOS build created using Azure Pipeline

Suyash Sadh 1 Reputation point
2022-09-15T11:56:28.55+00:00

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'  
Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,336 questions
Not Monitored
Not Monitored
Tag not monitored by Microsoft.
38,663 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.