GitToTheHub commented on code in PR #937:
URL: 
https://github.com/apache/cordova-plugin-camera/pull/937#discussion_r2594902873


##########
src/ios/CDVCamera.m:
##########
@@ -242,6 +266,38 @@ - (void)showCameraPicker:(NSString*)callbackId 
withOptions:(CDVPictureOptions *)
     });
 }
 
+// Since iOS 14, we can use PHPickerViewController to select images from the 
photo library
+- (void)showPHPicker:(NSString*)callbackId 
withOptions:(CDVPictureOptions*)pictureOptions API_AVAILABLE(ios(14))
+{
+    PHPickerConfiguration *config = [[PHPickerConfiguration alloc] init];

Review Comment:
   I checked the Apple documentation [Marking API Availability in 
Objective-C](https://developer.apple.com/documentation/swift/marking-api-availability-in-objective-c)
 which handles the use of the macro `API_AVAILABLE(ios(xx))` and this is the 
right way. Using this is the same as using `if (@available(iOS 14, *))` in 
Objective-C code.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to