The worst issue is that WKWebView doesn’t allow loading files from the file (file://) protocol like UIWebView does. This is what Cordova uses internally to load files from the www folder. Using an embedded local http server to load the www folder from the http protocol circumvents this issue.
from http://plugins.telerik.com/cordova/plugin/wkwebview so we just need to work out how to get around this. I have Meteor’s webapp in my project and browser-policy but have not worked out the config settings to make this work yet.
My meteor App uses collectionFS and WKWebView, however the iOS App doesn’t use Cordova framework. File download and upload works as long as NO CDN, which is another issue.
When CDN is configured and turned on, then the App uploades file to CDN nodes.
If use FS.HTTP.uploadUrl = Meteor.absoluteUrl() + ‘/cfs/files’; then the upload address is corrected, however got error for “Access-Control-Allow-Origin”, which is understandable.
The Origin http://localhost:12344 is not allowed by Access-Control-Allow-Origin error that this topic is about is a result of CORS requirements. cfs:http-methods is the package CollectionFS uses to receive file uploads, and this where the header needs to be set.
This fix, together with WKWebView support in Meteor 1.3, should allow you to upload files to CollectionFS.
From your output, it seems you are not yet running Meteor 1.3. Make sure you’ve removed any other WKWebView plugins, and update using meteor update --release 1.3-rc.2.
I am using Meteor@1.1.0.3. And if i update this version it is possible that other functionality of my project wont work. Any solution for this version?
after this command meteor update --release 1.3-rc.2 i am not able to build mobile apps. I am getting following error
While adding platform Android to Cordova project:
Cordova error: Failed to fetch platform android@5.1.1
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/URL.
Error: tunneling socket could not be established, cause=connect ETIMEDOUT
(If the error message contains suggestions for a fix, note that this may not apply to the Meteor integration. You can try running
again with the --verbose option to help diagnose the issue.)
This looks like a proxy issue. Are you indeed behind a proxy server? If so, you may need to configure the HTTP_PROXY or HTTPS_PROXY environment variables.