Fork us on GitHub

Location, iOS Beta Testing & Better Input

In recent versions of iOS Apple added the ability to distribu...

Location, iOS Beta Testing & Better Input

Picture
In recent versions of iOS Apple added the ability to distribute beta versions of your application to beta testers using tools they got from the testflight acquisition. We now support this with our crash protection pro feature, just use the build argument ios.testFlight=true and you can then submit your app to the store for beta testing.

With iOS 8 Apple also introduced a requirement that's important for you to be aware of if you use the location API. You need to state why you are using that API in the application meta-data. You can use the
ios.locationUsageDescription build argument to describe the reason you need to obtain the users location data e.g.:
ios.locationUsageDescription =Allows us to offer you better deals when you are in the vicinity of our business

Input in iOS is a bit more complex but I'd say somewhat better than Android since it allows you to scroll while editing by default. However, this input mode triggered some regressions for developers especially in cases where the app places a text field component at the bottom of the screen in a non-scrollable area. The default behavior is to fallback to the old editing mode and just scroll up the entire display which carries some issues with it.
We now have a new API on form "
setFormBottomPaddingEditingMode" which allows you to hint that in such cases you would want to fallback to padding at the bottom of the form rather than shifting the entire screen. This still allows scrolling the screen as expected while editing. Currently this only has an effect on iOS but we'd like to modernize Android's input to use similar semantics in the future.

We also exposed the previously private stopEditing
method in Display. This method is a companion method to editString and allows you to manually stop the editing in progress. This can be useful for cases such as filling a form where a user types into a field a social security number. You can detect a valid number, stop the editing and instantly move the user to the next relevant field using editString().

Notice: This post was automatically converted using a script from an older blogging system. Some elements might not have come out as intended.... If that is the case please let us know via the comments section below.

Share this Post:

Posted by Shai Almog

Shai is the co-founder of Codename One. He's been a professional programmer for over 25 years. During that time he has worked with dozens of companies including Sun Microsystems.
For more follow Shai on Twitter & github.