robovm icon indicating copy to clipboard operation
robovm copied to clipboard

Game installs but not start with iOS 13.6.1

Open fgnm opened this issue 4 years ago • 3 comments

Issue details

Plugin successfully compile, sign and install the app on the device, but when try to run it the console shows

Process finished with exit code -1

Without any other explanation. If I start manually the game from home screen it works as expected, but no console for logging.

Build Tools:

  • [x] IDEA plugin
  • [ ] Eclipse plugin
  • [ ] Gradle plugin

Versions:

  • Robovm: 2.3.10
  • Xcode: 11.7 on Catalina (but I got the same issue also with Xcode 10 on Mojave)
  • JDK: OpenJDK 8

Build Targets: I got this behaviour only with an iPhone 7 with iOS 13.6.1, while on an iPhone 5 with iOS 10.3.4 no issue and everything works as expected. Simulator works well too.

I'm not able to find any other stacktrace or error, is there an additional log file where should I look for?

Thanks

EDIT Just found this in RoboVM console

[INFO] 20:39:51.885 Looking up developer disk image for iOS version 13.6.1 (17G80) in /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
[INFO] 20:39:51.903 Copying developer disk image /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/13.1/DeveloperDiskImage.dmg to device
[INFO] 20:39:52.217 Mounting developer disk image
[ERROR] 20:39:52.299 AppLauncher failed with an exception:
[ERROR] 20:39:52.299 java.io.IOException: Failed to mount /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/13.1/DeveloperDiskImage.dmg on the device.
[ERROR] 20:39:52.299 	at org.robovm.libimobiledevice.util.AppLauncher.mountDeveloperImage(AppLauncher.java:681)
[ERROR] 20:39:52.299 	at org.robovm.libimobiledevice.util.AppLauncher.launchInternal(AppLauncher.java:707)
[ERROR] 20:39:52.299 	at org.robovm.libimobiledevice.util.AppLauncher.launch(AppLauncher.java:1057)
[ERROR] 20:39:52.299 	at org.robovm.compiler.target.ios.AppLauncherProcess$1.run(AppLauncherProcess.java:67)

Not sure exactly what it is

fgnm avatar Sep 12 '20 18:09 fgnm

Maybe I've found a possible reason. This is the function that matches DeviceSupport folder: https://github.com/MobiVM/robovm/blob/2f997809290be9b42987efa6f957b8d664a05c66/compiler/libimobiledevice/src/main/java/org/robovm/libimobiledevice/util/AppLauncher.java#L578

Currently, I've no folder 13.6 inside /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport. In this case regex matches 13.1 folder which I think is not compatible with iOS 13.6.1.

So, in DeviceSupport folder I have 13.5 and 13.7, but not 13.6. Now I'm not sure which should be the working one for iOS 13.6, Xcode is able to install and run apps without problem, so must be one of these.

fgnm avatar Sep 12 '20 19:09 fgnm

hi, indeed if there is no exact version, logic will try another regex template. in your case its going down to 13.* pattern. And all 13.1, 13.5 and 13.7 match it, random (in order of file system) of these will be used.

In your case you have few options:

  • run any app with Xcode -- it will install dev tools. then RoboVM should not try installing any;
  • create a symbolic link in DeviceSupport for version 13.6.1 from one of the above (probably 13.5).

dkimitsa avatar Sep 12 '20 19:09 dkimitsa

Thanks for the answer! I've tested a little bit more, and it seems that Xcode 11 does not needs 13.6 folder to run apps on iOS 13.6.1; If I've understood well, 13.6 device support will be released with Xcode 12 (https://github.com/iGhibli/iOS-DeviceSupport/commits/master), while Xcode 11 still uses 13.5 tools to run apps on iOS 13.6.x too.

Since iPhone 7 just asks me to update to 13.7 I've now fixed the situation, but I may suggest an improvement to findDeveloperImage function: instead to choose the directory random maybe could be worth to sort all founded folders and check the most compatible one.

fgnm avatar Sep 12 '20 22:09 fgnm

fixed in https://github.com/MobiVM/robovm/pull/726

dkimitsa avatar May 03 '23 16:05 dkimitsa