7

I am working in flutter and i want to create an ipa file for testing purpose. Is there any way to create ipa directly from android studio terminal? If there,what are the steps to follow in that. Also i have created through diawi, but showing error in installing the app through the url provided by diawi.

Please give me a step by step procedure to follow.

Sana Afreen
  • 157
  • 2
  • 3
  • 9

3 Answers3

13

For making a build for iOS, you need to run following command from android studio terminal:

flutter build ios --release

Now you have to make build from Xcode by configuring correct certificates and provisioning profiles:

Go to Xcode > Select Generic Device in Devices Pan
Then from the Window menu Choose Product > Archive

EDIT: How to get the build?

After clicking on archive, It will take some time to get binaries bind into build and after that it will give you some options to add preferable provisioning profiles. After completing all the process you get an option to download build. Just choose your preferred location to download and it will be downloaded. Open the downloaded folder and get your ipa.

Billion Shiferaw
  • 835
  • 10
  • 17
Shivam Tiwari
  • 550
  • 1
  • 7
  • 22
4

None of the above worked for me so this is what I did:

  1. Run: flutter build ios --release
  2. Go to Xcode -> select Any iOS Device
  3. Select product -> archive
  4. Once done, In the popup dialog, select distribute then select Adhoc (Install on designated devices) then click next
  5. On the next page, select none for app thinning then click next
  6. Select automatically manage signing then click next or manually manage signing if you want to change the provisioning profile then, click next
  7. Click export, then select the desired location you want to save the ipa then click export.
  8. Once done, where you exported to should have the ipa. You can upload this ipa to firebase app distribution or where neccessary.
nivla360
  • 973
  • 14
  • 21
  • Hey, could you explain step 3 a bit more? I'm searching for something like "product", but can't find anything. The only thing I found is "Products" inside the Project Navigator, but this doesn't list "archive" – Myzel394 Jun 06 '23 at 20:48
  • Sure, you will find the "Product" in the menu bar at the top in when you launch Xcode – nivla360 Jun 09 '23 at 11:10
2

There are two ways to do that

1. Using build ipa

 flutter build ipa --export-options-plist="---/build/ios/archive/ProjectName.xcarchive/Info.plist" // Add abosulte path(Exact location of file in disk)

2. Using build ios

  1. Run flutter build ios (it will generate AppName.app file)
  2. Find above generated file in project structure build/ios/iphoneos/AppName.app(go to this location through finder)
  1. Copy AppName.app and create a ProjectName folder on desktop or any location and paste AppName.app inside the newly created folder.

  2. Compress the ProjectName folder(It will look like ProjectName.zip)

  3. Finally, Rename ProjectName.zip to ProjectName.ipa and use this .ipa

Sometimes, the first may not work due to certification issues, but the second should work always.

Jitesh Mohite
  • 31,138
  • 12
  • 157
  • 147
  • I get "There's been an error parsing your app's info.plist. Ensure you are uploading a valid IPA and try again." when trying to upload that ipa file to Firebase App Distribution. – Pablito Oct 26 '21 at 10:07
  • 1
    this doesn't work for me – Val Nov 09 '21 at 14:19
  • I am getting error There's been an error parsing your app's info.plist. Ensure you are uploading a valid IPA and try again. With performing step 2 in .yml script – Meetkumar Shah Jan 27 '22 at 04:19
  • In the 2 process no need of 3, 4, 5 steps. **How to install**? Step 1. go to xcode and click on `add additional simulators` in the device list. Step 2. In Devices tab drag your .app file to installed app section. You app will be installed. – upender Jan 28 '22 at 11:01
  • 2. Using build ios Worked for me on the updated XCode version – Shoeb Surve Aug 02 '23 at 16:39