I am building a phonegap application using the phonegap-wiktude-plugin.
The app enables user to download all the availble ar content to their device (offline mode).
Under iOS I get an error loading that offline content:
var worldUrl = 'file:///var/mobile/Containers/Data/Application/<UUID>/Library/NoCloud/content/index.html'; // obtained via fileEntry.toURL() (using org.apache.cordova.file plugin), I also tried toInternalURL() > cdvfile://...
wikitudePlugin.loadArchitectWorld(worldUrl);
wikitudePlugin.worldFailedLaunching() > Unable to determine what the url to load should be: file:///var/mobile/Containers/Data/Application/<UUID>/Library/NoCloud/content/index.html
From this related post I learned that the phonegap-wiktude-plugin does not handle cdvfile:// urls and only accepts paths relative to the www-folder!?
The problem is that with iOS8+ the applicationDirectory and the dataDirectory got separated:
Please note the different UUIDS, so there is no way to get a a path leading to content-folder relative to the www-folder.
So the only way is an absolute path or rather a local file system url.
But if wikitudePlugin.loadArchitectWorld() does not support these, that would be really disappointing a big show stopper!
So hopefully I am missing something or doing something wrong an you can help me...
Thank you in advance
A
Andreas Schacherbauer
said
over 8 years ago
Hi Pascal, THX for pointing that out! We have a look at it and let you know as soon as we have a fix for that.
Sorry for any circumstances the described behaviour is causing!
Do you know that you can load any resources from a server instead of downloading it onto the device? We do not store them so the SDK would download them every time the application loads, but maybe it's a possible temporary workaround for you.
Best regards
Andreas
P
Pascal.wasem
said
over 8 years ago
Hi Andreas,
thank you for your response, no problem!
Feel free to contact me anytime.
We actually store and update our resources on a server, which works very well and is the reason why we did choose wikitude in the first place :)
The described offline mode is just a fall back solution, if the user has no or bad network connection.
Bests,
Pascal
W
Wolf
said
over 8 years ago
Hi wikitude Team,
is there any solution or a fix to load the world from the content-folder?
We have to load ARWorld from the content-folder, because the offline-mode of our app is essential in our case.
Cheers
N
Nicola Radacher
said
over 8 years ago
Hi,
We're investigating this and plan to release a fix with our next SDK release end of July.
Greetings
Nicola
P
Pascal.wasem
said
almost 8 years ago
Is there fix for this by now?
Thx
B
Bizzotto
said
over 7 years ago
Hi,
I've the same problem.
Have you a fix for it?
Thanks
Pierre
A
Andreas Schacherbauer
said
over 7 years ago
Hi, We scheduled the issue for our upcoming sprint. It should be released soon.
Best regards
Andreas
P
Pascal.wasem
said
over 7 years ago
Thanks for the update, really looking forward to this feature!
Bests,
Pascal
R
Rajtar
said
over 7 years ago
Before release do you have any workaround or quick fix for this problem? Or can you tell what is the approximate release date?
We're waiting for this to be fixed for long time. Our application must load AR worlds from previously downloaded content and is unable to do that on ios, cordova platform.
A
Andreas Schacherbauer
said
over 7 years ago
Our next PhoenGap plugin update is scheduled within the next weeks.
Best regards
Andreas
A
Andreas Schacherbauer
said
over 7 years ago
Hi Pascal and Rafal, We finally released support for loading an Architect World outside of the application bundle folder. This GitHub branch contains the latest changes and will go into master with the release of version 5.2 of our SDK.
You can now use cordova.file.documentsDirectory or cordova.file.dataDirectory (or any other path that is a valid path in the application container) to load an Architect World or assets from.
Best regards
Andreas
P
Pascal.wasem
said
over 7 years ago
Hallo Andreas,
thanks for the implementation and your reply!
I will test this feature as soon as possible.
Bests,
Pascal
A
Andreas Schacherbauer
said
over 7 years ago
That was a quick reply ;)
A feature branch with the same name also exists for our example application, just in case you want to have a look at how we use it ;)
Pascal.wasem