react-native-exif icon indicating copy to clipboard operation
react-native-exif copied to clipboard

Missing image results in promise never resolving on iOS

Open daamsie opened this issue 1 year ago • 0 comments

In my testing on iOS I noticed promises were not being resolved for my images (using ph:// prefix)

Digging deeper into the native code I found this code containing the resolve()

if (mySourceRef != NULL)
            {
                NSDictionary *exif = (__bridge NSDictionary *)CGImageSourceCopyPropertiesAtIndex(mySourceRef,0,NULL);
                CFRelease(mySourceRef);

                NSDictionary *mutableExif = [exif mutableCopy];
                [mutableExif setValue:path forKey:@"originalUri"];
                resolve(mutableExif);
            }

but if mySourceRef == NULL it is not handled and nothing is ever returned.

I am still looking into why my file paths are not working, but I think this error should be handled better regardless.

daamsie avatar Jan 02 '24 21:01 daamsie