breautek opened a new pull request, #911: URL: https://github.com/apache/cordova-plugin-camera/pull/911
<!-- Please make sure the checklist boxes are all checked before submitting the PR. The checklist is intended as a quick reference, for complete details please see our Contributor Guidelines: http://cordova.apache.org/contribute/contribute_guidelines.html Thanks! --> ### Platforms affected iOS ### Motivation and Context <!-- Why is this change required? What problem does it solve? --> <!-- If it fixes an open issue, please link to the issue here. --> Android had a public API change so that it's returned data is URIs instead of paths. This PR makes iOS do the same thing. Unlike Android, iOS only ever deals with `file://` or `data:` URIs. ### Description <!-- Describe your changes in detail --> The most notable change `- (NSData*) processImage:(UIImage*) info:(NSDictionary*) options:(CDVPictureOptions*)` API implementation got moved to: ```obj-c - (NSData*) processImage:(UIImage*) info:(NSDictionary*) options:(CDVPictureOptions*) outMime:(NSString**) ``` The old API signature calls on the new signature with a `nil` outMime, which if nil, the implementation will not set. `outMime` is a new out parameter. If given an pointer-pointer to a NSString*, it will set it to the MIME type of the encoded type. It's used by a third new method: ```obj-c - (NSString*) processImageAsDataUri:(UIImage*) info:(NSDictionary*) options:(CDVPictureOptions*) ``` which also uses the `processImage` implementation, supplying the `NSString*` to fill in, which is used to prepare the data URI format. The `resultForImage` API was then refactored to make use of these new `processImage` constructs. ### Testing <!-- Please describe in detail how you tested your changes. --> Manual testing on iOS 15 physical device (simulators do not simulate camera hardware 😞) Paramedic tests doesn't run locally for ios platform so I'll let the PR do it's thing. ### Checklist - [x] I've run the tests to see all new and existing tests pass - [x] I added automated test coverage as appropriate for this change - [x] Commit is prefixed with `(platform)` if this change only applies to one platform (e.g. `(android)`) - [x] 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](https://help.github.com/articles/closing-issues-using-keywords/)) - [ ] I've updated the documentation if necessary (Will be making a PR later for v8 Public API changes) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org