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

Missing image results in promise never resolving on iOS #50

Open
daamsie opened this issue Jan 2, 2024 · 0 comments
Open

Missing image results in promise never resolving on iOS #50

daamsie opened this issue Jan 2, 2024 · 0 comments

Comments

@daamsie
Copy link

daamsie commented Jan 2, 2024

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.

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

1 participant