From ddf03e1372bed8634946e52071cb7dfc9a88b75c Mon Sep 17 00:00:00 2001 From: Chris Duarte Date: Fri, 28 Apr 2017 06:24:55 -0700 Subject: [PATCH] RN-79: Images uploaded from React Native get renamed (#509) --- NOTICE.txt | 29 +++----- android/app/build.gradle | 2 +- android/app/src/main/AndroidManifest.xml | 1 + .../java/com/mattermost/MainActivity.java | 1 - .../java/com/mattermost/MainApplication.java | 4 +- android/build.gradle | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- android/settings.gradle | 4 +- app/actions/views/file_upload.js | 7 +- .../file_attachment_list/file_attachment.js | 9 ++- app/components/post_textbox/post_textbox.js | 57 ++++++++------- ios/Mattermost.xcodeproj/project.pbxproj | 70 ++++++++----------- package.json | 2 +- 13 files changed, 90 insertions(+), 100 deletions(-) diff --git a/NOTICE.txt b/NOTICE.txt index 2ff44674d..bd6ae4de6 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -868,35 +868,24 @@ SOFTWARE. --- -## react-native-image-crop-picker +## react-native-image-picker + +A React Native module that allows you to use native UI to select a photo/video from the device library or directly from the camera. -This product contains 'react-native-image-crop-picker', a library to provide access to the camera and photo library on both iOS and Android * HOMEPAGE - * https://github.com/ivpusic/react-native-image-crop-picker/ + * https://github.com/react-community/react-native-image-picker * LICENSE -MIT License +The MIT License (MIT) -Copyright (c) 2017 Ivan Pusic +Copyright (c) 2015 Marc Shilling -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --- diff --git a/android/app/build.gradle b/android/app/build.gradle index 2a0fdd760..b7f463aab 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -144,6 +144,7 @@ android { } dependencies { + compile project(':react-native-image-picker') compile project(':react-native-smart-splashscreen') compile project(':react-native-orientation') compile project(':react-native-bottom-sheet') @@ -154,7 +155,6 @@ dependencies { compile project(':react-native-device-info') compile project(':react-native-cookies') compile project(':react-native-linear-gradient') - compile project(':react-native-image-crop-picker') compile project(':react-native-vector-icons') compile project(':react-native-svg') compile fileTree(dir: "libs", include: ["*.jar"]) diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index b635ad036..d14a98ef0 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -13,6 +13,7 @@ + diff --git a/android/app/src/main/java/com/mattermost/MainActivity.java b/android/app/src/main/java/com/mattermost/MainActivity.java index 37acf3781..8d6aaa92a 100644 --- a/android/app/src/main/java/com/mattermost/MainActivity.java +++ b/android/app/src/main/java/com/mattermost/MainActivity.java @@ -4,7 +4,6 @@ import com.facebook.react.ReactActivity; import com.github.yamill.orientation.OrientationPackage; import com.psykar.cookiemanager.CookieManagerPackage; import com.BV.LinearGradient.LinearGradientPackage; -import com.reactnative.ivpusic.imagepicker.PickerPackage; import android.content.Intent; import android.content.res.Configuration; import android.os.Bundle; diff --git a/android/app/src/main/java/com/mattermost/MainApplication.java b/android/app/src/main/java/com/mattermost/MainApplication.java index f3ffff7a5..aa8b397f0 100644 --- a/android/app/src/main/java/com/mattermost/MainApplication.java +++ b/android/app/src/main/java/com/mattermost/MainApplication.java @@ -4,6 +4,7 @@ import android.app.Application; import android.util.Log; import com.facebook.react.ReactApplication; +import com.imagepicker.ImagePickerPackage; import com.gnet.bottomsheet.RNBottomSheetPackage; import com.learnium.RNDeviceInfo.RNDeviceInfo; import com.psykar.cookiemanager.CookieManagerPackage; @@ -16,7 +17,6 @@ import com.facebook.react.ReactPackage; import com.facebook.react.shell.MainReactPackage; import com.facebook.soloader.SoLoader; import com.BV.LinearGradient.LinearGradientPackage; -import com.reactnative.ivpusic.imagepicker.PickerPackage; import com.reactnativecomponent.splashscreen.RCTSplashScreenPackage; import com.github.yamill.orientation.OrientationPackage; @@ -35,6 +35,7 @@ public class MainApplication extends Application implements ReactApplication { protected List getPackages() { return Arrays.asList( new MainReactPackage(), + new ImagePickerPackage(), new RCTSplashScreenPackage(), new RNBottomSheetPackage(), new RNDeviceInfo(), @@ -43,7 +44,6 @@ public class MainApplication extends Application implements ReactApplication { new VectorIconsPackage(), new SvgPackage(), new LinearGradientPackage(), - new PickerPackage(), new OrientationPackage() ); } diff --git a/android/build.gradle b/android/build.gradle index 10fddbb49..238f98527 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -5,7 +5,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:1.3.1' + classpath 'com.android.tools.build:gradle:2.2.+' classpath 'com.google.gms:google-services:3.0.0' // NOTE: Do not place your application dependencies here; they belong diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index b9fbfaba0..dbdc05d27 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip diff --git a/android/settings.gradle b/android/settings.gradle index 3d0a39ce9..2b8a40c5e 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -1,4 +1,6 @@ rootProject.name = 'Mattermost' +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-smart-splashscreen' project(':react-native-smart-splashscreen').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-smart-splash-screen/android') include ':react-native-bottom-sheet' @@ -17,7 +19,5 @@ include ':react-native-orientation' project(':react-native-orientation').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-orientation/android') include ':react-native-linear-gradient' project(':react-native-linear-gradient').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-linear-gradient/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-svg' project(':react-native-svg').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-svg/android') diff --git a/app/actions/views/file_upload.js b/app/actions/views/file_upload.js index 6003fc547..0017a9cbc 100644 --- a/app/actions/views/file_upload.js +++ b/app/actions/views/file_upload.js @@ -18,8 +18,7 @@ export function handleUploadFiles(files, rootId) { const clientIds = []; files.forEach((file) => { - const name = file.path.split('/').pop(); - const mimeType = lookupMimeType(name); + const mimeType = lookupMimeType(file.fileName); const clientId = generateId(); clientIds.push({ @@ -28,8 +27,8 @@ export function handleUploadFiles(files, rootId) { }); const fileData = { - uri: file.path, - name, + uri: file.uri, + name: file.fileName, type: mimeType }; diff --git a/app/components/file_attachment_list/file_attachment.js b/app/components/file_attachment_list/file_attachment.js index 226fbfcf9..41ab992dd 100644 --- a/app/components/file_attachment_list/file_attachment.js +++ b/app/components/file_attachment_list/file_attachment.js @@ -24,11 +24,16 @@ export default class FileAttachment extends PureComponent { addFileToFetchCache: PropTypes.func.isRequired, fetchCache: PropTypes.object.isRequired, file: PropTypes.object.isRequired, - onInfoPress: PropTypes.func.isRequired, - onPreviewPress: PropTypes.func.isRequired, + onInfoPress: PropTypes.func, + onPreviewPress: PropTypes.func, theme: PropTypes.object.isRequired }; + static defaultProps = { + onInfoPress: () => true, + onPreviewPress: () => true + } + renderFileInfo() { const {file, theme} = this.props; const style = getStyleSheet(theme); diff --git a/app/components/post_textbox/post_textbox.js b/app/components/post_textbox/post_textbox.js index fdb379fe3..ddce06386 100644 --- a/app/components/post_textbox/post_textbox.js +++ b/app/components/post_textbox/post_textbox.js @@ -13,7 +13,7 @@ import { Text } from 'react-native'; import Icon from 'react-native-vector-icons/Ionicons'; -import ImagePicker from 'react-native-image-crop-picker'; +import ImagePicker from 'react-native-image-picker'; import {injectIntl, intlShape} from 'react-intl'; import {RequestStatus} from 'mattermost-redux/constants'; @@ -176,33 +176,42 @@ class PostTextbox extends PureComponent { this.autocomplete = c; }; - attachFileFromCamera = async () => { - try { - this.props.actions.closeModal(); - const image = await ImagePicker.openCamera({ - compressImageQuality: 0.5 - }); + attachFileFromCamera = () => { + this.props.actions.closeModal(); - this.uploadFiles([image]); - } catch (error) { - // If user cancels it's considered - // an error and we have to catch it. - } + const options = { + quality: 0.5, + noData: true, + storageOptions: { + cameraRoll: true, + waitUntilSaved: true + } + }; + + ImagePicker.launchCamera(options, (response) => { + if (response.error) { + return; + } + + this.uploadFiles([response]); + }); }; - attachFileFromLibrary = async () => { - try { - this.props.actions.closeModal(); - const images = await ImagePicker.openPicker({ - multiple: true, - compressImageQuality: 0.5 - }); + attachFileFromLibrary = () => { + this.props.actions.closeModal(); - this.uploadFiles(images); - } catch (error) { - // If user cancels it's considered - // an error and we have to catch it. - } + const options = { + quality: 0.5, + noData: true + }; + + ImagePicker.launchImageLibrary(options, (response) => { + if (response.error) { + return; + } + + this.uploadFiles([response]); + }); }; uploadFiles = (images) => { diff --git a/ios/Mattermost.xcodeproj/project.pbxproj b/ios/Mattermost.xcodeproj/project.pbxproj index 671ae37a0..49506a675 100644 --- a/ios/Mattermost.xcodeproj/project.pbxproj +++ b/ios/Mattermost.xcodeproj/project.pbxproj @@ -24,16 +24,12 @@ 146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; 1BCA51319AC6442991C6A208 /* Zocial.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 0A091BF1A3D04650AD306A0D /* Zocial.ttf */; }; 2B4C9B708010475DA575B81D /* SimpleLineIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = F1F071EE85494E269A50AE88 /* SimpleLineIcons.ttf */; }; + 2E3655C7E15049DBBC3A666B /* libRNImagePicker.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DFE628F5A526417D85AD635E /* libRNImagePicker.a */; }; 374634801E8480C2005E1244 /* libRCTOrientation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 374634671E848085005E1244 /* libRCTOrientation.a */; }; - 37DA4BA61E6F55D3002B058E /* RSKImageCropper.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 37DA4BA51E6F55D3002B058E /* RSKImageCropper.framework */; }; - 37DA4BA71E6F55D3002B058E /* RSKImageCropper.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 37DA4BA51E6F55D3002B058E /* RSKImageCropper.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 37DA4BA91E6F55D3002B058E /* QBImagePicker.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 37DA4BA81E6F55D3002B058E /* QBImagePicker.framework */; }; - 37DA4BAA1E6F55D3002B058E /* QBImagePicker.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 37DA4BA81E6F55D3002B058E /* QBImagePicker.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 382D94CF15EE4FC292C3F341 /* Foundation.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 51F5A483EA9F4A9A87ACFB59 /* Foundation.ttf */; }; 3D38ABA732A34A9BB3294F90 /* EvilIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 349FBA7338E74D9BBD709528 /* EvilIcons.ttf */; }; 420A7328E12C4B72AEF420CE /* Octicons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = EDC04CBCF81642219D199CBB /* Octicons.ttf */; }; 584837D6B55F405F908A2053 /* libBVLinearGradient.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ACC6B9FDC0AD45A6BFA4FBCD /* libBVLinearGradient.a */; }; - 587E8EEB59DB4EC38F6940BF /* libimageCropPicker.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 37A98FBBA38D48E786B32BAD /* libimageCropPicker.a */; }; 5E1AF7B72B8D4A4E9E53FF9D /* FontAwesome.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 005346E5C0E542BFABAE1411 /* FontAwesome.ttf */; }; 5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */; }; 7F292A711E8AB73400A450A3 /* SplashScreenResource in Resources */ = {isa = PBXBuildFile; fileRef = 7F292A701E8AB73400A450A3 /* SplashScreenResource */; }; @@ -124,6 +120,13 @@ remoteGlobalIDString = 134814201AA4EA6300B7C361; remoteInfo = RCTOrientation; }; + 3779BE9F1EB1235400D081C1 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 85E82BCA0FD245EEA520D106 /* RNImagePicker.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 014A3B5C1C6CF33500B6D375; + remoteInfo = RNImagePicker; + }; 37D8FEC11E80B5230091F3BD /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 7DCC3D826CE640AF8F491692 /* BVLinearGradient.xcodeproj */; @@ -131,13 +134,6 @@ remoteGlobalIDString = 134814201AA4EA6300B7C361; remoteInfo = BVLinearGradient; }; - 37DA4B791E6F5419002B058E /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = F9678BD770064C20ACFA154A /* imageCropPicker.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 3400A8081CEB54A6008A0BC7; - remoteInfo = imageCropPicker; - }; 37DD11271E79EBE1004111BA /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = B97AA6F961BB47D3A3297E8E /* RNDeviceInfo.xcodeproj */; @@ -336,8 +332,6 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( - 37DA4BA71E6F55D3002B058E /* RSKImageCropper.framework in Embed Frameworks */, - 37DA4BAA1E6F55D3002B058E /* QBImagePicker.framework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -371,9 +365,6 @@ 31A0780E2F224AC8AF8E6930 /* RNCookieManagerIOS.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNCookieManagerIOS.xcodeproj; path = "../node_modules/react-native-cookies/RNCookieManagerIOS.xcodeproj"; sourceTree = ""; }; 349FBA7338E74D9BBD709528 /* 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 = ""; }; 356C9186FA374641A00EB2EA /* 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 = ""; }; - 37A98FBBA38D48E786B32BAD /* libimageCropPicker.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libimageCropPicker.a; sourceTree = ""; }; - 37DA4BA51E6F55D3002B058E /* RSKImageCropper.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = RSKImageCropper.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 37DA4BA81E6F55D3002B058E /* QBImagePicker.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = QBImagePicker.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 51F5A483EA9F4A9A87ACFB59 /* Foundation.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Foundation.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Foundation.ttf"; sourceTree = ""; }; 59954D479A89488091EB588F /* RNSearchBar.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNSearchBar.xcodeproj; path = "../node_modules/react-native-search-bar/RNSearchBar.xcodeproj"; sourceTree = ""; }; 5C3B95629BA74FB3A8377CB7 /* 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 = ""; }; @@ -388,14 +379,15 @@ 7F63D2C21E6DD98A001FAE12 /* Mattermost.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = Mattermost.entitlements; path = Mattermost/Mattermost.entitlements; sourceTree = ""; }; 7F6877AA1E7835E50094B63F /* ToolTipMenu.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = ToolTipMenu.xcodeproj; path = "../node_modules/react-native-tooltip/ToolTipMenu.xcodeproj"; sourceTree = ""; }; 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; }; + 85E82BCA0FD245EEA520D106 /* 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 = ""; }; AC6EB561E1F64C17A69D2FAD /* 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 = ""; }; ACC6B9FDC0AD45A6BFA4FBCD /* libBVLinearGradient.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libBVLinearGradient.a; sourceTree = ""; }; B97AA6F961BB47D3A3297E8E /* RNDeviceInfo.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNDeviceInfo.xcodeproj; path = "../node_modules/react-native-device-info/RNDeviceInfo.xcodeproj"; sourceTree = ""; }; + DFE628F5A526417D85AD635E /* libRNImagePicker.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNImagePicker.a; sourceTree = ""; }; EDC04CBCF81642219D199CBB /* Octicons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Octicons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Octicons.ttf"; sourceTree = ""; }; EE671DF7637347CD8C069819 /* libRNDeviceInfo.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNDeviceInfo.a; sourceTree = ""; }; F1F071EE85494E269A50AE88 /* SimpleLineIcons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = SimpleLineIcons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/SimpleLineIcons.ttf"; sourceTree = ""; }; F81F6DC42D394831B4549928 /* libRNSearchBar.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNSearchBar.a; sourceTree = ""; }; - F9678BD770064C20ACFA154A /* 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 = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -414,7 +406,6 @@ 7FBB5E9A1E1F5A4B000DE18A /* libRNSVG.a in Frameworks */, 7FBB5E9B1E1F5A4B000DE18A /* libRNVectorIcons.a in Frameworks */, 5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */, - 37DA4BA61E6F55D3002B058E /* RSKImageCropper.framework in Frameworks */, 146834051AC3E58100842450 /* libReact.a in Frameworks */, 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */, 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */, @@ -433,8 +424,7 @@ 10CD747CE4304BD6AB38B4CD /* libRNDeviceInfo.a in Frameworks */, 584837D6B55F405F908A2053 /* libBVLinearGradient.a in Frameworks */, 7F6877B31E7836070094B63F /* libToolTipMenu.a in Frameworks */, - 37DA4BA91E6F55D3002B058E /* QBImagePicker.framework in Frameworks */, - 587E8EEB59DB4EC38F6940BF /* libimageCropPicker.a in Frameworks */, + 2E3655C7E15049DBBC3A666B /* libRNImagePicker.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -573,18 +563,18 @@ name = Products; sourceTree = ""; }; - 37D8FEBE1E80B5230091F3BD /* Products */ = { + 3779BE7C1EB1235400D081C1 /* Products */ = { isa = PBXGroup; children = ( - 37D8FEC21E80B5230091F3BD /* libBVLinearGradient.a */, + 3779BEA01EB1235400D081C1 /* libRNImagePicker.a */, ); name = Products; sourceTree = ""; }; - 37DA4B761E6F5419002B058E /* Products */ = { + 37D8FEBE1E80B5230091F3BD /* Products */ = { isa = PBXGroup; children = ( - 37DA4B7A1E6F5419002B058E /* libimageCropPicker.a */, + 37D8FEC21E80B5230091F3BD /* libBVLinearGradient.a */, ); name = Products; sourceTree = ""; @@ -696,8 +686,8 @@ 31A0780E2F224AC8AF8E6930 /* RNCookieManagerIOS.xcodeproj */, B97AA6F961BB47D3A3297E8E /* RNDeviceInfo.xcodeproj */, 7DCC3D826CE640AF8F491692 /* BVLinearGradient.xcodeproj */, - F9678BD770064C20ACFA154A /* imageCropPicker.xcodeproj */, 5C3B95629BA74FB3A8377CB7 /* RCTOrientation.xcodeproj */, + 85E82BCA0FD245EEA520D106 /* RNImagePicker.xcodeproj */, ); name = Libraries; sourceTree = ""; @@ -715,8 +705,6 @@ isa = PBXGroup; children = ( 7F292A701E8AB73400A450A3 /* SplashScreenResource */, - 37DA4BA81E6F55D3002B058E /* QBImagePicker.framework */, - 37DA4BA51E6F55D3002B058E /* RSKImageCropper.framework */, 13B07FAE1A68108700A75B9A /* Mattermost */, 832341AE1AAA6A7D00B99B32 /* Libraries */, 00E356EF1AD99517003FC87E /* MattermostTests */, @@ -816,10 +804,6 @@ ProductGroup = 37D8FEBE1E80B5230091F3BD /* Products */; ProjectRef = 7DCC3D826CE640AF8F491692 /* BVLinearGradient.xcodeproj */; }, - { - ProductGroup = 37DA4B761E6F5419002B058E /* Products */; - ProjectRef = F9678BD770064C20ACFA154A /* imageCropPicker.xcodeproj */; - }, { ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */; ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; @@ -884,6 +868,10 @@ ProductGroup = 37DD11071E79EBE1004111BA /* Products */; ProjectRef = B97AA6F961BB47D3A3297E8E /* RNDeviceInfo.xcodeproj */; }, + { + ProductGroup = 3779BE7C1EB1235400D081C1 /* Products */; + ProjectRef = 85E82BCA0FD245EEA520D106 /* RNImagePicker.xcodeproj */; + }, { ProductGroup = 7F48904C1E3B7D3B008EDBEA /* Products */; ProjectRef = 59954D479A89488091EB588F /* RNSearchBar.xcodeproj */; @@ -973,6 +961,13 @@ remoteRef = 374634661E848085005E1244 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; + 3779BEA01EB1235400D081C1 /* libRNImagePicker.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRNImagePicker.a; + remoteRef = 3779BE9F1EB1235400D081C1 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; 37D8FEC21E80B5230091F3BD /* libBVLinearGradient.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; @@ -980,13 +975,6 @@ remoteRef = 37D8FEC11E80B5230091F3BD /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; - 37DA4B7A1E6F5419002B058E /* libimageCropPicker.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libimageCropPicker.a; - remoteRef = 37DA4B791E6F5419002B058E /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; 37DD11281E79EBE1004111BA /* libRNDeviceInfo.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; @@ -1269,7 +1257,6 @@ LIBRARY_SEARCH_PATHS = ( "$(inherited)", "\"$(SRCROOT)/$(TARGET_NAME)\"", - "\"$(SRCROOT)/$(TARGET_NAME)\"", ); PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -1288,7 +1275,6 @@ LIBRARY_SEARCH_PATHS = ( "$(inherited)", "\"$(SRCROOT)/$(TARGET_NAME)\"", - "\"$(SRCROOT)/$(TARGET_NAME)\"", ); PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -1309,6 +1295,7 @@ "$(SRCROOT)/../node_modules/react-native/Libraries/PushNotificationIOS/**", "$(SRCROOT)/../node_modules/react-native-orientation/iOS/RCTOrientation/**", "$(SRCROOT)/../node_modules/react-native-smart-splash-screen/ios/RCTSplashScreen/RCTSplashScreen/**", + "$(SRCROOT)/../node_modules/react-native-image-picker/ios", ); INFOPLIST_FILE = Mattermost/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; @@ -1338,6 +1325,7 @@ "$(SRCROOT)/../node_modules/react-native/Libraries/PushNotificationIOS/**", "$(SRCROOT)/../node_modules/react-native-orientation/iOS/RCTOrientation/**", "$(SRCROOT)/../node_modules/react-native-smart-splash-screen/ios/RCTSplashScreen/RCTSplashScreen/**", + "$(SRCROOT)/../node_modules/react-native-image-picker/ios", ); INFOPLIST_FILE = Mattermost/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; diff --git a/package.json b/package.json index f67d7ba9b..f4ee9b782 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "react-native-cookies": "2.0.0", "react-native-device-info": "0.10.2", "react-native-drawer": "2.3.0", - "react-native-image-crop-picker": "0.13.0", + "react-native-image-picker": "0.26.3", "react-native-keyboard-aware-scroll-view": "0.2.8", "react-native-linear-gradient": "2.0.0", "react-native-message-bar": "1.6.0",