title: How can we configure CI for the iOS app with App Extensions
body: <p>I have tried multiple things in Azure DevOps (VSTS) to create CI for the iOS app but turns out that Azure DevOps <a href="https://developercommunity.visualstudio.com/content/problem/383129/build-ios-app-with-app-extensions.html" rel="nofollow noreferrer">doesn't support</a> the apps that have App extensions. Is it really the case?</p>
  <p>I'm using the <a href="https://documentation.onesignal.com/docs/ios-sdk-setup" rel="nofollow noreferrer">OneSignal Notification Service Extension</a> in our project which is dependent on the main target. So, when <a href="https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/build/xcode?view=azure-devops" rel="nofollow noreferrer">Xcode task</a> tries to sign the app an error occurs related to the build identifiers as the Xcode main target has a <strong>different</strong> build identifier than OneSignalNotificationServiceExtension's build identifier.</p>
  <blockquote>
  <p>❌  error: Provisioning profile &quot;MainTargetName&quot; has app ID &quot;com.xyz.-&quot;, which does not match the bundle ID &quot;com.xyz.-.OneSignalNotificationServiceExtension&quot;. (in target 'OneSignalNotificationServiceExtension' from project 'ProjectName')</p>
  </blockquote>
  <p>I'm using an <a href="https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/install-apple-certificate?view=azure-devops" rel="nofollow noreferrer">apple certificate</a> task to install the certificates on the Microsoft hosted agent and similarly using the <a href="https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/install-apple-provisioning-profile?view=azure-devops" rel="nofollow noreferrer">provisioning profile</a> task to install the provisioning profiles. It looks like the <strong>Xcode task</strong> has a <em><strong><a href="https://github.com/microsoft/azure-pipelines-tasks/issues/12423" rel="nofollow noreferrer">limitation</a></strong></em> that it cannot get multiple provisioning profiles so it can cater to those iOS apps with App Extension.</p>
  <pre><code>- task: InstallAppleCertificate@2
    displayName: 'Install Certificates'
    inputs:
      certSecureFile: '3Certificates.p12'
      certPwd: '$(P12Password)'
      keychain: 'temp'
  
  
  - task: InstallAppleProvisioningProfile@1
    displayName: 'Install MainTarget provisioning profile'
    inputs:
      provisioningProfileLocation: 'secureFiles'
      provProfileSecureFile: 'MainTarget.mobileprovision'
  
  - task: InstallAppleProvisioningProfile@1
    displayName: 'Install OneSignal provisioning profile'
    inputs:
      provisioningProfileLocation: 'secureFiles'
      provProfileSecureFile: 'OneSignal.mobileprovision'
  
  - task: CmdLine@2
    displayName: 'CocoaPods install'
    inputs:
      script: |
        cd $(Build.SourcesDirectory)
        echo &quot;Pod installation&quot;
        pod install
  - task: Xcode@5
    displayName: 'Xcode Build'
    inputs:
      actions: 'build'
      xcWorkspacePath: 'CICD.xcworkspace'
      scheme: 'CICD'
      xcodeVersion: 'specifyPath'
      xcodeDeveloperDir: '/Applications/Xcode_11.2.1.app'
      packageApp: true
      exportOptions: 'plist'
      exportOptionsPlist: 'CICD/Info.plist'
      signingOption: 'manual'
      signingIdentity: '$(MY_CERTIFICATE_SIGN_IDENTITY)'
      provisioningProfileUuid: '$(MainTarget_ProfileUUID)'
      provisioningProfileName: '$(MainTarget_ProfileName)'
  </code></pre>
  <p>Let me know if I'm missing something here.</p>