Skip to content
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

Add 'react-native-image-picker' #1375

Merged
merged 1 commit into from
Oct 30, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ repositories {


dependencies {
compile project(':react-native-notifications')
compile project(':react-native-image-picker')
compile project(':react-native-orientation')
compile project(':react-native-sentry')
compile project(':@remobile/react-native-toast')
Expand Down
2 changes: 2 additions & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
tools:remove="${excludeSystemAlertWindowPermission}"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"
tools:node="remove"/>
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

<application
android:name=".MainApplication"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@

import com.RNFetchBlob.RNFetchBlobPackage;
import com.facebook.react.ReactApplication;
import com.github.yamill.orientation.OrientationPackage;
import com.wix.reactnativenotifications.RNNotificationsPackage;
import com.imagepicker.ImagePickerPackage;
import com.github.yamill.orientation.OrientationPackage;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
Expand Down Expand Up @@ -50,6 +51,8 @@ public boolean getUseDeveloperSupport() {
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new RNNotificationsPackage(),
new ImagePickerPackage(),
new OrientationPackage(),
new RNSentryPackage(MainApplication.this),
new PhotoViewPackage(),
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.android.tools.build:gradle:2.2.+'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
4 changes: 4 additions & 0 deletions android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
rootProject.name = 'ZulipMobile'
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-orientation'
project(':react-native-orientation').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-orientation/android')
include ':react-native-sentry'
Expand Down
19 changes: 19 additions & 0 deletions ios/ZulipMobile.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
DBC5C3186FE64F94BD3CDC19 /* MaterialCommunityIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = A2070A88714C43ED8AF708C3 /* MaterialCommunityIcons.ttf */; };
FF359794CBFF4ABF92423426 /* libRCTToast.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2CFB39BBD9094475BB03A3E4 /* libRCTToast.a */; };
C9F58827F1CF47999850925A /* libRCTOrientation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5597847AA2A04FEE894C9C9E /* libRCTOrientation.a */; };
757248247DDE47D3A310353E /* libRNImagePicker.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 875BCBF7DC0645ACBA61563B /* libRNImagePicker.a */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -429,6 +430,8 @@
FC7EC6A752C243FB9F1B8442 /* RNFetchBlob.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNFetchBlob.xcodeproj; path = "../node_modules/react-native-fetch-blob/ios/RNFetchBlob.xcodeproj"; sourceTree = "<group>"; };
713A523038564C27B0D2C2F7 /* RCTOrientation.xcodeproj */ = {isa = PBXFileReference; name = "RCTOrientation.xcodeproj"; path = "../node_modules/react-native-orientation/iOS/RCTOrientation.xcodeproj"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = wrapper.pb-project; explicitFileType = undefined; includeInIndex = 0; };
5597847AA2A04FEE894C9C9E /* libRCTOrientation.a */ = {isa = PBXFileReference; name = "libRCTOrientation.a"; path = "libRCTOrientation.a"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = archive.ar; explicitFileType = undefined; includeInIndex = 0; };
CFBB80590829494E985F601B /* RNImagePicker.xcodeproj */ = {isa = PBXFileReference; name = "RNImagePicker.xcodeproj"; path = "../node_modules/react-native-image-picker/ios/RNImagePicker.xcodeproj"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = wrapper.pb-project; explicitFileType = undefined; includeInIndex = 0; };
875BCBF7DC0645ACBA61563B /* libRNImagePicker.a */ = {isa = PBXFileReference; name = "libRNImagePicker.a"; path = "libRNImagePicker.a"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = archive.ar; explicitFileType = undefined; includeInIndex = 0; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -470,6 +473,7 @@
4CD3C48024294A3A816F4CA9 /* libRNPhotoView.a in Frameworks */,
C866080E83494D1C8B535591 /* libRNSafeArea.a in Frameworks */,
C9F58827F1CF47999850925A /* libRCTOrientation.a in Frameworks */,
757248247DDE47D3A310353E /* libRNImagePicker.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -683,6 +687,7 @@
06D71A26F8704D96B8C2D342 /* RNPhotoView.xcodeproj */,
8B355454DEEB4F28A5B4F8CA /* RNSafeArea.xcodeproj */,
713A523038564C27B0D2C2F7 /* RCTOrientation.xcodeproj */,
CFBB80590829494E985F601B /* RNImagePicker.xcodeproj */,
);
name = Libraries;
sourceTree = "<group>";
Expand Down Expand Up @@ -820,6 +825,14 @@
name = Resources;
sourceTree = "<group>";
};
32268A6D8E1742AE9C2D77A9 /* Frameworks */ = {
isa = PBXGroup;
children = (
);
name = Frameworks;
path = Application;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand Down Expand Up @@ -1437,6 +1450,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",
);
INFOPLIST_FILE = ZulipMobileTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.2;
Expand All @@ -1456,6 +1470,7 @@
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
);
OTHER_LDFLAGS = (
"$(inherited)",
Expand Down Expand Up @@ -1486,6 +1501,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",
);
INFOPLIST_FILE = ZulipMobileTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.2;
Expand All @@ -1505,6 +1521,7 @@
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
);
OTHER_LDFLAGS = (
"$(inherited)",
Expand Down Expand Up @@ -1540,6 +1557,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",
);
INFOPLIST_FILE = ZulipMobile/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
Expand Down Expand Up @@ -1580,6 +1598,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",
);
INFOPLIST_FILE = ZulipMobile/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
Expand Down
6 changes: 4 additions & 2 deletions ios/ZulipMobile/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,12 @@
</dict>
</dict>
</dict>
<key>NSCameraUsageDescription</key>
<string>Take a photo and upload it to a Zulip realm</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string></string>
<string></string>
<key>NSPhotoLibraryUsageDescription</key>
<string>This app requires access to the photo library.</string>
<string>Upload photos to a Zulip realm</string>
<key>UIAppFonts</key>
<array>
<string>Entypo.ttf</string>
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"react-native": "^0.49.5",
"react-native-device-info": "^0.12.1",
"react-native-fetch-blob": "^0.10.8",
"react-native-image-picker": "^0.26.7",
"react-native-notifications": "^1.1.17",
"react-native-orientation": "^3.1.0",
"react-native-photo-view": "^1.5.2",
Expand Down
4 changes: 4 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4915,6 +4915,10 @@ react-native-fetch-blob@^0.10.8:
base-64 "0.1.0"
glob "7.0.6"

react-native-image-picker@^0.26.7:
version "0.26.7"
resolved "https://registry.yarnpkg.com/react-native-image-picker/-/react-native-image-picker-0.26.7.tgz#ad2ee957f7f6cc01396893ea03d84cb2adb2e376"

react-native-notifications@^1.1.17:
version "1.1.17"
resolved "https://registry.yarnpkg.com/react-native-notifications/-/react-native-notifications-1.1.17.tgz#a61f3e7f9a36143d5694c734291b2d19a910638f"
Expand Down