Start a new topic

iOS App crashing

iOS App crashing

I am using a UINavigationController and try to push a UIViewController containing the WTArchitectView onto it. The UIViewController basically contains the code from the "Setup Guide iOS". This happens when I push a button and it works fine the first time the WTArchitectView is shown. Then I hit the back button of the UINavigationBar, because I want to select a different ArchitectWorld from the previous view. So this is where my problem comes up: Pushing the UIViewController (with WTArchitectView) onto the UINavigationController again results in an error, because there already is an WTArchitectView present. 

I tried many things dealloctiong the previous WTArchitectView object, but couldn't get it to work. Maybe using a UINavigationController is not best practice. What's the best way to make this work?

iOS 9.1
WikitudeSDK iOS JavaScriptAPI








Hi Thorsten,
Since the Wikitude SDK is just a simple UIView subclass, you're restricted to use a specific controller to present it. 
The Wikitude example application also uses a navigation controller in combination with a single view controller to present the AR experience. So please have a look at the example application for iOS and how it is implemented.

Your crash(glog related I guess) sounds like you trying to allocate a new WTArchitectView when the old one was not destroyed, so please make sure that all you controller objects release there architect view.

Best regards


It seems that I found the source of the problem:

As described I use the ViewController from the "Setup Guide iOS" (bottom of the page

There is part where the active/resume handling is done and it seems to contain a retain cycle (the object retains the block of the observer and the observer retains the object). The dealloc is never called that way.



I created a __unsafe_unretained reference to the ViewController and used the reference inside the block of the observer.

__unsafe_unretained WTViewController *weakWTViewController = self;




Can anyone confirm that this is a viable way to make this work?
Login or Signup to post a comment