Start a new topic

ImageTrackable not triggering onImageRecognized if iOS startup interrupted and multiple AR Worlds initialized

I ran into something that I really am not sure how to fix. I have setup an iOS project using the JavaScript SDK and referred to the sample available on Wikitude's GitHub for initialization of the AR World, etc. The problem I am running into is that whenever the AR World loading is interrupted for permissions dialogs, etc., and we have to call:

if (self.architectWorldNavigation.wasInterrupted) {
    // UI alert or navigation away from app interrupted AR World startup
    [self.architectView reloadArchitectWorld];
}

then multiple AR World instances are created. A side effect of this is, even though image recognition is working, i.e. the ImageTracker is working, the ImageTrackable does not seem to ever enter the onImageRecognized state. This only happens whenever we have to call reloadArchitectWorld and multiple AR World instances are created. 


I am wondering how I can remedy this and if you may have an idea of what is causing it. I have tried to ensure that the correct instance of the ImageTrackable is enabled, and it is. I have also tried to see if the ImageTracker is enabled, and it is. I am not sure if there is some way to delete the other loaded AR World instances before we call reloadArchitectWorld to see if that might help. 


Thanks


Hi Matthew,

Which version of our SDK are you using? The snippet you posted seems a bit outdated. Newer version of our SDK have a much better handling of those interruptions.


Best regards,
Andreas Schacherbauer

Hi Andreas,


I did end up solving this issue by moving around where my AR world was getting initialized. The code snippet I quoted was taken from the iOS setup sample available on GitHub about a month ago when I posted this. We're using version 8.0.0 and I've gone back to look to see if the sample maybe had been updated but now the GitHub link in the docs is broken https://github.com/Wikitude/wikitude-sdk-basic-projects/blob/master/iOS/AugmentedRealityApplication/ViewController.m

 

Login or Signup to post a comment