Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to build ipa file with flutter

Tags:

ios

flutter

I've upgraded my flutter to version 1.26.0-1.0.pre

Now I'm trying to build ipa file with command

flutter build ipa --export-options-plist=ExportOptions.plist

File ExportOptions.plist contains such content:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>compileBitcode</key>
    <true/>
    <key>destination</key>
    <string>export</string>
    <key>method</key>
    <string>ad-hoc</string>
    <key>signingStyle</key>
    <string>automatic</string>
    <key>stripSwiftSymbols</key>
    <true/>
    <key>teamID</key>
    <string>/*This is my team ID*/</string>
    <key>thinning</key>
    <string>&lt;none&gt;</string>
</dict>
</plist>

Output for build command is:

Running pod install...                                           1,691ms
Running Xcode build...
 └─Compiling, linking and signing...                        17.3s
Xcode archive done.                                         33.7s
Built /Users/alexeyzhulin/Projects/flutter/shopping-list/build/ios/archive/Runner.xcarchive.
Building IPA...                                                  1,977ms
Encountered error while building IPA:
error: exportArchive: No profiles for 'ru.alexeyzhulin.shoppingList' were found

What kind of profile I have to add to my plist file?

I'm using automatic signing as you could see in my plist content and if I run

flutter xcodebuild -h

I could see

provisioningProfiles : Dictionary

        For manual signing only. Specify the provisioning profile to use for each executable in your app. Keys in this dictionary are the bundle identifiers of executables; values are the provisioning profile name or UUID to use.

How to build ipa file use command line flutter tool?

like image 717
Alex Zhulin Avatar asked Nov 25 '22 22:11

Alex Zhulin


1 Answers

My recommendation is to manually generate the IPA with XCode, at least the first time. This will generate a .plist file named ExportOptions.plist in the same directory where your .ipa file is created.

Then, you can use the ExportOptions.plist file for your next deliveries by running this command :

flutter build ipa --export-options-plist=absolute/path/to/ExportOptions.plist

Everything is explained here : https://flutter.dev/docs/deployment/ios#create-a-build-archive-with-xcode

like image 161
Jack' Avatar answered Jan 11 '23 23:01

Jack'