0
votes

I created an app with Swift 5 in Xcode 10 and added the UDIDs of multiple iOS devices to my developer account (got the $99 one).

If I install my app on the device through Xcode, I can start the app, it's got an icon and everything works fine.

I also exported the app as .ipa file:

  1. Pick the "Generic iOS Device" in Xcode (top left)
  2. Create archive (Product - Archive)
  3. Open the list of archives (Window - Organizer)
  4. Highlight on the archive that was just created and click on "Distribute app"
    • iOS App Store - Next
    • Export - Next
    • Both options checked (include bitcode, upload app's symboles) - Next
    • Automatically manage signing - Next
    • Enter the password for the Mac Account twice
    • Click "Export" on the "Review myapp.ipa content" screen
    • Pick folder to "Export As" and click "Export"
  5. Connect iOS device to Mac/PC -> iTunes opens
  6. Click on the "iPhone" icon next to the dropdown menu (music, movies,...) to see the files on the device
  7. Drag exported .ipa from finder/explorer to the left (as shown here) -> iTunes installs app on iOS device.

The app does show up on the home screen but it's only got a darker version of the default white/grey icon (it uses the actual icon if I install if through Xcode) and if I press on it, the icon "wiggles" once but the app doesn't open. There's no error message or any indication what's wrong.

The app's not in the "currently running apps" list (pressing the home button twice).

I changed the "Build Configuration" (Edit Scheme - Run - Info) from "Debug" to "Release" (suggested here) but that didn't help either.

Did I miss anything while exporting? How do I make the app start?

2
You have to configure your Xcode settings to use an Ad Hoc Provisioning Profile. This looks like a good step-by-step explanation (it's been a long time since I used Ad Hoc distribution for testing, but this link was updated just 6-months ago, so it looks current): coderwall.com/p/r5jzzw/…DonMag
Thanks for the link, the option's now simply called "Ad Hoc". I also found this post and it actually works with that option, which is weird because every other post I've found so far suggests using "iOS App Store" instead (e.g. the guide for Xcode 10 here that I used). Do you know what the "iOS App Store" export is used for then?Neph
Exporting for "iOS App Store" is when you want to submit your app to the App Store. "Ad Hoc" export is for testing on other devices, when you can't (or don't want to) use TestFlight.DonMag
"iOS App Store" gives you two options: 1. Upload, 2. Export, which exports an .ipa file. What is this second option used for if the .ipa file apparently doesn't work properly? Do you have to send this .ipa to Apple, so they can approve it and "Upload" is only used to update an app that's already in the store?Neph
You can export it for for App Store submission via automation tools - which is often done in a company environment (multiple developers, multiple apps, CI / CD [Continuous integration / Continuous Delivery], etc). If you're not doing that, you submit the app via Xcode. Probably worth your time to read through help.apple.com/app-store-connectDonMag

2 Answers

0
votes

You can export it for for App Store submission via automation tools - which is often done in a company environment (multiple developers, multiple apps, CI / CD [Continuous integration / Continuous Delivery], etc).

If you're not doing that, you submit the app via Xcode.

Probably worth your time to read through https://help.apple.com/app-store-connect/

0
votes

The problem was caused by picking "iOS App Store". Instead, as @DonMag pointed out, you have to use "Ad Hoc" if you want to export an .ipa file that you can drag into iTunes and install on your device - as long as you added the device's UDID to your developer account, of course.

Step 1-3 and 5-7 are the same (as in my question) but for step 4 do this instead:

  1. Highlight the archive that was just created and click on "Distribute app"
    • Ad Hoc - Next
    • Next (Distribution options)
    • Next (Re-sign "myApp")
    • Enter your password twice
    • Export (Review myApp.ipa content)
    • Pick folder - Export