Start a new topic

architectsdk not working on iOS

architectsdk not working on iOS


<< In world >>

function ........ {

alert('here1');

document.location = "architectsdk://hidecam";

alert('here2');

}

 

<< In index.js >>

onUrlInvoke: function (url) {

 alert(url);   

}

 

on iOS, only alert "here1" & "here2", no alert on the "url"

 

but it works on Android.

 

My iOS is 7.1, xCode 5.1.1, Cordova 3.4.

 

Thanks.

 

Hi Frederick,
In general we recommend to use the 'phonegap' command line tools instead of 'cordova'. Which version of the Wikitude PhoneGap Plugin are you using?
To enable the architectsdk scheme forwarding, you need to call the 'wikitudePlugin.setOnUrlInvokeCallback', passing in the function that should be called e.g. 'onUrlInvoke'.
After that you will receive any redirects that are triggered from the architectsdk scheme.

Have you tried to use Safari Web Inspector to debug either the PhoneGap application or the Architect World to see if an js error occurs?

Best regards

Andreas

Thanks Andreas,

However, we are using Cordova 3.4, but same code is working on Android.

Hi Frederick,
Can you verify that the wikitudePlugin (cordova.require(*WikitudeID*)) is returning a valid object and that the file 'WikitudePlugin.js' is include in the Xcode project?
I heard from some people that the cordova command line tool is not adding our plugin correctly but then the complete Wikitude Plugin wouldn't work and you couldn't also load any ARchitect World.

Best regards

Andreas

Hi Andreas,

Can load any ARchittect World, and load all images. Scan on the target image, the object displayed. Just don't know why the "architectsdk" not working.

Hi Andreas,

Including the load WTC file locally, all functions working on iOS, just "architectsdk" not working.

Any ideas?

Thanks.

 

Hi,
After you made sure that the PhoneGap Plugin is up to date, you could set a breakpoint in the WTWikitudePlugin.m file in line 427 to verify that the Native plugin receives the redirect notification. I attached a screenshot which shows where you have to set the breakpoint. You need to open the Xcode project which is located in the platform/ios folder.
If the execution does not stops there, the SDK does not receive the url scheme redirect. Otherwise there is no valid callback function set.

Best regards

Andreas

Thanks.

We found out what happened.

^^

Would you like to share your findings for others that are reading this thread?

Best regards

Andreas

As there is one line which is for Android only in the JS Script file, crashed by javascript error.

That is our fault.

Thanks. haha  ^.^
Login or Signup to post a comment