i18n does not work in apps packed with Voltbuilder. Packing for ios and android without any error. Same app packed as PWA i18n is working. What could be the problem?
Are you testing on iOS or Android?
Have you looked at the device browser Console for messages?
I tested it on iOS.
Any messages in the device’s Safari Console?
No messages in Safari console.
Is it the same on Android?
It looks like VoltBuilder did its job properly, but something in the native environment is stopping it from working. You’ll need to trace where it’s working differently than the desktop.
I have not tested it on android up now.
But I have taken nsb appstudio test project “i18n” and packed it with Voltbuilder for ios.
It did’nt work. You can try it by yourself.
Excellent - we’ll get to work.
Some work done already - the problem does not happen on Android. Testing iOS next…
Are here any news?
I have tested nsb test project “i18n” again. It runs fine as PWA-app. When I am packing it with Voltbuilder (no errors), no translations from one language to other language takes place.
This means, that here is an error in NSB Corp. responsibility.
Please help. In this status I cannot distribute the app to apple store.
Ah! I thought the problem was that it didn’t load at all on iOS. I’ll run some more tests.
Looks like it’s a similar problem as with OpenStreetMaps:
Cross origin requests are only supported for HTTP.
XMLHttpRequest cannot load file:///private/var/containers/Bundle/Application/FBCA302A-FDEC-4951-9301-32285C050F16/HelloWorld.app/www/i18n/de.json due to access control checks.
We’ll look at the solution.
BTW, these messages are from the Safari Remote Console, which I asked you about earlier. Were you able to look at that?
I tested “LeafletMap” again. Safari remote console shows same error: bootstrap.js and bootstrap.css not found!
Have another look - it’s the bootstrap.min.css.map which is missing, not Bootstrap itself.
https://blog.appstudio.dev/2013/08/chrome-cant-find-query-min-map/
Here’s what is in my Safari window on the iOS device:
You are right. Bootstrap.bundle.min.js.map is not the problem.
It seems, that file “de.json” has a CORS problem. I cannot access this file, because of access control checks. But what can I do here? So I understand it, CORS is a server side protection. What can I do in nsb appbuilder to allow the access to “de.json”?
I have inserted following code in “i18n” projects “contentSecurityPolicy”:
No success! What can I do more?