Open trevorwat opened 8 years ago
Thanks for your feedback. We are currently in the progress of extending TypedArray support on iOS. Please stay tuned for that.
Hello. There is an issue in JavaScriptCore engine (that is WebKit) https://bugs.webkit.org/show_bug.cgi?id=158576. It has been closed recently but there is no telling when they merge it and release it. I would file an issue in Cordova bug tracker. Closing for now.
We can provide a fix in our iOS implementation in the mean time, probably in the next couple of days.
A workaround for you until we support atob
, btoa
on iOS is to include a dependency to base64 in your package.json
"dependencies": {
"tabris": "1.8.0",
"Base64": "^0.3.0"
}
and require it before using the file plugin, e.g. like this:
if(device.platform === "iOS") {
var base64 = require('base64');
global.btoa = base64.btoa;
global.atob = base64.atob;
}
See also
The functions are available in iOS as can be seen here: https://caniuse.com/#search=btoa
Closing as "no action needed".
This issue was closed by mistake (see https://github.com/eclipsesource/tabris-js/issues/2071). Reopening.
Hi, While using the cordova-plugin-file I have found an inconsistency between IOS and Android. Android reads binary files as array buffer's fine, but IOS does not (I'll then be using JPEGJS to decode it into ImageData and write it to a canvas.. this works ok on Android but I can't read in the binary image data in IOS).
Here's some sample code that works in the scratchpad to illustrate the problem... it extends the file browser to allow reading image (png files as I the demo app has some easy to find png's we can use) and just outputs to the console when it has worked.