Hello, I have a problem: I'm implementing image recognition with plugin cordova wikitude so, it works very well on Android but doesn't on iOs. This is the snippet on side cordova:
The problem is that in iOs it doesn't enter in callback success (or callback error) of loadARchitectWorld. In this way I can't run the callJavascript. Why??? After the code of my World:
var World = {
loaded: false,
init: function initFn() {
this.createOverlays();
},
createOverlays: function createOverlaysFn() {
this.tracker = new AR.ClientTracker("assets/magazine.wtc");
var imgOne = new AR.ImageResource("assets/imageOne.png");
var overlayOne = new AR.ImageDrawable(imgOne, 1, {
offsetX: -0.15,
offsetY: 0
});
var pageOne = new AR.Trackable2DObject(this.tracker, "*", {
drawables: {
cam: overlayOne
}
});
},
};
function welcomeAlert() {
alert("Welcome to World");
World.init();
}
F
Fabian Schmid
said
almost 8 years ago
Same here. I'm using v5.0.1-3.2.0-beta.1. Neither successCallback nor errorCallback are called. Android works as expected.
A
Andreas Schacherbauer
said
over 7 years ago
Hi, Can you please try out our latest Cordova update which was release just a couple of days ago? We fixed the mentioned callbacks on iOS.
Best regards
Andreas
A
Allisa Schmidt
said
over 7 years ago
Was this ever confirmed to work? I'm trying to use the sample application code with the success callback in loadARchitectWorld, but it does not seem to ever get called. I can introduce an erroneous load condition and cause the failure callback to fire, but the success one does not even when a world loads. I'm using version 5.1.4-3.2.1.
A
Andreas Schacherbauer
said
over 7 years ago
Yes, it works now. Somehow our old API was still used for the WTArchitectViewDelegate implementation in our Wikitude Cordova Plugin.
The update is already in our master branch on GitHub.
Best regards
Andreas
J
Julien Lemaitre
said
about 7 years ago
I've same problem in version Cordova Plugin 5.2.0-3.3.1.
In IOS the callback success is receipt only on return to main app.
In Android it work.
A
Andreas Schacherbauer
said
about 7 years ago
Hi Julien, I just tried it again with a example application that I freshly created and the callback was called correctly for me.
Are you sure that you use our latest module? Have you tried to add an alert to the onLoaded callback?
After code refactoring it works with 5.2.0-3.3.1. But I have the feeling that for each new app launch, when i first scan the target the onEnterFieldOfVision event is not detect. If I go out of my target, then returns the event is detected.( Only IOS ) This remains to be verified.
Best regards
A
Andreas Schacherbauer
said
about 7 years ago
Hi Julien, This sounds very strange as this is one of the things we constantly test. Are you using our example application or your own application?
Can you send us a video showing the effect?
Best regards,
Andreas
J
Julien Lemaitre
said
about 7 years ago
Hi,
We have done more tests and we have isolate an problem.
we use :
onUrlInvoke(url) { app.wikitudePlugin.close(); }
Upon detection of a target we send :
document.location = "architectsdk://.....";
However Wikitude not close all the time. In the majority of cases it closes, but occasionally it does not close. (IOS only)
Same for " hide() ";
I haven't succeeded in reproducing with your sample.
For information, we use wikitude with Meteor.
Thanks for your help
A
Andreas Schacherbauer
said
about 7 years ago
Hi Julien, What is Meteor?
We noticed that in case a dom manipulation is triggered, document.location changes might be ignored by the web view as it already prepares for a page reload. Do you trigger any dom changes in case a target is recognized? If that's the case, a setTimeout(300ms) around the document.location = "architectsdk://" helped for us.
Best regards,
Andreas
J
Julien Lemaitre
said
about 7 years ago
Hi Andreas,
Yes document.location changing when an target is recognized. I have tested :
LoZio LoZio
1 person has this problem