I’ve a MAUI app that targets net8.0-ios
. On my native dev machine (and remotely related mac), I will construct towards iOS SDK 18 with Xcode 16. In Azure DevOps, I’ve specified
macos-14
because the agent picture, however it’s complaining about utilizing iOS 17.5 as an alternative of 18.0.
ILLINK : error MT2362: The linker step 'ClassHandleRewriter' failed throughout processing: A number of errors occurred. (The sort 'MapKit.MKSelectionAccessory' (used as a return sort in MapKit.MKMapView/_MKMapViewDelegate.GetSelectionAccessory) just isn't out there in iOS 17.5 (it was launched in iOS 18.0). Please construct with a more moderen iOS SDK (often performed through the use of the latest model of Xcode). [/Users/runner/work/1/s/App/App.csproj::TargetFramework=net8.0-ios]
The necessary a part of that’s:
… just isn’t out there in iOS 17.5 (it was launched in iOS 18.0). Please construct with a more moderen iOS SDK (often performed through the use of the latest model of Xcode)
How do I inform DevOps to make use of iOS 18? I checked the agent specs, and it has iOS 18 and Xcode 16.
Beginning: Initialize job
Agent title: 'Hosted Agent'
Agent machine title: 'Mac-1727975076930'
Present agent model: '3.245.0'
Working System
Runner Picture
Picture: macos-14
Model: 20240923.101
Included Software program: https://github.com/actions/runner-images/blob/macos-14/20240923.101/photos/macos/macos-14-Readme.md
Picture Launch: https://github.com/actions/runner-images/releases/tag/macos-14percent2F20240923.101
This is the ios stage of my pipeline yaml:
- stage: publish_ios
dependsOn: []
situation: and(succeeded(), in(variables['Environment'], 'QA', 'Manufacturing'))
jobs:
- job: BuildMAUIApps
displayName: Construct
pool:
vmImage: 'macos-14'
calls for:
- MSBuild
steps:
# https://docs.microsoft.com/en-us/azure/devops/pipelines/apps/cell/app-signing?view=azure-devops&tabs=apple-install-during-build#sign-your-apple-ios-macos-tvos-or-watchos-app
# Setup Secret Pipeline Variable or Library Secrets and techniques Variable for iOS Certificates Password
- activity: InstallAppleCertificate@2
inputs:
certSecureFile: 'iOS-Distribution.p12'
certPwd: '$(CertificatePassword)'
keychain: 'temp'
- activity: InstallAppleProvisioningProfile@1
inputs:
provisioningProfileLocation: 'secureFiles'
provProfileSecureFile: 'app.mobileprovision'
- activity: UseDotNet@2
displayName: set up dotnet
inputs:
packageType: 'sdk'
model: $(dotnetVersion)
- activity: Bash@3
displayName: set up maui
inputs:
targetType: 'inline'
script: |
dotnet nuget locals all --clear
dotnet workload set up maui --source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json --source https://api.nuget.org/v3/index.json
dotnet workload set up ios maui wasm-tools --source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json --source https://api.nuget.org/v3/index.json
- activity: DotNetCoreCLI@2
displayName: 'dotnet restore'
inputs:
command: 'restore'
feedsToUse: 'config'
nugetConfigPath: 'nuget.config'
externalFeedCredentials: 'https://pkgs.dev.azure.com/org/_packaging/org/nuget/v3/index.json'
# https://docs.microsoft.com/en-us/dotnet/maui/ios/deployment/overview
- activity: DotNetCoreCLI@2
displayName: 'dotnet publish'
inputs:
command: 'publish'
publishWebProjects: false
tasks: '**/App.csproj'
arguments: '--configuration $(buildConfiguration) --framework net8.0-ios -p:CodesignProvision=$(APPLE_PROV_PROFILE_UUID) -p:ArchiveOnBuild=true -p:Model=$(Construct.BuildNumber) -p:ApplicationDisplayVersion=$(Construct.BuildNumber) -p:ApplicationVersion=$(Construct.BuildId)'
- activity: CopyFiles@2
inputs:
Contents: |
**/*.app
**/*.ipa
TargetFolder: '$(Construct.ArtifactStagingDirectory)'
- activity: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Construct.ArtifactStagingDirectory)'
ArtifactName: 'ios'
publishLocation: 'Container'