I'm looking to convert base64 to blob in objective-c.
I'm having trouble finding a solution on stack overflow.
function base64_to_blob(base64String) {
var byteString = window.atob(base64String);
var array = new Uint8Array(byteString.length);
for (var i = 0; I < byteString.length; I++) {
array[i] = byteString.charCodeAt(i);
}
var blob = new Blob([array], {
type: ‘image / jpeg’,
name: “image.jpg”
});
return blob;
}
If anyone can help me with this, I would greatly appreciate it.