From de7b69fee68cdd44202fac07102e3f65a5cb4932 Mon Sep 17 00:00:00 2001 From: Armaan Ahluwalia Date: Fri, 19 Oct 2018 22:26:30 +0530 Subject: [PATCH] ImagePicker: Change dependency of image-picker. This commit replaces react-native-image-picker in favor of react-native-image-crop-picker. It solves a few key issues like being able to - 1) Select multiple images 2) Being able to downsample image quality. See issue #2749 3) Being able to scale down images. 4) Being faster at processing images. The removal of react-native-image-picker was done by: 1) Removing dependency from yarn 2) Running react-native unlink react-native-image-picker 3) Checking the initial commit and removing any code that may not be covered by unlink. For reference the initial commit that introduced changes was 515436a93deb25f. The addition of react-native-image-crop-picker is done by following the installation instructions at https://github.com/ivpusic/react-native-image-crop-picker/blob/07d321e3bc279b0ad218817245264cda6a7c77cb/README.md This involved: 1) Adding the dependency via yarn 2) Running react-native link react-native-image-crop-picker 3) Adding the frameworks under embedded binaries as described by this comment https://github.com/ivpusic/react-native-image-crop-picker/issues/61#issuecomment-244724797 and also under the "Manual" section of the PostInstall steps. Note: We are ignoring a few of the PostInstall steps described in the Readme namely: 1) Changing the deployment target to 8.0 - We already have a higher target set. 2) The steps described in "To localizate the camera / gallery text buttons" - I dont believe this is required and the instructions seem vague. 3) Adding "useSupportLibrary" as described in a previous commit - This is required for cropping images and we don't have that feature enabled currently. When we enable that feature we will want to add this as well. Note: We want to test this commit is working by archiving the project and uploading to TestFlight. --- android/app/build.gradle | 2 +- .../java/com/zulipmobile/MainApplication.java | 4 +- android/settings.gradle | 4 +- ios/ZulipMobile.xcodeproj/project.pbxproj | 124 +++++++++--------- package.json | 4 +- yarn.lock | 7 +- 6 files changed, 72 insertions(+), 73 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index e32444c00c0..033a4923388 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -179,7 +179,7 @@ repositories { dependencies { implementation project(':react-native-text-input-reset') implementation project(':react-native-notifications') - implementation project(':react-native-image-picker') + implementation project(':react-native-image-crop-picker') implementation project(':react-native-orientation') implementation project(':react-native-sentry') implementation project(':@remobile_react-native-toast') diff --git a/android/app/src/main/java/com/zulipmobile/MainApplication.java b/android/app/src/main/java/com/zulipmobile/MainApplication.java index eb529b7515a..c0cf6e4d05a 100644 --- a/android/app/src/main/java/com/zulipmobile/MainApplication.java +++ b/android/app/src/main/java/com/zulipmobile/MainApplication.java @@ -10,7 +10,7 @@ import com.facebook.react.ReactApplication; import com.nikolaiwarner.RNTextInputReset.RNTextInputResetPackage; import com.wix.reactnativenotifications.RNNotificationsPackage; -import com.imagepicker.ImagePickerPackage; +import com.reactnative.ivpusic.imagepicker.PickerPackage; import com.github.yamill.orientation.OrientationPackage; import com.facebook.react.ReactNativeHost; import com.facebook.react.ReactPackage; @@ -53,7 +53,7 @@ protected List getPackages() { return Arrays.asList( new MainReactPackage(), new RNTextInputResetPackage(), - new ImagePickerPackage(), + new PickerPackage(), new OrientationPackage(), new RNSentryPackage(MainApplication.this), new PhotoViewPackage(), diff --git a/android/settings.gradle b/android/settings.gradle index 4a51e265d3b..5ca9addd1b8 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -3,8 +3,8 @@ include ':react-native-text-input-reset' project(':react-native-text-input-reset').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-text-input-reset/android') include ':react-native-notifications' project(':react-native-notifications').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-notifications/android') -include ':react-native-image-picker' -project(':react-native-image-picker').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-image-picker/android') +include ':react-native-image-crop-picker' +project(':react-native-image-crop-picker').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-image-crop-picker/android') include ':react-native-orientation' project(':react-native-orientation').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-orientation/android') include ':react-native-sentry' diff --git a/ios/ZulipMobile.xcodeproj/project.pbxproj b/ios/ZulipMobile.xcodeproj/project.pbxproj index 0660f4f2578..26ad396808d 100644 --- a/ios/ZulipMobile.xcodeproj/project.pbxproj +++ b/ios/ZulipMobile.xcodeproj/project.pbxproj @@ -30,11 +30,14 @@ 3556F3DAC2424EBE9ABF0A31 /* Zocial.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 2E41C86FA25744F998C2BB02 /* Zocial.ttf */; }; 3C289EE01FF361C9002AF37A /* libRCTPushNotification.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3C289E9B1FF3617C002AF37A /* libRCTPushNotification.a */; }; 3C4249EB1EF6E09F00D245F1 /* libRNNotifications.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3C4249E61EF6E05C00D245F1 /* libRNNotifications.a */; }; + 4191D6ED217A5C9900167844 /* RSKImageCropper.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4191D6EC217A5C9900167844 /* RSKImageCropper.framework */; }; + 4191D6EE217A5C9900167844 /* RSKImageCropper.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 4191D6EC217A5C9900167844 /* RSKImageCropper.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 4191D6F1217A5D1B00167844 /* QBImagePicker.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4191D6F0217A5D1B00167844 /* QBImagePicker.framework */; }; + 4191D6F2217A5D1B00167844 /* QBImagePicker.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 4191D6F0217A5D1B00167844 /* QBImagePicker.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 48D1FC73615948D79D3BD31E /* Octicons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = A7F287C57D8A4354A8B6A3E7 /* Octicons.ttf */; }; 49692FC0562C40F3946EC6D4 /* Foundation.ttf in Resources */ = {isa = PBXBuildFile; fileRef = A752523B8D8E49E792F653E1 /* Foundation.ttf */; }; 4B12DC82ECA043809695F227 /* Ionicons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 9DB2E7AE39A448A98E7A4E4A /* Ionicons.ttf */; }; 4CD3C48024294A3A816F4CA9 /* libRNPhotoView.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 09AC2386C1724D5BA93B51E9 /* libRNPhotoView.a */; }; - 757248247DDE47D3A310353E /* libRNImagePicker.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 875BCBF7DC0645ACBA61563B /* libRNImagePicker.a */; }; 78FA95D8058C4372AB199525 /* libRNSound.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6DE2C81628724C8AA4862247 /* libRNSound.a */; }; 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; }; 840D44FCCBB14F97B77D9443 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = B2BC2F95A8684C44BAFA7B11 /* libz.tbd */; }; @@ -53,6 +56,7 @@ CFA67D201EC23BCB0070048E /* UtilManager.m in Sources */ = {isa = PBXBuildFile; fileRef = CFA67D1F1EC23BCB0070048E /* UtilManager.m */; }; CFCFE5491F00158500C295CF /* libRCTCameraRoll.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A155BFEC1DD8E54100A8B695 /* libRCTCameraRoll.a */; }; D6D40984ED07473499B3F0C9 /* libRNDeviceInfo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D5664A74FA8048439CBAB734 /* libRNDeviceInfo.a */; }; + DA25CCABE65E479BBE829484 /* libimageCropPicker.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B5D89A5BDB98410894CAD5CF /* libimageCropPicker.a */; }; DBC5C3186FE64F94BD3CDC19 /* MaterialCommunityIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = A2070A88714C43ED8AF708C3 /* MaterialCommunityIcons.ttf */; }; FF359794CBFF4ABF92423426 /* libRCTToast.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2CFB39BBD9094475BB03A3E4 /* libRCTToast.a */; }; /* End PBXBuildFile section */ @@ -149,13 +153,6 @@ remoteGlobalIDString = 134814201AA4EA6300B7C361; remoteInfo = RCTOrientation; }; - 0A955E371FACB50000801C8D /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = CFBB80590829494E985F601B /* RNImagePicker.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 014A3B5C1C6CF33500B6D375; - remoteInfo = RNImagePicker; - }; 0AE8C1771F1B39AB00E5534E /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = BBB8896EA77146E19DF4FF88 /* LRDRCTSimpleToast.xcodeproj */; @@ -247,6 +244,13 @@ remoteGlobalIDString = 3D383D621EBD27B9005632C8; remoteInfo = "double-conversion-tvOS"; }; + 4191D6EA217A5AA100167844 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D0D4F8D2115D4FEF82895FAF /* imageCropPicker.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 3400A8081CEB54A6008A0BC7; + remoteInfo = imageCropPicker; + }; 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; @@ -459,6 +463,21 @@ }; /* End PBXContainerItemProxy section */ +/* Begin PBXCopyFilesBuildPhase section */ + 4191D6EF217A5C9900167844 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 4191D6EE217A5C9900167844 /* RSKImageCropper.framework in Embed Frameworks */, + 4191D6F2217A5D1B00167844 /* QBImagePicker.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + /* Begin PBXFileReference section */ 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; }; 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = "../node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj"; sourceTree = ""; }; @@ -490,6 +509,8 @@ 3C289E861FF3617C002AF37A /* RCTPushNotification.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTPushNotification.xcodeproj; path = "../node_modules/react-native/Libraries/PushNotificationIOS/RCTPushNotification.xcodeproj"; sourceTree = ""; }; 3C4249C61EF6E05C00D245F1 /* RNNotifications.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RNNotifications.xcodeproj; path = "../node_modules/react-native-notifications/RNNotifications/RNNotifications.xcodeproj"; sourceTree = ""; }; 3C4249EC1EF6E16500D245F1 /* ZulipMobile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = ZulipMobile.entitlements; path = ZulipMobile/ZulipMobile.entitlements; sourceTree = ""; }; + 4191D6EC217A5C9900167844 /* RSKImageCropper.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = RSKImageCropper.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 4191D6F0217A5D1B00167844 /* QBImagePicker.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = QBImagePicker.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 51E1EDA028654E17A35C5BCA /* MaterialIcons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = MaterialIcons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/MaterialIcons.ttf"; sourceTree = ""; }; 5597847AA2A04FEE894C9C9E /* libRCTOrientation.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRCTOrientation.a; sourceTree = ""; }; 66E34CC6219226D10091B852 /* ZulipMobile-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ZulipMobile-Bridging-Header.h"; sourceTree = ""; }; @@ -499,7 +520,6 @@ 713A523038564C27B0D2C2F7 /* RCTOrientation.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RCTOrientation.xcodeproj; path = "../node_modules/react-native-orientation/iOS/RCTOrientation.xcodeproj"; sourceTree = ""; }; 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = ""; }; 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; }; - 875BCBF7DC0645ACBA61563B /* libRNImagePicker.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNImagePicker.a; sourceTree = ""; }; 8B355454DEEB4F28A5B4F8CA /* RNSafeArea.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNSafeArea.xcodeproj; path = "../node_modules/react-native-safe-area/ios/RNSafeArea.xcodeproj"; sourceTree = ""; }; 96B2280917D24AE692AD70FE /* SafariViewManager.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = SafariViewManager.xcodeproj; path = "../node_modules/react-native-safari-view/SafariViewManager.xcodeproj"; sourceTree = ""; }; 9DB2E7AE39A448A98E7A4E4A /* Ionicons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Ionicons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Ionicons.ttf"; sourceTree = ""; }; @@ -516,6 +536,7 @@ AEF58326BC25479294083E9C /* EvilIcons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = EvilIcons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/EvilIcons.ttf"; sourceTree = ""; }; AF03F5DAC0924A13BDD49574 /* RNSound.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNSound.xcodeproj; path = "../node_modules/react-native-sound/RNSound.xcodeproj"; sourceTree = ""; }; B2BC2F95A8684C44BAFA7B11 /* libz.tbd */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; }; + B5D89A5BDB98410894CAD5CF /* libimageCropPicker.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libimageCropPicker.a; sourceTree = ""; }; B83DDAD2507A4F0EB47660BD /* libRNSentry.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNSentry.a; sourceTree = ""; }; BBB8896EA77146E19DF4FF88 /* LRDRCTSimpleToast.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = LRDRCTSimpleToast.xcodeproj; path = "../node_modules/react-native-simple-toast/ios/LRDRCTSimpleToast.xcodeproj"; sourceTree = ""; }; C2F7E19951E64FC7B6BBE612 /* libRNFetchBlob.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNFetchBlob.a; sourceTree = ""; }; @@ -524,7 +545,7 @@ CF6D016517D74B509DBD05DC /* Feather.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Feather.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Feather.ttf"; sourceTree = ""; }; CFA67D1F1EC23BCB0070048E /* UtilManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = UtilManager.m; path = ZulipMobile/UtilManager.m; sourceTree = ""; }; CFA67D211EC23BDD0070048E /* UtilManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = UtilManager.h; path = ZulipMobile/UtilManager.h; sourceTree = ""; }; - CFBB80590829494E985F601B /* RNImagePicker.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNImagePicker.xcodeproj; path = "../node_modules/react-native-image-picker/ios/RNImagePicker.xcodeproj"; sourceTree = ""; }; + D0D4F8D2115D4FEF82895FAF /* imageCropPicker.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = imageCropPicker.xcodeproj; path = "../node_modules/react-native-image-crop-picker/ios/imageCropPicker.xcodeproj"; sourceTree = ""; }; D5664A74FA8048439CBAB734 /* libRNDeviceInfo.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNDeviceInfo.a; sourceTree = ""; }; E518466F398E458DA2C685AF /* libSafariViewManager.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libSafariViewManager.a; sourceTree = ""; }; F56CBB1B9A6449F895C858C6 /* Entypo.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Entypo.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Entypo.ttf"; sourceTree = ""; }; @@ -547,8 +568,10 @@ files = ( 3C289EE01FF361C9002AF37A /* libRCTPushNotification.a in Frameworks */, A146BE491FDB4C640090EA06 /* libART.a in Frameworks */, + 4191D6ED217A5C9900167844 /* RSKImageCropper.framework in Frameworks */, 3C4249EB1EF6E09F00D245F1 /* libRNNotifications.a in Frameworks */, CFCFE5491F00158500C295CF /* libRCTCameraRoll.a in Frameworks */, + 4191D6F1217A5D1B00167844 /* QBImagePicker.framework in Frameworks */, A14EA8771EACE522009D9E83 /* libRCTAnimation.a in Frameworks */, 146834051AC3E58100842450 /* libReact.a in Frameworks */, 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */, @@ -572,7 +595,7 @@ 4CD3C48024294A3A816F4CA9 /* libRNPhotoView.a in Frameworks */, C866080E83494D1C8B535591 /* libRNSafeArea.a in Frameworks */, C9F58827F1CF47999850925A /* libRCTOrientation.a in Frameworks */, - 757248247DDE47D3A310353E /* libRNImagePicker.a in Frameworks */, + DA25CCABE65E479BBE829484 /* libimageCropPicker.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -654,14 +677,6 @@ name = Products; sourceTree = ""; }; - 0A955E311FACB50000801C8D /* Products */ = { - isa = PBXGroup; - children = ( - 0A955E381FACB50000801C8D /* libRNImagePicker.a */, - ); - name = Products; - sourceTree = ""; - }; 0AE8C1741F1B39AA00E5534E /* Products */ = { isa = PBXGroup; children = ( @@ -772,6 +787,14 @@ name = Products; sourceTree = ""; }; + 4191D6E7217A5AA100167844 /* Products */ = { + isa = PBXGroup; + children = ( + 4191D6EB217A5AA100167844 /* libimageCropPicker.a */, + ); + name = Products; + sourceTree = ""; + }; 78C398B11ACF4ADC00677621 /* Products */ = { isa = PBXGroup; children = ( @@ -811,7 +834,7 @@ 06D71A26F8704D96B8C2D342 /* RNPhotoView.xcodeproj */, 8B355454DEEB4F28A5B4F8CA /* RNSafeArea.xcodeproj */, 713A523038564C27B0D2C2F7 /* RCTOrientation.xcodeproj */, - CFBB80590829494E985F601B /* RNImagePicker.xcodeproj */, + D0D4F8D2115D4FEF82895FAF /* imageCropPicker.xcodeproj */, ); name = Libraries; sourceTree = ""; @@ -828,6 +851,8 @@ 83CBB9F61A601CBA00E9B192 = { isa = PBXGroup; children = ( + 4191D6F0217A5D1B00167844 /* QBImagePicker.framework */, + 4191D6EC217A5C9900167844 /* RSKImageCropper.framework */, A148FEFB1E9D8CB900479280 /* zulip.mp3 */, CF6CFE2C1E7DC55100F687C7 /* Build-Phases */, 13B07FAE1A68108700A75B9A /* ZulipMobile */, @@ -925,7 +950,7 @@ 09AC2386C1724D5BA93B51E9 /* libRNPhotoView.a */, 1AED53B5E6AA4E0AA52DB0C1 /* libRNSafeArea.a */, 5597847AA2A04FEE894C9C9E /* libRCTOrientation.a */, - 875BCBF7DC0645ACBA61563B /* libRNImagePicker.a */, + B5D89A5BDB98410894CAD5CF /* libimageCropPicker.a */, ); name = "Recovered References"; sourceTree = ""; @@ -1003,6 +1028,7 @@ 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, CF6CFE0C1E7DC27200F687C7 /* Run Script */, 6FD412E618344A7FB938E4AC /* Upload Debug Symbols to Sentry */, + 4191D6EF217A5C9900167844 /* Embed Frameworks */, ); buildRules = ( ); @@ -1057,6 +1083,10 @@ ProductGroup = A1E053B11FDB490D002A87B7 /* Products */; ProjectRef = A1E053B01FDB490D002A87B7 /* ART.xcodeproj */; }, + { + ProductGroup = 4191D6E7217A5AA100167844 /* Products */; + ProjectRef = D0D4F8D2115D4FEF82895FAF /* imageCropPicker.xcodeproj */; + }, { ProductGroup = 0AE8C1741F1B39AA00E5534E /* Products */; ProjectRef = BBB8896EA77146E19DF4FF88 /* LRDRCTSimpleToast.xcodeproj */; @@ -1133,10 +1163,6 @@ ProductGroup = CFCFE50D1F0011FA00C295CF /* Products */; ProjectRef = FC7EC6A752C243FB9F1B8442 /* RNFetchBlob.xcodeproj */; }, - { - ProductGroup = 0A955E311FACB50000801C8D /* Products */; - ProjectRef = CFBB80590829494E985F601B /* RNImagePicker.xcodeproj */; - }, { ProductGroup = 3C4249C71EF6E05C00D245F1 /* Products */; ProjectRef = 3C4249C61EF6E05C00D245F1 /* RNNotifications.xcodeproj */; @@ -1259,13 +1285,6 @@ remoteRef = 0A955E341FACB50000801C8D /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; - 0A955E381FACB50000801C8D /* libRNImagePicker.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRNImagePicker.a; - remoteRef = 0A955E371FACB50000801C8D /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; 0AE8C1781F1B39AB00E5534E /* libLRDRCTSimpleToast.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; @@ -1357,6 +1376,13 @@ remoteRef = 3C5B4CA01F298ECA00A22BBE /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; + 4191D6EB217A5AA100167844 /* libimageCropPicker.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libimageCropPicker.a; + remoteRef = 4191D6EA217A5AA100167844 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; 78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; @@ -1711,7 +1737,7 @@ "$(SRCROOT)/../node_modules/react-native-photo-view/ios/**", "$(SRCROOT)/../node_modules/react-native-safe-area/ios/RNSafeArea", "$(SRCROOT)/../node_modules/react-native-orientation/iOS/RCTOrientation/**", - "$(SRCROOT)/../node_modules/react-native-image-picker/ios", + "$(SRCROOT)/../node_modules/react-native-image-crop-picker/ios/**", ); INFOPLIST_FILE = ZulipMobileTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.0; @@ -1719,19 +1745,6 @@ LIBRARY_SEARCH_PATHS = ( "$(inherited)", "\"$(SRCROOT)/$(TARGET_NAME)\"", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - "\"$(SRCROOT)/$(TARGET_NAME)\"", ); OTHER_LDFLAGS = ( "$(inherited)", @@ -1763,7 +1776,7 @@ "$(SRCROOT)/../node_modules/react-native-photo-view/ios/**", "$(SRCROOT)/../node_modules/react-native-safe-area/ios/RNSafeArea", "$(SRCROOT)/../node_modules/react-native-orientation/iOS/RCTOrientation/**", - "$(SRCROOT)/../node_modules/react-native-image-picker/ios", + "$(SRCROOT)/../node_modules/react-native-image-crop-picker/ios/**", ); INFOPLIST_FILE = ZulipMobileTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.0; @@ -1771,19 +1784,6 @@ LIBRARY_SEARCH_PATHS = ( "$(inherited)", "\"$(SRCROOT)/$(TARGET_NAME)\"", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - "\"$(SRCROOT)/$(TARGET_NAME)\"", ); OTHER_LDFLAGS = ( "$(inherited)", @@ -1820,7 +1820,7 @@ "$(SRCROOT)/../node_modules/react-native-photo-view/ios/**", "$(SRCROOT)/../node_modules/react-native-safe-area/ios/RNSafeArea", "$(SRCROOT)/../node_modules/react-native-orientation/iOS/RCTOrientation/**", - "$(SRCROOT)/../node_modules/react-native-image-picker/ios", + "$(SRCROOT)/../node_modules/react-native-image-crop-picker/ios/**", ); INFOPLIST_FILE = ZulipMobile/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.0; @@ -1865,7 +1865,7 @@ "$(SRCROOT)/../node_modules/react-native-photo-view/ios/**", "$(SRCROOT)/../node_modules/react-native-safe-area/ios/RNSafeArea", "$(SRCROOT)/../node_modules/react-native-orientation/iOS/RCTOrientation/**", - "$(SRCROOT)/../node_modules/react-native-image-picker/ios", + "$(SRCROOT)/../node_modules/react-native-image-crop-picker/ios/**", ); INFOPLIST_FILE = ZulipMobile/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.0; diff --git a/package.json b/package.json index c1af8c15b53..25b0235597c 100644 --- a/package.json +++ b/package.json @@ -56,8 +56,7 @@ "react-intl": "^2.4.0", "react-native": "0.57.1", "react-native-device-info": "^0.21.5", - "rn-fetch-blob": "^0.10.13", - "react-native-image-picker": "^0.26.10", + "react-native-image-crop-picker": "^0.21.2", "react-native-notifications": "^1.2.0", "react-native-orientation": "^3.1.3", "react-native-photo-view": "alwx/react-native-photo-view#c58fd6b30", @@ -79,6 +78,7 @@ "redux-persist": "^4.10.2", "redux-thunk": "^2.1.0", "reselect": "^3.0.1", + "rn-fetch-blob": "^0.10.13", "string.fromcodepoint": "^0.2.1", "timezone": "^1.0.13", "url-parse": "^1.4.0", diff --git a/yarn.lock b/yarn.lock index 01d3dcfa425..b71b484fb3e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7202,10 +7202,9 @@ react-native-drawer-layout@1.3.2: dependencies: react-native-dismiss-keyboard "1.0.0" -react-native-image-picker@^0.26.10: - version "0.26.10" - resolved "https://registry.yarnpkg.com/react-native-image-picker/-/react-native-image-picker-0.26.10.tgz#0bb9ab928984948c67aee0b9e64216bee007a9fc" - integrity sha512-z6gAbru2E6SyGWm4ZTbiM9hPHZ5Tsl9kXGfRxW6YQXf9us7zybKoS7dKE1fQPsssv/OSvpPDKannJNncE+ATRA== +react-native-image-crop-picker@^0.21.2: + version "0.21.2" + resolved "https://registry.yarnpkg.com/react-native-image-crop-picker/-/react-native-image-crop-picker-0.21.2.tgz#f0e7ad4615f1f7c79ba25e2e7708042e306d258e" react-native-notifications@^1.2.0: version "1.2.0"