-
Notifications
You must be signed in to change notification settings - Fork 218
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
Plugin fails on Cordova iOS 4.0 #61
Comments
there is alot wrong with this plugin and I don't think @devgeeks is actively supporting it. i am interested in either starting a new one or taking this over. |
Yes, @devgeeks mentioned on another issue that this plugin was essentially abandoned, but I figured I would report the issue in case someone else wants to take it over. I'm slogging through a fix for this issue because I need it ASAP to solve a production issue I have, but I am not an Objective C programmer, so I am fumbling in the dark... I will post what I find here, and do let me know if you fork this, replace it, or take it over - I can at least help with testing. |
@createstandard - I would love someone to take it over :( I created the plugin originally as a throwaway as an answer to a stack overflow question and it has gotten a bit out of control ;) |
OK I'll see if I can get some help, I'm not an OBJ C developer (hence why I use Cordova). I have an app that basically revolves around this plugin and I need to update it but I can't until we fix this. Perhaps I can pay someone to fix it for us. Let me do some emailing. |
OK, I got this working on Cordova iOS 4. I have no idea if what I have done is terrible or not, but it does what I need it to do. This functionality is ancillary to my app, so it's not as critical to me as it may be to you @Createstandard. I have attached my copy of Canvas2ImagePlugin.m with my changes (as a text file since that's what github supports) |
Ok awesome thanks, I'll dig into this in a few days and keep you guys posted. |
To anyone who might be interested, we just release another plugin to npm, called cordova-plugin-save-image. This plugin is not using bas64 encoded images but file paths to images available on the device already and copies them to the camera roll / Gallery. We have taken some code element from the Canvas2Image plugin, thx a lot for this. In addition we are considering to maybe take over this one (merge with save-image plugin) going forward. |
As I said before... I would looooove someone to take this over. It obviously fills a need for some people, but it's not something I am keen to maintain. |
Ok, I'll discuss within the team |
Cordova iOS 4 removed several deprecated methods which are used by this plugin, so the plugin crashes when used in an app built with Cordova iOS 4.
For example, this line:
NSData* imageData = [NSData dataFromBase64String:[command.arguments objectAtIndex:0]];
Causes a crash because dataFromBase64String no longer exists in Cordova iOS 4.0:
https://github.com/apache/cordova-ios/blob/master/guides/API%20changes%20in%204.0.md
The text was updated successfully, but these errors were encountered: