azure-flutter-tasks icon indicating copy to clipboard operation
azure-flutter-tasks copied to clipboard

Flutter iOS Unable to run exportArchive

Open vlad-buhaescu-qoob opened this issue 1 year ago • 2 comments

I have followed the medium tutorial and fixed lot's of issues by myself although I got to this one:

Building App Store IPA...                                        2,157ms
Encountered error while creating the IPA:
error: exportArchive: Failed to log in.

If I run

flutter build ipa --export-options-plist=/Users/myUser/Documents/Developement/flutter_app/app/iOS/exportOptions.plist locally it is successfully generates the IPA file

More to that I ran locally the command below and it was successful:

xcodebuild -exportArchive -exportOptionsPlist --export-options-plist=/Users/myUser/Documents/Developement/flutter_app/app/iOS/exportOptions.plist -archivePath '/Users/myUser/Library/Developer/Xcode/Archives/2024-02-09/FlutterApp 2024-02-09 13.18.02.xcarchive' -exportPath /Users/myUser/Desktop

Thing is I didn't see any step where I have to provide some login info for an Apple ID. Any ideas how to make flutter build ipa --export-options-plist=etc pass on Azure Devops?

vlad-buhaescu-qoob avatar Feb 12 '24 11:02 vlad-buhaescu-qoob

As you can see the error is Failed to log in.. You will have to create a service connection on your project. Go to your settings and add a service connection of Apple ID and then it should work. Also go through the links below

  • https://github.com/hey24sheep/azure-flutter-tasks/issues/49#issuecomment-1309118882
  • https://github.com/hey24sheep/azure-flutter-tasks/wiki (please go through all the IOS links, you will find a solution)

hey24sheep avatar Feb 14 '24 10:02 hey24sheep

Check this issue as well if your issue isn't solved yet https://github.com/hey24sheep/azure-flutter-tasks/issues/119

Close your issue in case it's solved

hey24sheep avatar May 06 '24 05:05 hey24sheep