Hi Enrico,
You don't necessarily need to call
[self.architectView setUseInjectedLocation:NO]
. This is the 'default' behaviour.
In general your JS code is not iOS version related. Both web views are fine handling the JS code you could write with our JS API.
Can you send me a demo project that only contains the necessary code so that I can have a look at it?
Best regards,
Andreas
Hello,
we are using your Wikitude SDK JS API directly.
In the iOS mobile app we set [self.architectView setUseInjectedLocation:NO] , so the location is handled by the wikitude SDK itself, according to this:
/** * If true is supplied the injected location will be used. If false is supplied the default location provider will be used. * * @param useInjectedLocation The location simulation status */ - (void)setUseInjectedLocation:(BOOL)useInjectedLocation;
in my understanding the default location provider is handled by the Wikitude SDK itself. For this reason we do not setup a location manager in out view controller and we use the callback form the javascript instead.
This works in iOS 10 perfectly, while in iOS 9 this doesn't work.
Is it possible to test our javascript code and check if it is compatible with iOS 9 in the first place? It is possible that the problem is way before this?
Kind Regards
Enrico
Hi Enrico,
location updates are not coming from the html/js part of the SDK but instead directly from the iOS SDK. They are then forwarded to the JS context (the onLocationChanged trigger is called if set).
Are you using PhoneGap/Titanium/Xamarin or our Wikitude SDK JS API directly?
Best regards,
Andreas
Hello Andreas,
is is purely for debug purpose, because the problem is that the view controller does not receive location updates.
However it is possible that the javascript page itself does not work correctly in iOS 9 while works in iOS 10?
Thank you
Enrico
Hi Enrico,
Is there are specific reason why you forward the location update from JS to ObjC or was this purely for debug/demonstration purposes?
In general I'm not aware of any iOS 9 specifics regarding GPS updates. As long as you have the NSLocationWhenInUseUsageDescription key is present in your applications info.plist, location updates should arrive as in iOS 10.
Best regards,
Andreas
Hello Eva,
I tried the sample application by adding the following code to thelocationChanged: function
AR.platform.sendJSONObject({ action: "onLocationChanged", param: { latitude: lat, longitude: lon, altitude: alt, accuracy: acc } });
The result is that I can receive the object in iOS 9 and 10.
So we have no problems with the sample applications.
Are there Javascript restrictions on iOS 9?
Thanks
Eva
Enrico Luciano
Hello,
I am developing an iOS application using the latest iOS Javascript SDK (6.1). The problem that I am experiencing is that the AR.context.onLocationChanged is not called in iOS 9 ( I tried 9.3.4). It works using iOS 10.
I am using the default location manager provided by WTArchitectView class and I have set [self.architectView setUseInjectedLocation:NO] .
Moreover i am not receiving any error through the delegate methods:
- (void)architectView:(WTArchitectView *)architectView didFailToAuthorizeRestrictedAppleiOSSDKAPIs:(NSError *)error;
- (void)architectView:(WTArchitectView *)architectView didEncounterInternalError:(NSError *)error;
- (void)architectView:(WTArchitectView *)architectView didEncounterInternalWarning:(WTWarning *)warning;
So I am having troubles troubleshooting this issue.
As a help: WTArchitectView is showing (I can see the logo and trial watermark) and the camera feed is working.
Thank you
Enrico