Start a new topic

Unable to determine what the url to load should be

Unable to determine what the url to load should be


Hi there,

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:

www-folder: file:////var/mobile/Containers/Bundle/Application/<UUID1>/SOMENAME.app/www/

vs.

content-folder: file:///var/mobile/Containers/Data/Application/<UUID2>/Library/NoCloud/

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

 

 

 

 

 

 

 

 

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

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

 

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 

 

 

Hi,

We're investigating this and plan to release a fix with our next SDK release end of July.

Greetings

Nicola

 

Is there fix for this by now?

Thx

Hi,

I've the same problem.

Have you a fix for it?

 

Thanks

Pierre

Hi,
We scheduled the issue for our upcoming sprint. It should be released soon.

Best regards

Andreas

Thanks for the update, really looking forward to this feature!

Bests,

Pascal

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.

 

Our next PhoenGap plugin update is scheduled within the next weeks.

Best regards

Andreas

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

Hallo Andreas,

thanks for the implementation and your reply!

I will test this feature as soon as possible.



Bests,

Pascal

 

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 ;)

Best regards

Andreas
Login or Signup to post a comment