2

I am trying to run Libgdx app on iPhone 7 but it continuously fails at 40%

[ERROR] Couldn't start application
org.robovm.libimobiledevice.LibIMobileDeviceException: ApplicationVerificationFailed
    at org.robovm.libimobiledevice.util.AppLauncher$1.error(AppLauncher.java:1006)
    at org.robovm.libimobiledevice.Callbacks.callInstproxyCallback(Callbacks.java:64)

[INFO] 11:42:20.130 [  0%] Beginning installation...
[INFO] 11:42:20.130 [  5%] CreatingStagingDirectory
[INFO] 11:42:20.130 [ 15%] ExtractingPackage
[INFO] 11:42:20.131 [ 20%] InspectingPackage
[INFO] 11:42:20.173 [ 20%] TakingInstallLock
[INFO] 11:42:20.205 [ 30%] PreflightingApplication
[INFO] 11:42:20.206 [ 30%] InstallingEmbeddedProfile
[INFO] 11:42:20.267 [ 40%] VerifyingApplication
Amar Maharjan
  • 220
  • 4
  • 12

2 Answers2

2

Fail at 40% is a problem with your provisioning profiles. Try to run an app with the same package id from xcode to repair this.

MrStahlfelge
  • 1,721
  • 2
  • 13
  • 23
  • Just a not that an exception "MOBILE_IMAGE_MOUNTER_E_COMMAND_FAILED" that would come slightly later than the 40% problem, can also be helped using the same approach as described here. One more note is that if you run from Eclipse using "Run as" -> "iOS Device App" it will happily just start and quite possibly get stuck with the same problem as here. The solution then could simply be to go into "Run" -> "Run Configurations" and switch the Signing identity, Provisioning profile and Arch to correct specific correct ones. For me they were default at "Auto" and that created the 40% error. – jojohice Mar 16 '21 at 12:01
  • 1
    It's kinda comforting how little things change over the years. Libgdx == comfy – TimSim Nov 28 '21 at 18:14
2

Oh dear, this is always a bit of a pain and I assume you've never run a libgdx app on an iOS device before.

Start off by creating a project in xcode with the same package id, eg. mine is com.funferret.tr. Just a boring project where xcode just displays a blank screen. This has nothing to do with your libgdx project except it has the same app id. Get that building and installing on your iphone from xcode directly. You should be able to find tutorials on how to do that or just figure it out in xcode. To get this installed you will have to have created a provisioning profile with in xcode for your app. Again, use tutorials if you have to.

Once this xcode project installs on your device you can then use the same provisioning profile for your libgdx project, since it has the same package id. Just go into the 'Edit Configurations' section for running your libgdx project in Android Studio, under roboVM/attached device you should be able to select your signing identity and provisioning profile. Hopefully everything will work fine when you get to this point.

I would also recommend using your initial xcode project to manage your assets. ie. copy launch icons and splash screens into that project and get it compiling. Then you can use symbolic links or copy those assets from your xcode project to your libgdx project. There are RoboVM documents that tell you where to put those launch icons and splash screens.

I expect more questions from you. But I don't know the process well enough to completely walk you through it, so you're probably going to have to do plenty more reading and a lot of messing around trying to get things working. I've wasted many an hour on getting iOS devices working properly. Good luck.

funferret-com
  • 206
  • 1
  • 6
  • hi @funferret-com tis working now. do you have any idea how to https://stackoverflow.com/questions/27324020/no-valid-aps-environment-entitlement-string-found-for-application-on-app-store do this in libgdx? – Amar Maharjan Aug 18 '20 at 05:40
  • Sorry, I'm not sure. I would search "robovm add capabilities". [This](https://github.com/robovm/robovm/issues/1092) seems hopeful. – funferret-com Aug 18 '20 at 06:42