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

Viewed 54

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'
0 Answers
Related