-
Notifications
You must be signed in to change notification settings - Fork 2
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
Change picker to Finder for import when running on macOS #5
base: rma-androidx-33
Are you sure you want to change the base?
Conversation
- Do not use the new picker because it strips EXIF information - Do not request Storage permission, because its unnecessary with file Intent on newer Android versions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't see any critical problems.
@@ -459,56 +470,99 @@ - (NSData*)processImage:(UIImage*)image info:(NSDictionary*)info options:(CDVPic | |||
return data; | |||
} | |||
|
|||
- (void)picker:(PHPickerViewController *)picker didFinishPicking:(NSArray<PHPickerResult *> *)results API_AVAILABLE(ios(14)) { | |||
- (void)documentPicker:(UIDocumentPickerViewController *)controller | |||
didPickDocumentsAtURLs:(NSArray<NSURL *> *)urls; { | |||
__weak CDVCamera* weakSelf = self; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't used anywhere.
[self sendErrorResultWithMessage]; | ||
} | ||
|
||
- (void)sendErrorResultWithMessage { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does more than the naming implies. More like onEndSelectionWithoutImage. And use it also in other instances (e.g. insisde picker:didFinishPicking:)
|
||
- (void)handleImageFromPicker:(UIImage *)original withData:(NSData *)data { | ||
|
||
__weak CDVCamera* weakSelf = self; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weak reference is unncessary at this point.
When running on macOS as an emulated iOS app we can use the Finder for picking image.
Till now the user could only chose from images in Apple Photos.
Now the user can chose from the whole filesystem. (But only files with image extension)