Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to save in IOS -- Security Error 18 #49

Open
arulapj opened this issue Jun 8, 2015 · 3 comments
Open

unable to save in IOS -- Security Error 18 #49

arulapj opened this issue Jun 8, 2015 · 3 comments

Comments

@arulapj
Copy link

arulapj commented Jun 8, 2015

Hi,

trying to use this plugin for ios, its working in android but not in ios, please note i am using phonegap build to compile ipa

code

index.html

script.js
[code]
function uploadImage(rul) {
var canvas = document.getElementById("myCanvas");
var context = canvas.getContext("2d");
var imageObj = new Image();
imageObj.src = rul;
imageObj.onload = function () {
try{
canvas.width = imageObj.width;
canvas.height = imageObj.height;
context.drawImage(imageObj, 0, 0);
window.canvas2ImagePlugin.saveImageDataToLibrary(
function(msg){
alert(JSON.stringify(msg));
},
function(err){
alert(JSON.stringify(err));
},
document.getElementById('myCanvas')
);
}catch(e){alert("ERROR:"+JSON.stringify(e));}
};
}
uploadImage("http://icdn.indiaglitz.com/hindi/gallery/Actress/PriyankaChopra/Priyanka_Chopra_8615_218.jpg");

[/code]

config.xml

<gap:plugin name="org.devgeeks.canvas2imageplugin" version="0.6.0" source="plugins.cordova.io" />

i am getting following error when excuted
{"code":18,"name":"SecurityError", "message":"SecurityError: DOM Exception 18","line":22,"column":45,"sourceURL":"file:///private/var/mobile/Containers/Data..../www/plugins/../Canvas2ImagePlugin.js"}

the same thing worked for android

@arulapj arulapj changed the title unable to save in IOS8.1 unable to save in IOS8.1 -- Security Error 18 Jun 8, 2015
@arulapj arulapj changed the title unable to save in IOS8.1 -- Security Error 18 unable to save in IOS -- Security Error 18 Jun 8, 2015
@EdwinRikkers
Copy link

+1 for this issue... any known workaround for this ????

@beaur
Copy link

beaur commented Feb 7, 2016

+1 having the same issue here. Is there a solution?

@beaur
Copy link

beaur commented Feb 8, 2016

Seems the issue only appears if using the WKWebView plugin. I've disabled that for now but hopefully there is a workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants