My app won't start on an iOS device (exported .ipa)

不羁的心 提交于 2019-12-20 06:30:03

问题


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?


回答1:


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/




回答2:


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


来源:https://stackoverflow.com/questions/56988327/my-app-wont-start-on-an-ios-device-exported-ipa

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!