Closed shaneparsons closed 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"
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.
Running cordova plugin add cordova-plugin-file
removed 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.
is the cordova-plugin-file also for the iOS application installed?
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?
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.
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.
did you add the NSLocationWhenInUseUsageDescription
key to your application .plist?
Thanks, that seems to have done the trick!
Is this documented somewhere / do I have to manually add this each time?
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.