From a6ed8d06d4b82f39e1628ac916272eeca2e3e4bb Mon Sep 17 00:00:00 2001 From: Gabriel Donadel Date: Fri, 15 Mar 2024 18:16:37 -0300 Subject: [PATCH] fix(ios): Fix support for react-native 0.74 --- ios/{ImagePickerUtils.m => ImagePickerUtils.mm} | 2 +- react-native-image-picker.podspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename ios/{ImagePickerUtils.m => ImagePickerUtils.mm} (99%) diff --git a/ios/ImagePickerUtils.m b/ios/ImagePickerUtils.mm similarity index 99% rename from ios/ImagePickerUtils.m rename to ios/ImagePickerUtils.mm index 298a243fa..443500d7f 100644 --- a/ios/ImagePickerUtils.m +++ b/ios/ImagePickerUtils.mm @@ -22,7 +22,7 @@ + (void) setupPickerFromOptions:(UIImagePickerController *)picker options:(NSDic if (target == camera) { picker.sourceType = UIImagePickerControllerSourceTypeCamera; - if (options[@"durationLimit"] > 0) { + if ([options[@"durationLimit"] doubleValue] > 0) { picker.videoMaximumDuration = [options[@"durationLimit"] doubleValue]; } diff --git a/react-native-image-picker.podspec b/react-native-image-picker.podspec index 3d469bca0..af4a4d7b0 100644 --- a/react-native-image-picker.podspec +++ b/react-native-image-picker.podspec @@ -15,7 +15,7 @@ Pod::Spec.new do |s| s.source = { :git => "https://github.com/react-native-image-picker/react-native-image-picker.git", :tag => "v#{s.version}" } s.source_files = "ios/*.{h,m,mm}" - s.frameworks = "MobileCoreServices" + s.frameworks = 'Photos','PhotosUI' if defined?(install_modules_dependencies) != nil install_modules_dependencies(s)