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

Plugin fails on Cordova iOS 4.0 #61

Open
racekarl opened this issue Jan 26, 2016 · 9 comments
Open

Plugin fails on Cordova iOS 4.0 #61

racekarl opened this issue Jan 26, 2016 · 9 comments

Comments

@racekarl
Copy link

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

@ghost
Copy link

ghost commented Jan 26, 2016

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.

@racekarl
Copy link
Author

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.

@devgeeks
Copy link
Owner

@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 ;)

@ghost
Copy link

ghost commented Jan 26, 2016

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.

@racekarl
Copy link
Author

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)

Canvas2ImagePlugin.txt

@ghost
Copy link

ghost commented Jan 26, 2016

Ok awesome thanks, I'll dig into this in a few days and keep you guys posted.

degt added a commit to degt/Canvas2ImagePlugin that referenced this issue Mar 14, 2016
@SebastianSchirmer
Copy link

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.

@devgeeks
Copy link
Owner

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.

@SebastianSchirmer
Copy link

Ok, I'll discuss within the team

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