SnappFr / react-native-image-base64

Simple react native library to convert an image to a base64 string 🌄
MIT License
49 stars 28 forks source link

iOS getBase64 method, does it work? #1

Closed jgfidelis closed 6 years ago

jgfidelis commented 6 years ago

the method receives a NSURL. According to doc, this are the types supported:

string (NSString)
number (NSInteger, float, double, CGFloat, NSNumber)
boolean (BOOL, NSNumber)
array (NSArray) of any types from this list
object (NSDictionary) with string keys and values of any type from this list
function (RCTResponseSenderBlock)

What you could do is receive the url as a NSString and convert it to NSURL, it is a simple fix.

I just wanted to know: does it currently work? I cannot test it right now, but will try later.

Thanks!

Michaelvilleneuve commented 6 years ago

Hey, yes it is working, no need to convert it from NSString to NSUrl. :)