Hau Vo 7 jaren geleden
commit
c4c49a0335

+ 1
- 0
.gitattributes Bestand weergeven

@@ -0,0 +1 @@
1
+*.pbxproj -text

+ 46
- 0
.gitignore Bestand weergeven

@@ -0,0 +1,46 @@
1
+
2
+# OSX
3
+#
4
+.DS_Store
5
+
6
+# node.js
7
+#
8
+node_modules/
9
+npm-debug.log
10
+yarn-error.log
11
+  
12
+
13
+# Xcode
14
+#
15
+build/
16
+*.pbxuser
17
+!default.pbxuser
18
+*.mode1v3
19
+!default.mode1v3
20
+*.mode2v3
21
+!default.mode2v3
22
+*.perspectivev3
23
+!default.perspectivev3
24
+xcuserdata
25
+*.xccheckout
26
+*.moved-aside
27
+DerivedData
28
+*.hmap
29
+*.ipa
30
+*.xcuserstate
31
+project.xcworkspace
32
+      
33
+
34
+# Android/IntelliJ
35
+#
36
+build/
37
+.idea
38
+.gradle
39
+local.properties
40
+*.iml
41
+
42
+# BUCK
43
+buck-out/
44
+\.buckd/
45
+*.keystore
46
+      

+ 53
- 0
README.md Bestand weergeven

@@ -0,0 +1,53 @@
1
+
2
+# react-native-thumbnail
3
+
4
+## Getting started
5
+
6
+`$ npm install react-native-thumbnail --save`
7
+
8
+### Mostly automatic installation
9
+
10
+`$ react-native link react-native-thumbnail`
11
+
12
+### Manual installation
13
+
14
+
15
+#### iOS
16
+
17
+1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`
18
+2. Go to `node_modules` ➜ `react-native-thumbnail` and add `RNThumbnail.xcodeproj`
19
+3. In XCode, in the project navigator, select your project. Add `libRNThumbnail.a` to your project's `Build Phases` ➜ `Link Binary With Libraries`
20
+4. Run your project (`Cmd+R`)<
21
+
22
+#### Android
23
+
24
+1. Open up `android/app/src/main/java/[...]/MainActivity.java`
25
+  - Add `import com.reactlibrary.RNThumbnailPackage;` to the imports at the top of the file
26
+  - Add `new RNThumbnailPackage()` to the list returned by the `getPackages()` method
27
+2. Append the following lines to `android/settings.gradle`:
28
+  	```
29
+  	include ':react-native-thumbnail'
30
+  	project(':react-native-thumbnail').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-thumbnail/android')
31
+  	```
32
+3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:
33
+  	```
34
+      compile project(':react-native-thumbnail')
35
+  	```
36
+
37
+#### Windows
38
+[Read it! :D](https://github.com/ReactWindows/react-native)
39
+
40
+1. In Visual Studio add the `RNThumbnail.sln` in `node_modules/react-native-thumbnail/windows/RNThumbnail.sln` folder to their solution, reference from their app.
41
+2. Open up your `MainPage.cs` app
42
+  - Add `using Com.Reactlibrary.RNThumbnail;` to the usings at the top of the file
43
+  - Add `new RNThumbnailPackage()` to the `List<IReactPackage>` returned by the `Packages` method
44
+
45
+
46
+## Usage
47
+```javascript
48
+import RNThumbnail from 'react-native-thumbnail';
49
+
50
+// TODO: What to do with the module?
51
+RNThumbnail;
52
+```
53
+  

+ 36
- 0
android/build.gradle Bestand weergeven

@@ -0,0 +1,36 @@
1
+
2
+buildscript {
3
+    repositories {
4
+        jcenter()
5
+    }
6
+
7
+    dependencies {
8
+        classpath 'com.android.tools.build:gradle:1.3.1'
9
+    }
10
+}
11
+
12
+apply plugin: 'com.android.library'
13
+
14
+android {
15
+    compileSdkVersion 23
16
+    buildToolsVersion "23.0.1"
17
+
18
+    defaultConfig {
19
+        minSdkVersion 16
20
+        targetSdkVersion 22
21
+        versionCode 1
22
+        versionName "1.0"
23
+    }
24
+    lintOptions {
25
+        abortOnError false
26
+    }
27
+}
28
+
29
+repositories {
30
+    mavenCentral()
31
+}
32
+
33
+dependencies {
34
+    compile 'com.facebook.react:react-native:+'
35
+}
36
+  

+ 6
- 0
android/src/main/AndroidManifest.xml Bestand weergeven

@@ -0,0 +1,6 @@
1
+
2
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3
+          package="com.reactlibrary">
4
+
5
+</manifest>
6
+  

+ 75
- 0
android/src/main/java/com/reactlibrary/RNThumbnailModule.java Bestand weergeven

@@ -0,0 +1,75 @@
1
+
2
+package com.reactlibrary;
3
+
4
+import com.facebook.react.bridge.ReactApplicationContext;
5
+import com.facebook.react.bridge.ReactContextBaseJavaModule;
6
+import com.facebook.react.bridge.ReactMethod;
7
+import com.facebook.react.bridge.Callback;
8
+import com.facebook.react.bridge.Promise;
9
+import com.facebook.react.bridge.Arguments;
10
+import com.facebook.react.bridge.WritableMap;
11
+import android.media.ThumbnailUtils;
12
+import android.provider.MediaStore;
13
+import android.provider.MediaStore.Video.Thumbnails;
14
+import android.graphics.Bitmap;
15
+import android.os.Environment;
16
+import android.util.Log;
17
+import java.util.UUID;
18
+import java.io.File;
19
+import java.io.OutputStream;
20
+import java.io.FileOutputStream;
21
+
22
+public class RNThumbnailModule extends ReactContextBaseJavaModule {
23
+
24
+  private final ReactApplicationContext reactContext;
25
+
26
+  public RNThumbnailModule(ReactApplicationContext reactContext) {
27
+    super(reactContext);
28
+    this.reactContext = reactContext;
29
+  }
30
+
31
+  @Override
32
+  public String getName() {
33
+    return "RNThumbnail";
34
+  }
35
+
36
+  @ReactMethod
37
+  public void get(String filePath, Promise promise) {
38
+    filePath = filePath.replace("file://","");
39
+    Bitmap image = ThumbnailUtils.createVideoThumbnail(filePath, Thumbnails.MINI_KIND);
40
+    String fullPath = Environment.getExternalStorageDirectory().getAbsolutePath();
41
+
42
+    try {
43
+      File dir = new File(fullPath);
44
+      if (!dir.exists()) {
45
+        dir.mkdirs();
46
+      }
47
+
48
+      OutputStream fOut = null;
49
+      // String fileName = "thumb-" + UUID.randomUUID().toString() + ".jpeg";
50
+      String fileName = "thumb-" + UUID.randomUUID().toString() + ".jpeg";
51
+      File file = new File(fullPath, fileName);
52
+      file.createNewFile();
53
+      fOut = new FileOutputStream(file);
54
+
55
+      // 100 means no compression, the lower you go, the stronger the compression
56
+      image.compress(Bitmap.CompressFormat.JPEG, 100, fOut);
57
+      fOut.flush();
58
+      fOut.close();
59
+
60
+      // MediaStore.Images.Media.insertImage(reactContext.getContentResolver(), file.getAbsolutePath(), file.getName(), file.getName());
61
+
62
+      WritableMap map = Arguments.createMap();
63
+
64
+      map.putString("path", "file://" + fullPath + '/' + fileName);
65
+      map.putDouble("width", image.getWidth());
66
+      map.putDouble("height", image.getHeight());
67
+
68
+      promise.resolve(map);
69
+
70
+    } catch (Exception e) {
71
+      Log.e("E_RNThumnail_ERROR", e.getMessage());
72
+      promise.reject("E_RNThumnail_ERROR", e);
73
+    }
74
+  }
75
+}

+ 28
- 0
android/src/main/java/com/reactlibrary/RNThumbnailPackage.java Bestand weergeven

@@ -0,0 +1,28 @@
1
+
2
+package com.reactlibrary;
3
+
4
+import java.util.Arrays;
5
+import java.util.Collections;
6
+import java.util.List;
7
+
8
+import com.facebook.react.ReactPackage;
9
+import com.facebook.react.bridge.NativeModule;
10
+import com.facebook.react.bridge.ReactApplicationContext;
11
+import com.facebook.react.uimanager.ViewManager;
12
+import com.facebook.react.bridge.JavaScriptModule;
13
+public class RNThumbnailPackage implements ReactPackage {
14
+    @Override
15
+    public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
16
+      return Arrays.<NativeModule>asList(new RNThumbnailModule(reactContext));
17
+    }
18
+
19
+    @Override
20
+    public List<Class<? extends JavaScriptModule>> createJSModules() {
21
+      return Collections.emptyList();
22
+    }
23
+
24
+    @Override
25
+    public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
26
+      return Collections.emptyList();
27
+    }
28
+}

+ 6
- 0
index.js Bestand weergeven

@@ -0,0 +1,6 @@
1
+
2
+import { NativeModules } from 'react-native';
3
+
4
+const { RNThumbnail } = NativeModules;
5
+
6
+export default RNThumbnail;

+ 11
- 0
ios/RNThumbnail.h Bestand weergeven

@@ -0,0 +1,11 @@
1
+
2
+#if __has_include("RCTBridgeModule.h")
3
+#import "RCTBridgeModule.h"
4
+#else
5
+#import <React/RCTBridgeModule.h>
6
+#endif
7
+
8
+@interface RNThumbnail : NSObject <RCTBridgeModule>
9
+
10
+@end
11
+  

+ 51
- 0
ios/RNThumbnail.m Bestand weergeven

@@ -0,0 +1,51 @@
1
+
2
+#import "RNThumbnail.h"
3
+#import <AVFoundation/AVFoundation.h>
4
+#import <AVFoundation/AVAsset.h>
5
+#import <UIKit/UIKit.h>
6
+
7
+@implementation RNThumbnail
8
+
9
+- (dispatch_queue_t)methodQueue
10
+{
11
+    return dispatch_get_main_queue();
12
+}
13
+RCT_EXPORT_MODULE()
14
+
15
+RCT_EXPORT_METHOD(get:(NSString *)filepath resolve:(RCTPromiseResolveBlock)resolve
16
+                               reject:(RCTPromiseRejectBlock)reject)
17
+{
18
+    @try {
19
+        filepath = [filepath stringByReplacingOccurrencesOfString:@"file://"
20
+                                                  withString:@""];
21
+        NSURL *vidURL = [NSURL fileURLWithPath:filepath];
22
+        
23
+        AVURLAsset *asset = [[AVURLAsset alloc] initWithURL:vidURL options:nil];
24
+        AVAssetImageGenerator *generator = [[AVAssetImageGenerator alloc] initWithAsset:asset];
25
+        generator.appliesPreferredTrackTransform = YES;
26
+        
27
+        NSError *err = NULL;
28
+        CMTime time = CMTimeMake(1, 60);
29
+        
30
+        CGImageRef imgRef = [generator copyCGImageAtTime:time actualTime:NULL error:&err];
31
+        UIImage *thumbnail = [UIImage imageWithCGImage:imgRef];
32
+        // save to temp directory
33
+        NSString* tempDirectory = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory,
34
+                                                                       NSUserDomainMask,
35
+                                                                       YES) lastObject];
36
+        
37
+        NSData *data = UIImageJPEGRepresentation(thumbnail, 1.0);
38
+        NSFileManager *fileManager = [NSFileManager defaultManager];
39
+        NSString *fullPath = [tempDirectory stringByAppendingPathComponent: [NSString stringWithFormat:@"thumb-%@.jpg", [[NSProcessInfo processInfo] globallyUniqueString]]];
40
+        [fileManager createFileAtPath:fullPath contents:data attributes:nil];
41
+        if (resolve)
42
+            resolve(@{ @"path" : fullPath,
43
+                       @"width" : [NSNumber numberWithFloat: thumbnail.size.width],
44
+                       @"height" : [NSNumber numberWithFloat: thumbnail.size.height] });
45
+    } @catch(NSException *e) {
46
+        reject(e.reason, nil, nil);
47
+    }
48
+}
49
+
50
+@end
51
+  

+ 24
- 0
ios/RNThumbnail.podspec Bestand weergeven

@@ -0,0 +1,24 @@
1
+
2
+Pod::Spec.new do |s|
3
+  s.name         = "RNThumbnail"
4
+  s.version      = "1.0.0"
5
+  s.summary      = "RNThumbnail"
6
+  s.description  = <<-DESC
7
+                  RNThumbnail
8
+                   DESC
9
+  s.homepage     = ""
10
+  s.license      = "MIT"
11
+  # s.license      = { :type => "MIT", :file => "FILE_LICENSE" }
12
+  s.author             = { "author" => "author@domain.cn" }
13
+  s.platform     = :ios, "7.0"
14
+  s.source       = { :git => "https://github.com/author/RNThumbnail.git", :tag => "master" }
15
+  s.source_files  = "RNThumbnail/**/*.{h,m}"
16
+  s.requires_arc = true
17
+
18
+
19
+  s.dependency "React"
20
+  #s.dependency "others"
21
+
22
+end
23
+
24
+  

+ 252
- 0
ios/RNThumbnail.xcodeproj/project.pbxproj Bestand weergeven

@@ -0,0 +1,252 @@
1
+// !$*UTF8*$!
2
+{
3
+	archiveVersion = 1;
4
+	classes = {
5
+	};
6
+	objectVersion = 46;
7
+	objects = {
8
+
9
+/* Begin PBXBuildFile section */
10
+		B3E7B58A1CC2AC0600A0062D /* RNThumbnail.m in Sources */ = {isa = PBXBuildFile; fileRef = B3E7B5891CC2AC0600A0062D /* RNThumbnail.m */; };
11
+/* End PBXBuildFile section */
12
+
13
+/* Begin PBXCopyFilesBuildPhase section */
14
+		58B511D91A9E6C8500147676 /* CopyFiles */ = {
15
+			isa = PBXCopyFilesBuildPhase;
16
+			buildActionMask = 2147483647;
17
+			dstPath = "include/$(PRODUCT_NAME)";
18
+			dstSubfolderSpec = 16;
19
+			files = (
20
+			);
21
+			runOnlyForDeploymentPostprocessing = 0;
22
+		};
23
+/* End PBXCopyFilesBuildPhase section */
24
+
25
+/* Begin PBXFileReference section */
26
+		134814201AA4EA6300B7C361 /* libRNThumbnail.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNThumbnail.a; sourceTree = BUILT_PRODUCTS_DIR; };
27
+		B3E7B5881CC2AC0600A0062D /* RNThumbnail.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNThumbnail.h; sourceTree = "<group>"; };
28
+		B3E7B5891CC2AC0600A0062D /* RNThumbnail.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNThumbnail.m; sourceTree = "<group>"; };
29
+/* End PBXFileReference section */
30
+
31
+/* Begin PBXFrameworksBuildPhase section */
32
+		58B511D81A9E6C8500147676 /* Frameworks */ = {
33
+			isa = PBXFrameworksBuildPhase;
34
+			buildActionMask = 2147483647;
35
+			files = (
36
+			);
37
+			runOnlyForDeploymentPostprocessing = 0;
38
+		};
39
+/* End PBXFrameworksBuildPhase section */
40
+
41
+/* Begin PBXGroup section */
42
+		134814211AA4EA7D00B7C361 /* Products */ = {
43
+			isa = PBXGroup;
44
+			children = (
45
+				134814201AA4EA6300B7C361 /* libRNThumbnail.a */,
46
+			);
47
+			name = Products;
48
+			sourceTree = "<group>";
49
+		};
50
+		58B511D21A9E6C8500147676 = {
51
+			isa = PBXGroup;
52
+			children = (
53
+				B3E7B5881CC2AC0600A0062D /* RNThumbnail.h */,
54
+				B3E7B5891CC2AC0600A0062D /* RNThumbnail.m */,
55
+				134814211AA4EA7D00B7C361 /* Products */,
56
+			);
57
+			sourceTree = "<group>";
58
+		};
59
+/* End PBXGroup section */
60
+
61
+/* Begin PBXNativeTarget section */
62
+		58B511DA1A9E6C8500147676 /* RNThumbnail */ = {
63
+			isa = PBXNativeTarget;
64
+			buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RNThumbnail" */;
65
+			buildPhases = (
66
+				58B511D71A9E6C8500147676 /* Sources */,
67
+				58B511D81A9E6C8500147676 /* Frameworks */,
68
+				58B511D91A9E6C8500147676 /* CopyFiles */,
69
+			);
70
+			buildRules = (
71
+			);
72
+			dependencies = (
73
+			);
74
+			name = RNThumbnail;
75
+			productName = RCTDataManager;
76
+			productReference = 134814201AA4EA6300B7C361 /* libRNThumbnail.a */;
77
+			productType = "com.apple.product-type.library.static";
78
+		};
79
+/* End PBXNativeTarget section */
80
+
81
+/* Begin PBXProject section */
82
+		58B511D31A9E6C8500147676 /* Project object */ = {
83
+			isa = PBXProject;
84
+			attributes = {
85
+				LastUpgradeCheck = 0610;
86
+				ORGANIZATIONNAME = Facebook;
87
+				TargetAttributes = {
88
+					58B511DA1A9E6C8500147676 = {
89
+						CreatedOnToolsVersion = 6.1.1;
90
+					};
91
+				};
92
+			};
93
+			buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RNThumbnail" */;
94
+			compatibilityVersion = "Xcode 3.2";
95
+			developmentRegion = English;
96
+			hasScannedForEncodings = 0;
97
+			knownRegions = (
98
+				en,
99
+			);
100
+			mainGroup = 58B511D21A9E6C8500147676;
101
+			productRefGroup = 58B511D21A9E6C8500147676;
102
+			projectDirPath = "";
103
+			projectRoot = "";
104
+			targets = (
105
+				58B511DA1A9E6C8500147676 /* RNThumbnail */,
106
+			);
107
+		};
108
+/* End PBXProject section */
109
+
110
+/* Begin PBXSourcesBuildPhase section */
111
+		58B511D71A9E6C8500147676 /* Sources */ = {
112
+			isa = PBXSourcesBuildPhase;
113
+			buildActionMask = 2147483647;
114
+			files = (
115
+				B3E7B58A1CC2AC0600A0062D /* RNThumbnail.m in Sources */,
116
+			);
117
+			runOnlyForDeploymentPostprocessing = 0;
118
+		};
119
+/* End PBXSourcesBuildPhase section */
120
+
121
+/* Begin XCBuildConfiguration section */
122
+		58B511ED1A9E6C8500147676 /* Debug */ = {
123
+			isa = XCBuildConfiguration;
124
+			buildSettings = {
125
+				ALWAYS_SEARCH_USER_PATHS = NO;
126
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
127
+				CLANG_CXX_LIBRARY = "libc++";
128
+				CLANG_ENABLE_MODULES = YES;
129
+				CLANG_ENABLE_OBJC_ARC = YES;
130
+				CLANG_WARN_BOOL_CONVERSION = YES;
131
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
132
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
133
+				CLANG_WARN_EMPTY_BODY = YES;
134
+				CLANG_WARN_ENUM_CONVERSION = YES;
135
+				CLANG_WARN_INT_CONVERSION = YES;
136
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
137
+				CLANG_WARN_UNREACHABLE_CODE = YES;
138
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
139
+				COPY_PHASE_STRIP = NO;
140
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
141
+				GCC_C_LANGUAGE_STANDARD = gnu99;
142
+				GCC_DYNAMIC_NO_PIC = NO;
143
+				GCC_OPTIMIZATION_LEVEL = 0;
144
+				GCC_PREPROCESSOR_DEFINITIONS = (
145
+					"DEBUG=1",
146
+					"$(inherited)",
147
+				);
148
+				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
149
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
150
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
151
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
152
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
153
+				GCC_WARN_UNUSED_FUNCTION = YES;
154
+				GCC_WARN_UNUSED_VARIABLE = YES;
155
+				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
156
+				MTL_ENABLE_DEBUG_INFO = YES;
157
+				ONLY_ACTIVE_ARCH = YES;
158
+				SDKROOT = iphoneos;
159
+			};
160
+			name = Debug;
161
+		};
162
+		58B511EE1A9E6C8500147676 /* Release */ = {
163
+			isa = XCBuildConfiguration;
164
+			buildSettings = {
165
+				ALWAYS_SEARCH_USER_PATHS = NO;
166
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
167
+				CLANG_CXX_LIBRARY = "libc++";
168
+				CLANG_ENABLE_MODULES = YES;
169
+				CLANG_ENABLE_OBJC_ARC = YES;
170
+				CLANG_WARN_BOOL_CONVERSION = YES;
171
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
172
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
173
+				CLANG_WARN_EMPTY_BODY = YES;
174
+				CLANG_WARN_ENUM_CONVERSION = YES;
175
+				CLANG_WARN_INT_CONVERSION = YES;
176
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
177
+				CLANG_WARN_UNREACHABLE_CODE = YES;
178
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
179
+				COPY_PHASE_STRIP = YES;
180
+				ENABLE_NS_ASSERTIONS = NO;
181
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
182
+				GCC_C_LANGUAGE_STANDARD = gnu99;
183
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
184
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
185
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
186
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
187
+				GCC_WARN_UNUSED_FUNCTION = YES;
188
+				GCC_WARN_UNUSED_VARIABLE = YES;
189
+				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
190
+				MTL_ENABLE_DEBUG_INFO = NO;
191
+				SDKROOT = iphoneos;
192
+				VALIDATE_PRODUCT = YES;
193
+			};
194
+			name = Release;
195
+		};
196
+		58B511F01A9E6C8500147676 /* Debug */ = {
197
+			isa = XCBuildConfiguration;
198
+			buildSettings = {
199
+				HEADER_SEARCH_PATHS = (
200
+				"$(inherited)",
201
+					/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
202
+					"$(SRCROOT)/../../../React/**",
203
+					"$(SRCROOT)/../../react-native/React/**",
204
+				);
205
+				LIBRARY_SEARCH_PATHS = "$(inherited)";
206
+				OTHER_LDFLAGS = "-ObjC";
207
+				PRODUCT_NAME = RNThumbnail;
208
+				SKIP_INSTALL = YES;
209
+			};
210
+			name = Debug;
211
+		};
212
+		58B511F11A9E6C8500147676 /* Release */ = {
213
+			isa = XCBuildConfiguration;
214
+			buildSettings = {
215
+				HEADER_SEARCH_PATHS = (
216
+					"$(inherited)",
217
+					/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
218
+					"$(SRCROOT)/../../../React/**",
219
+					"$(SRCROOT)/../../react-native/React/**",
220
+				);
221
+				LIBRARY_SEARCH_PATHS = "$(inherited)";
222
+				OTHER_LDFLAGS = "-ObjC";
223
+				PRODUCT_NAME = RNThumbnail;
224
+				SKIP_INSTALL = YES;
225
+			};
226
+			name = Release;
227
+		};
228
+/* End XCBuildConfiguration section */
229
+
230
+/* Begin XCConfigurationList section */
231
+		58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RNThumbnail" */ = {
232
+			isa = XCConfigurationList;
233
+			buildConfigurations = (
234
+				58B511ED1A9E6C8500147676 /* Debug */,
235
+				58B511EE1A9E6C8500147676 /* Release */,
236
+			);
237
+			defaultConfigurationIsVisible = 0;
238
+			defaultConfigurationName = Release;
239
+		};
240
+		58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RNThumbnail" */ = {
241
+			isa = XCConfigurationList;
242
+			buildConfigurations = (
243
+				58B511F01A9E6C8500147676 /* Debug */,
244
+				58B511F11A9E6C8500147676 /* Release */,
245
+			);
246
+			defaultConfigurationIsVisible = 0;
247
+			defaultConfigurationName = Release;
248
+		};
249
+/* End XCConfigurationList section */
250
+	};
251
+	rootObject = 58B511D31A9E6C8500147676 /* Project object */;
252
+}

+ 24
- 0
package.json Bestand weergeven

@@ -0,0 +1,24 @@
1
+
2
+{
3
+  "name": "react-native-thumbnail",
4
+  "version": "1.0.0",
5
+  "description": "",
6
+  "main": "index.js",
7
+  "scripts": {
8
+    "test": "echo \"Error: no test specified\" && exit 1"
9
+  },
10
+  "keywords": [
11
+    "react-native"
12
+  ],
13
+  "repository": {
14
+    "type": "git",
15
+    "url": "git+https://github.com/phuochau/react-native-thumbnail.git"
16
+  },
17
+  "author": "",
18
+  "license": "",
19
+  "peerDependencies": {
20
+    "react-native": "^0.43.3",
21
+    "react-native-windows": "0.41.0-rc.1"
22
+
23
+  }
24
+}