0

Everything works fine for the Android Release of the Application. I'm developing the app with Flutter using VS code, then I'm building it with Azure DevOps and finally I'm publishing it to the AppCenter.

In contrast to Android, IOS does not create an IPA file but only builds a Runner.app. So in Azure DevOps i'm building the app with following code:

trigger:
- master

pool:
  vmImage: 'macos-latest'

steps:

- task: CocoaPods@0
  inputs:
    workingDirectory: './ios'
    forceRepoUpdate: false
- task: MobileDevOpsKeychanger@0
  inputs:
    KeyChangerPassword: '$(keychangerpw)'
    DoAndroidSigning: false
    DoAppleDistribution: true
    AppleAppIdDistribution: '[myBundleID]'
    DoAppleEnterprise: false

- task: FlutterInstall@0
  inputs:
    channel: 'beta'
    version: 'latest'

- task: FlutterBuild@0
  inputs:
    target: 'ios'
    projectDirectory: '.'
    iosCodesign: false

- task: CmdLine@2
  inputs:
    script: |
      mkdir -p Payload
        mv ./build/ios/iphoneos/Runner.app Payload
      zip -r -y Payload.zip Payload/Runner.app
        mv Payload.zip Payload.ipa
      rm -Rf Payload
- task: CopyFiles@2
  inputs:
    Contents: '**/*.ipa'
    TargetFolder: '$(Build.ArtifactStagingDirectory)'
- task: PublishBuildArtifacts@1
  inputs:
    PathtoPublish: '$(Build.ArtifactStagingDirectory)'
    ArtifactName: 'drop'
    publishLocation: 'Container'

But unfortunately when I do the same for IOS I'm getting this Error:

6851704Z ##[error]"{\"status\":\"error\",\"message\":\"Version could not be created from build. Please make sure that your .ipa file has the correct format.\"}" http response code: 422

Azure DevOps

Logemann
  • 2,767
  • 33
  • 53
Lilo
  • 1
  • 1
  • You can refer to the similar [issue1](https://github.com/microsoft/appcenter/issues/595),[issue2](https://github.com/Microsoft/fastlane-plugin-appcenter/issues/53) to see if it helps. – Hugh Lin Nov 04 '19 at 01:58

1 Answers1

0

The Solution has been mentioned in https://github.com/flutter/flutter/issues/13065

First I had to convert the Runner.app to an ipa with

xcodebuild -workspace Runner.xcworkspace -scheme Runner -sdk iphoneos -configuration Release archive -archivePath $PWD/build/Runner.xcarchive
xcodebuild -exportArchive -archivePath $PWD/build/Runner.xcarchive -exportOptionsPlist exportOptions.plist  -exportPath $PWD/build/Runner.ipa

and to create a file exportOptions.plist is on ios directory.

Lilo
  • 1
  • 1
  • Thanks for sharing your solution here, you could [Accept it as an Answer](https://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work) , so it could help other community members who get the same issues and we could archive this thread, thanks. – Hugh Lin Nov 07 '19 at 01:19