4

IOS minimum support for RoboVM

 2 years ago
source link: https://www.codesd.com/item/ios-minimum-support-for-robovm.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

IOS minimum support for RoboVM

advertisements

I just tried launching an App I'm building with RoboVM on my iPod Touch (2ng gen) using the "iOS Device App" launch configuration. It did a full build for the "thumbv7" target, uploaded some files, and during the VerifyingApplication step, it stopped with the following message:

'Launching ...' has encountered a problem.
An internal error occurred during: "Launching ...".
DeviceOSVersionTooLow

My iPod is running iOS v4.2.1 (8C148) and my app (at least the parts I wrote) only use functions available starting iOS 3.1 or earlier (CADisplayLink is the most "advanced" feature I use).

This leaves me with the following questions:

  • How are the iOS version requirements for my app determined? Is it specified in some config file (commenting out the UIRequiredDeviceCapabilities section in Info.plist.xml didn't help) or does RoboVM analyze my code and figure it out from there?
  • Does RoboVM itself have a minimum version requirement? If so, can I tweak it somehow?

After some more digging and testing, I have now come up with (what I believe to be) a practically complete answer to this question.

A quick disclaimer: I am still using RoboVM v1.5 and Xcode v6.4, since they work beautifully for my needs and I'm a strong believer in "if it ain't broke, don't fix it". So, some info here may be outdated.

There are two factors at play: Support for a specific device platform (ARMv6, ARMv7, ...) and support for a specific version of iOS.

RoboVM dropped compiler support for ARMv6 pretty early on, so other than compiling a version of an app with an old installation of RoboVM, there is not much that can be done to support ARMv6 devices now-a-days.

iOS version support is more flexible than that:

As of v1.0 beta 4, RoboVM's Info.plist.xml supports an entry called MinimumOSVersion like:

<key>MinimumOSVersion</key>
<string>5.0</string>

This entry determines whether the app is allowed to be installed on a device or not. If you set it higher than the device OS version and try to execute the app on the device, you will get the following error message during launch:

Launch failed. Check the RoboVM console for more information.
 DeviceOSVersionTooLow

As such, I assume that this setting also determines whether the app is offered in the iTunes store for a specific device.

If you do not specify this key, it used to default to 5.0, but to fix some issue with XCode 7, the default was changed to 6.0 in September last year.

Note that this setting obviously does not guarantee that the app will run on a given device.

So much for the theory. Now for some actual experiments:

I was able to downgrade an iPhone 3GS to iOS v4.1.1 and tried to run the simplest possible RoboVM hello world app on it with MinimumOSVersion set to 4.1. The app would install fine, but would crash immediately without any debug log to the Eclipse console when launched. After upgrading the phone back to iOS v6.1.6, the app runs fine. So, v4.1.1 (and likely lower) is not supported any more by RoboVM v1.5 (and higher, I'd assume), even on an ARMv7 device.

I also got my hands on an iPad 1 running iOS v5.1.1, i.e. the latest available version of iOS for this device. With MinimumOSVersion set to 5.1.1, my full game app installs and runs fine on the device. But, when RoboVM tries to launch the app from the IDE, the launch fails with the following exception after installing the app on the device:

AppLauncher failed with an exception:
java.lang.RuntimeException: Launch failed: Unexpected response '' to command 'QListThreadsInStopReply'
    at ...

I can run then the app by clicking its icon, though, and it works without a hitch, just debugging it (like seeing System.out in the Eclipse console) doesn't work.

Conclusion:

By setting MinimumOSVersion to 5.1.1 in Info.plist.xml, RoboVM v1.5 paired with Xcode v6.4 can support all iOS devices with an ARMv7 or better processor, provided they run iOS v5.1.1 or better (iOS v5.1.1 is available for all ARMv7 or better devices).

So, this setup can support all iOS devices released in 2009 or later, which only excludes the first two iPhones (1 and 3G) and iPod Touchs (1st and 2nd gen). iPhones can be supported starting with iPhone 3GS, iPod Touchs can be supported starting with the 3rd generation and all iPads can be supported.

For a great overview of iOS devices, you can take a look at the iOSSupportMatrix.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK