How to build an iOS AdHoc app with flutter

1,447

Pre-requisite

  • Apple Developer Program membership ($99/year)
  • Distribution certificate added to your machine
  • In the Xcode project (Signing & Capabilities tab), select your team/ developer account which has the Apple Developer program membership.

1. Create an Archive (.xcarchive)

Technically you do not build an Ad Hoc app, you build a debug/release/profile app, which you then distribute via a distribution method, one option is Ad Hoc.

  • Using command line: You can run flutter build ipa to build the xcarchive. Then it should show a URL for your Runner.xcarchive at the output (double click that link), or
  • Using Xcode: Open the Xcode project, and in the menu bar, click Product > Archive. The organizer window will open once the archive is complete.

2. Create an .ipa

Now the Organizer window should be open. Press the Distribute App button: you should see multiple options. You can share the .ipa file with users, and they can install it onto their iPhone:

enter image description here

It's worth noting you can also create an .ipa using xcodebuild, but when you're first learning, it's nicer to use Xcode.

3. Install the .ipa on a device.

I wrote an answer about that: https://stackoverflow.com/a/68968301/7365866

enter image description here

Reminder

Just remember to do this:

Action Required: You must set a build name and number in the pubspec.yaml file version field before submitting to the App Store.

Share:
1,447
Nathan
Author by

Nathan

I am an App- and Cloud Developer. In my free time I do improv and ultimate frisbee.

Updated on December 01, 2022

Comments

  • Nathan
    Nathan over 1 year

    I have an flutter app for ios and can build it for the app store using:

    flutter build ios --release
    

    But how can I build an Ad-Hoc app for ios?