Skip to content

Commit 9e3769b

Browse files
配置文件
2 parents c7c06fc + e1b4d35 commit 9e3769b

File tree

21 files changed

+983
-296
lines changed

21 files changed

+983
-296
lines changed

android/app/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ dependencies {
138138
compile fileTree(dir: "libs", include: ["*.jar"])
139139
compile "com.android.support:appcompat-v7:23.0.1"
140140
compile "com.facebook.react:react-native:+" // From node_modules
141+
compile project(':react-native-image-picker')
141142
}
142143

143144
// Run this once to be able to run the application with BUCK

android/app/src/main/AndroidManifest.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
<uses-permission android:name="android.permission.INTERNET" />
77
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
88

9+
10+
<uses-permission android:name="android.permission.CAMERA" />
11+
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
12+
<uses-feature android:name="android.hardware.camera" android:required="true"/>
13+
<uses-feature android:name="android.hardware.camera.autofocus" />
914
<uses-sdk
1015
android:minSdkVersion="16"
1116
android:targetSdkVersion="22" />

android/app/src/main/java/com/wechatarticle/MainApplication.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import com.facebook.react.ReactNativeHost;
99
import com.facebook.react.ReactPackage;
1010
import com.facebook.react.shell.MainReactPackage;
11-
11+
import com.imagepicker.ImagePickerPackage; // import package
1212
import java.util.Arrays;
1313
import java.util.List;
1414

@@ -23,7 +23,8 @@ protected boolean getUseDeveloperSupport() {
2323
@Override
2424
protected List<ReactPackage> getPackages() {
2525
return Arrays.<ReactPackage>asList(
26-
new MainReactPackage()
26+
new MainReactPackage(),
27+
new ImagePickerPackage() // <-- add this line
2728
);
2829
}
2930
};

android/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ buildscript {
66
}
77
dependencies {
88
classpath 'com.android.tools.build:gradle:1.3.1'
9-
109
// NOTE: Do not place your application dependencies here; they belong
1110
// in the individual module build.gradle files
1211
}

android/settings.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
rootProject.name = 'wechatArticle'
22

33
include ':app'
4+
include ':react-native-image-picker'
5+
project(':react-native-image-picker').projectDir = new File(settingsDir, '../node_modules/react-native-image-picker/android')

ios/wechatArticle.xcodeproj/project.pbxproj

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
};
66
objectVersion = 46;
77
objects = {
8-
98
/* Begin PBXBuildFile section */
109
00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; };
1110
00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; };
@@ -23,6 +22,7 @@
2322
140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
2423
146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
2524
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
25+
7AF08C5BA96F4AB9A57A2F0F /* libRNImagePicker.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7373DDAD1CAD4EB082752DA7 /* libRNImagePicker.a */; };
2626
/* End PBXBuildFile section */
2727

2828
/* Begin PBXContainerItemProxy section */
@@ -127,6 +127,8 @@
127127
146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = ../node_modules/react-native/React/React.xcodeproj; sourceTree = "<group>"; };
128128
78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = ../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj; sourceTree = "<group>"; };
129129
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = ../node_modules/react-native/Libraries/Text/RCTText.xcodeproj; sourceTree = "<group>"; };
130+
0A3171D3112B45FB9501E4EC /* 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; };
131+
7373DDAD1CAD4EB082752DA7 /* libRNImagePicker.a */ = {isa = PBXFileReference; name = "libRNImagePicker.a"; path = "libRNImagePicker.a"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = archive.ar; explicitFileType = undefined; includeInIndex = 0; };
130132
/* End PBXFileReference section */
131133

132134
/* Begin PBXFrameworksBuildPhase section */
@@ -152,6 +154,7 @@
152154
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */,
153155
00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */,
154156
139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */,
157+
7AF08C5BA96F4AB9A57A2F0F /* libRNImagePicker.a in Frameworks */,
155158
);
156159
runOnlyForDeploymentPostprocessing = 0;
157160
};
@@ -274,6 +277,7 @@
274277
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */,
275278
00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */,
276279
139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */,
280+
0A3171D3112B45FB9501E4EC /* RNImagePicker.xcodeproj */,
277281
);
278282
name = Libraries;
279283
sourceTree = "<group>";
@@ -352,7 +356,7 @@
352356
83CBB9F71A601CBA00E9B192 /* Project object */ = {
353357
isa = PBXProject;
354358
attributes = {
355-
LastUpgradeCheck = 0610;
359+
LastUpgradeCheck = 610;
356360
ORGANIZATIONNAME = Facebook;
357361
TargetAttributes = {
358362
00E356ED1AD99517003FC87E = {
@@ -586,6 +590,10 @@
586590
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
587591
PRODUCT_NAME = "$(TARGET_NAME)";
588592
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/wechatArticle.app/wechatArticle";
593+
LIBRARY_SEARCH_PATHS = (
594+
"$(inherited)",
595+
"\"$(SRCROOT)/$(TARGET_NAME)\"",
596+
);
589597
};
590598
name = Debug;
591599
};
@@ -599,6 +607,10 @@
599607
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
600608
PRODUCT_NAME = "$(TARGET_NAME)";
601609
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/wechatArticle.app/wechatArticle";
610+
LIBRARY_SEARCH_PATHS = (
611+
"$(inherited)",
612+
"\"$(SRCROOT)/$(TARGET_NAME)\"",
613+
);
602614
};
603615
name = Release;
604616
};
@@ -611,14 +623,15 @@
611623
"$(inherited)",
612624
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
613625
"$(SRCROOT)/../node_modules/react-native/React/**",
626+
"$(SRCROOT)\..\node_modules\react-native-image-picker\ios/**",
614627
);
615628
INFOPLIST_FILE = "wechatArticle/Info.plist";
616629
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
617-
OTHER_LDFLAGS = (
630+
OTHER_LDFLAGS = (
618631
"$(inherited)",
619-
"-ObjC",
620-
"-lc++",
621-
);
632+
"-ObjC",
633+
"-lc++",
634+
);
622635
PRODUCT_NAME = wechatArticle;
623636
};
624637
name = Debug;
@@ -631,14 +644,15 @@
631644
"$(inherited)",
632645
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
633646
"$(SRCROOT)/../node_modules/react-native/React/**",
647+
"$(SRCROOT)\..\node_modules\react-native-image-picker\ios/**",
634648
);
635649
INFOPLIST_FILE = "wechatArticle/Info.plist";
636650
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
637-
OTHER_LDFLAGS = (
651+
OTHER_LDFLAGS = (
638652
"$(inherited)",
639-
"-ObjC",
640-
"-lc++",
641-
);
653+
"-ObjC",
654+
"-lc++",
655+
);
642656
PRODUCT_NAME = wechatArticle;
643657
};
644658
name = Release;
@@ -681,6 +695,7 @@
681695
"$(inherited)",
682696
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
683697
"$(SRCROOT)/../node_modules/react-native/React/**",
698+
"$(SRCROOT)\..\node_modules\react-native-image-picker\ios/**",
684699
);
685700
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
686701
MTL_ENABLE_DEBUG_INFO = YES;
@@ -721,6 +736,7 @@
721736
"$(inherited)",
722737
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
723738
"$(SRCROOT)/../node_modules/react-native/React/**",
739+
"$(SRCROOT)\..\node_modules\react-native-image-picker\ios/**",
724740
);
725741
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
726742
MTL_ENABLE_DEBUG_INFO = NO;

0 commit comments

Comments
 (0)