0

I editted the yaml to reflect comments below.

I am getting the following error when I try to run my Pipeline and get to running the xCode task:

The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'GoogleAppMeasurement' from project 'Pods')

My Pipeline yaml file looks like this....

variables:
  scheme: "App"
  sdk: "iphoneos"
  configuration: "Release"

pool:
  vmImage: 'macOS-10.15' #'macOS-latest'


- task: InstallAppleCertificate@2
  inputs:
    certSecureFile: 'Certificates.p12'
    certPwd: 'mypassword'
    keychain: 'temp'
    deleteCert: true

- task: InstallAppleProvisioningProfile@1
  inputs:
    provisioningProfileLocation: 'secureFiles' 
    provProfileSecureFile: Distribution_Profile.mobileprovision
    removeProfile: true

- script: |
    sudo gem install cocoapods
  displayName: 'Install Cocoa Pods'

- script: |
    pod repo update
  displayName: 'Update Cocoa Pods'

- script: |
    ionic cordova build ios --prod --buildFlag="-UseModernBuildSystem=0"
  displayName: 'Build Ionic iOS App'

- task: Xcode@5
  inputs:
    actions: 'build'
    scheme: 'MyProject'
    configuration: '$(configuration)'
    sdk: '$(sdk)'
    xcWorkspacePath: '$(Build.SourcesDirectory)/platforms/ios/TechPro.xcworkspace'
    xcodeVersion: 'default'
    packageApp: true
    signingOption: manual
    signingIdentity: '$(APPLE_CERTIFICATE_SIGNING_IDENTITY)'
    provisioningProfileUuid: '$(APPLE_PROV_PROFILE_UUID)'
    teamId: 'myteamid'
    exportTeamId: 'myteamid'
    exportMethod: 'ad-hoc'
    exportOptions: 'specify'
    exportOptionsPlist: '$(Build.SourcesDirectory)/platforms/ios/MyProject/MyProject-Info.plist'

I modified the podfile to add the following...

post_install do |installer|
    installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['CODE_SIGNING_REQUIRED'] = "NO"
            config.build_settings['CODE_SIGNING_ALLOWED'] = "NO"
        end
    end
end
Adam
  • 497
  • 2
  • 9
  • 29

1 Answers1

0

An Xcode app must be signed and provisioned to run on a device or be published to the App Store. It looks like your ios app is not successfully signed.

This arguement CODE_SIGNING_ALLOWED=No will skip the code signing. See this thread. You can also check the task log of the Xcode task to see if your app is successfully signed.

You could try to remove the arguments CODE_SIGNING_ALLOWED=No -CODE_SIGNING_REQUIRED=NO in Xcode task and check if it could work.

Kevin Lu-MSFT
  • 20,786
  • 3
  • 19
  • 28
  • If I do that, then I get this error.... The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'GoogleAppMeasurement' from project 'Pods') – Adam Jul 31 '21 at 12:29
  • Hi @Adam. Please refer to this ticket: https://stackoverflow.com/questions/66058133/flutter-project-xcode-build-failed You may need to change the settings in your project – Kevin Lu-MSFT Aug 03 '21 at 07:29
  • I am not using flutter and we haven't in the past, so there is no flutter directory. – Adam Aug 03 '21 at 16:35