Closed FeuerSoftwareMoritz closed 2 weeks ago
Hi, It seems like it isn't able to find the provisioning profile. Please go through the WIKI section here on this repo and this issue
I ended up using the following:
- stage: iOSStage
pool:
vmImage: macos-14
displayName: iOS
dependsOn: []
jobs:
- job: iOSJob
displayName: iOS
steps:
- task: CmdLine@2
displayName: 'Select Xcode version'
inputs:
script: |
echo Mac OS version:
sw_vers -productVersion
echo
echo Installed Xcode versions:
ls /Applications | grep 'Xcode'
echo
echo currently selected xcode:
xcrun xcode-select --print-path
echo
echo selecting latest xcode...
sudo xcode-select -s /Applications/Xcode_16.app
xcrun xcode-select --print-path
xcodebuild -version
failOnStderr: true
- task: InstallAppleCertificate@2
displayName: Install Apple certificate
inputs:
certSecureFile: 'CertStore.p12'
certPwd: '$(iOSCertificatePassword)'
keychain: 'temp'
- task: InstallAppleProvisioningProfile@1
displayName: Install provisioning file
inputs:
provisioningProfileLocation: 'secureFiles'
provProfileSecureFile: 'Profile.mobileprovision'
- task: FlutterInstall@0
displayName: "Install Flutter SDK"
inputs:
mode: 'auto'
channel: 'stable'
version: 'latest'
# - task: FlutterCommand@0
# displayName: "Run Flutter diagnostics"
# inputs:
# projectDirectory: '.'
# arguments: 'doctor -v'
- task: FlutterBuild@0
displayName: "Build Flutter application"
inputs:
target: 'ios'
projectDirectory: '$(Build.SourcesDirectory)'
buildNumber: '$(Build.BuildNumber)'
iosCodesign: false
- task: Xcode@5
displayName: Archive application
inputs:
actions: 'archive'
configuration: 'Release'
sdk: 'iphoneos'
xcWorkspacePath: '**/Runner.xcworkspace'
scheme: 'Runner'
packageApp: true
exportPath: '$(Build.SourcesDirectory)/build/ios/iphoneos'
exportOptions: 'plist'
exportOptionsPlist: '$(Build.SourcesDirectory)/ios/ExportOptions.plist'
signingOption: 'manual'
signingIdentity: '$(APPLE_CERTIFICATE_SIGNING_IDENTITY)' # From "Install Apple Certificate"
provisioningProfileUuid: '$(APPLE_PROV_PROFILE_UUID)' # From "Install provisioning profile"
- task: CopyFiles@2
displayName: "Copy app to staging directory"
inputs:
sourceFolder: '$(Agent.BuildDirectory)'
contents: '$(Build.SourcesDirectory)/build/ios/iphoneos/*.ipa'
targetFolder: '$(Build.StagingDirectory)'
flattenFolders: true
- task: CopyFiles@2
displayName: "Copy releasenotes to staging directory"
inputs:
sourceFolder: '$(Agent.BuildDirectory)'
contents: '$(Build.SourcesDirectory)/releasenotes.txt'
targetFolder: '$(Build.StagingDirectory)'
flattenFolders: true
- task: PublishBuildArtifacts@1
displayName: "Publish artifacts"
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'App.iOS'
publishLocation: 'Container'
Hey,
i have the following problem and it drives me crazy.
I am using the following task configuration:
- task: FlutterBuild@0 displayName: "Build application" inputs: target: 'ipa' projectDirectory: '$(Build.SourcesDirectory)' verboseMode: true buildNumber: '$(Build.BuildNumber)' exportOptionsPlist: '$(Build.SourcesDirectory)/ios/ExportOptions.plist'
I am installing my Apple Certificate and provisioning profile correctly. I am using the latest flutter version as well as the macos-latest runner image.
What is wrong here? My provisioning profile is set up correctly.