Fixes#7915.
On iPadOS 16, it seems that WKWebView defaults to lying about its user
agent to servers. We can switch this behaviour by using .mobile for the
preferredContentMode.
We should also update the website to work around this, so that users
always get the right downloads for their device, but the website
currently uses server-side determination of user agent for this
particular aspect of the keyboard search, so that's a much more
significant refactor, to make it client-side, with greater risk and much
more testing required.
Fixes#7517.
Cleans up the setDeviceType code which was attempting to set the device
type far too late in the init sequence, and moves responsibility for
detection from kmwembedded.ts to ios-host.ts, as this device test is
iOS-specific.
Fixes#7227.
We want to use keyman.com for now even for alpha builds, as
keyman-staging.com is going to be used for transition to Docker-based
hosting, and it will be problematic to try and share that process with
alpha builds.
Use KeymanVersionWithTag from .plist instead of
CFBundleShortVersionString when checking version information, because
XCode can rewrite bundle version of frameworks. Details: #6932.
The iOS code was making a direct call to `keyman.core.resetContext()`
rather than to `keyman.resetContext()`. This meant that the
`OutputTarget` was not set and the `newContext` event would never be
called (as well as triggering a background warning in the language
processor "OutputTarget missing during an invalidateContext call").
Refactored to include a wrapper for `resetContext()` in ios-host.js, as
I think it's better to proxy all calls to KMW consistently through the
host javascript.
(There are a couple of other direct calls which could be cleaned up;
search for "evaluateJavaScript" to find all calls; I think we could
consider build a wrapper for all these calls?)
Relates to #5853
This deals with deleting the selection with the new interface for
KeymanWeb. It also ensures that the selection is always correctly sent
to KeymanWeb.
This is part of the fix chain for #5853. Split ios-host.js out from
keyboard.html in order to make it easier to debug and mock. No changes
to the content of the sscript, just moving it here.