Start a new topic

SDK Example App for iOS7

SDK Example App for iOS7


So after a fair bit of sleuthing, I finally figured out the problem.  The problem was that I set up a iOS project called "First AR".  The space in the project (and hence the Target) was what was causing the problem.  After debugging all the way deep into the AR Javascript, I discovered that it was URL encoding the parameter in the call to create the Tracker object when making the asych native call.  This was the difference between my iOS app and the "SDKExamples" iOS project (note how it does NOT have a space in the Project/target name).

As soon as I removed the space from my target name, everything works as expected.

Thanks for your quick response, Andreas.

My problem is that in the Javascript code, the call to create a new Tracker fails.  I can prove this by adding an onError callback - it get's triggered, while the onLoaded never does.  This ONLY happens however, when I initialize the ArchitectView from a URL referencing index.html in the App bundle.  If I instead start a web server on my development box and use a URL pointing to localhost instead of in the iOS App bundle, everything works fine.

The strange thing is that the index.html file, as well as the small surfer image and definitely referencable.  In other words, if I comment out the Tracker creation code and simply execute the (prior to iOS 7 updated examples) code that replaces the loading message in the index.html div with the surfer image, it works.  So it seems the html file can reference resources in the App bundle.  But it seems like the Javascript code itself can't successfully initialize the tracker when the tracker file is in the app bundle.

iOS 7 changed the order to calls such as -viewWillAppear: -viewDidAppear: within ViewController subclasses. Now the WTArchitectView instance is created in the ViewControllers init method and the world will be loaded when the user did select a cell from the sample table. 

So your problem is that your ARchitect World does load but only 3d models not?

Best regards

Andreas

 

 

Can you clarify what changes you made?  I was able to get this to build and run fine on iOS7, but when I try to follow the Documentation for Building an iOS app from scratch, I simply cannot get it working.  Everything works fine including creating the WTArchitectView, but the Tracker fails to properly load in the imagerecognition.js file.  Note that if I substitute the following code, everything works fine (ie I can initialize by requesting the model files over HTTP, but not within the bundle)

Works:

NSURL *architectWorldUrl = ;

Model">;

;

 

Does not work

            NSURL *architectWorldUrl = ;

            ;

 

(AR Model) is the subdirectory within my project files, added by reference according to the iOS documentation)

We fixed the SDK Example App for iOS 7 to load worlds correctyly. This is not a fix for the Wikitude SDK, but only for the Example App.

The updated Example App is available as download from here.

 

Have fun developing AR application for iOS 7!

Andreas Schacherbauer
Login or Signup to post a comment