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

fix(ios): correctly append exif on iOS 14 #685

Merged
merged 1 commit into from
Oct 28, 2020

Conversation

jcesarmobile
Copy link
Member

Platforms affected

ios

Motivation and Context

on iOS 14 if using <preference name="CameraUsesGeolocation" value="true" /> when trying to append the gps data to the exif the image gets corrupted

closes #674

Description

Testing

Used https://github.com/guilhermefarias/cordova-exif plugin to check the exif of the image after capturing on the provided sample app https://github.com/R4yYx/IOSSampleAPP

Checklist

  • I've run the tests to see all new and existing tests pass
  • I added automated test coverage as appropriate for this change
  • Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android))
  • If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
  • I've updated the documentation if necessary

Copy link
Member

@timbru31 timbru31 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - out of curiosity, do we have any evidence why a copy of the data is required?

@jcesarmobile
Copy link
Member Author

No, but debugging I noticed the data became null/empty on the second CGImageSourceCreateWithData call, while calling it only once didn't, so I used a copy of the data to create the source and the original data for the destination.

@jcesarmobile jcesarmobile merged commit 2d1ee66 into apache:master Oct 28, 2020
@jcesarmobile jcesarmobile deleted the fix-exif-ios14 branch October 28, 2020 17:47
mschulz-716 pushed a commit to mschulz-716/cordova-plugin-camera that referenced this pull request Oct 26, 2021
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

Successfully merging this pull request may close these issues.

IOS 14 - Image file size 0.
3 participants