Wikitude / wikitude-cordova-plugin-samples

Includes augmented reality sample project for Phonegap (Android and iOS) using Wikitude's augmented reality Phonegap plugin
www.wikitude.com
76 stars 61 forks source link

Broken links - iOS #48

Closed shaneparsons closed 7 years ago

shaneparsons commented 7 years ago

I followed this tutorial exactly, and the big list of examples is showing up properly, but none of the links do anything.

The only link that does anything is the launch button in the world url section, but that just leads to a blank camera preview.

shaneparsons commented 7 years ago

After further investigation, this is what's happening when a link is clicked:

"Cannot read property 'applicationDirectory' of undefined"

"TypeError: Cannot read property 'applicationDirectory' of undefined at Object.loadExampleARchitectWorld (file:///android_asset/www/js/index.js:56:48) at :1:5"

AndreasSchacherbauerWikitude commented 7 years ago

Did you create the example application with the script that is part of the repository? The error message indicates that the Cordova file plugin is not installed.

shaneparsons commented 7 years ago

Running cordova plugin add cordova-plugin-fileremoved the error, and fixed the issue on android, but the links still don't do anything on ios. Is there any other plugins I might be missing?

I went through the Creating an empty new app and Add Samples manually to your App sections of the tutorial, so I didn't run the command.

AndreasSchacherbauerWikitude commented 7 years ago

is the cordova-plugin-file also for the iOS application installed?

shaneparsons commented 7 years ago

It definitely is. Comparing the 2 projects (add samples manually vs script) side by side I can't see any difference in the source code.

One thing I do notice in the app settings (on device) is that the one that's working has location and camera sliders, and the other only has camera. I can't seem to find any difference in the code or plugins between the two, but maybe you'll have a better idea?

AndreasSchacherbauerWikitude commented 7 years ago

are you trying to start an example that uses geo ar or 2d image tracking? Depending on the type of AR that you're using, different hardware access is required. 2d image tracking only requires camera access while geo ar also requires access to the device location.

shaneparsons commented 7 years ago

Yes, I'm launching the same geo based examples on both. It works on the demo set up with the script, but not on the manually set up demo.

AndreasSchacherbauerWikitude commented 7 years ago

did you add the NSLocationWhenInUseUsageDescription key to your application .plist?

shaneparsons commented 7 years ago

Thanks, that seems to have done the trick!

Is this documented somewhere / do I have to manually add this each time?