Browse Source

Merge branch 'master' into master

Hau Vo 6 years ago
parent
commit
0684481615
No account linked to committer's email address
56 changed files with 3588 additions and 2322 deletions
  1. 1
    1
      Example/.babelrc
  2. 28
    6
      Example/.flowconfig
  3. 3
    0
      Example/.gitignore
  4. 0
    12
      Example/__tests__/App.js
  5. 2
    2
      Example/android/app/BUCK
  6. 8
    8
      Example/android/app/build.gradle
  7. 0
    53
      Example/android/app/proguard-rules.pro
  8. 2
    8
      Example/android/app/src/main/AndroidManifest.xml
  9. 2
    2
      Example/android/app/src/main/java/com/example573/MainActivity.java
  10. 2
    2
      Example/android/app/src/main/java/com/example573/MainApplication.java
  11. BIN
      Example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
  12. BIN
      Example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
  13. BIN
      Example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
  14. BIN
      Example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
  15. BIN
      Example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
  16. BIN
      Example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
  17. BIN
      Example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
  18. BIN
      Example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
  19. BIN
      Example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
  20. BIN
      Example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
  21. 1
    1
      Example/android/app/src/main/res/values/strings.xml
  22. 16
    1
      Example/android/build.gradle
  23. 0
    2
      Example/android/gradle.properties
  24. BIN
      Example/android/gradle/wrapper/gradle-wrapper.jar
  25. 1
    1
      Example/android/gradle/wrapper/gradle-wrapper.properties
  26. 43
    35
      Example/android/gradlew
  27. 4
    10
      Example/android/gradlew.bat
  28. 1
    1
      Example/android/settings.gradle
  29. 2
    2
      Example/app.json
  30. 5
    2
      Example/index.js
  31. 0
    16
      Example/ios/Example/AppDelegate.h
  32. 0
    0
      Example/ios/example573-tvOS/Info.plist
  33. 0
    0
      Example/ios/example573-tvOSTests/Info.plist
  34. 348
    167
      Example/ios/example573.xcodeproj/project.pbxproj
  35. 19
    19
      Example/ios/example573.xcodeproj/xcshareddata/xcschemes/example573-tvOS.xcscheme
  36. 19
    19
      Example/ios/example573.xcodeproj/xcshareddata/xcschemes/example573.xcscheme
  37. 14
    0
      Example/ios/example573/AppDelegate.h
  38. 3
    5
      Example/ios/example573/AppDelegate.m
  39. 1
    1
      Example/ios/example573/Base.lproj/LaunchScreen.xib
  40. 0
    0
      Example/ios/example573/Images.xcassets/AppIcon.appiconset/Contents.json
  41. 6
    0
      Example/ios/example573/Images.xcassets/Contents.json
  42. 18
    16
      Example/ios/example573/Info.plist
  43. 2
    4
      Example/ios/example573/main.m
  44. 1
    1
      Example/ios/example573Tests/Info.plist
  45. 4
    6
      Example/ios/example573Tests/example573Tests.m
  46. 26
    22
      Example/package.json
  47. 2741
    1859
      Example/yarn.lock
  48. 1
    1
      RNThumbnail.podspec
  49. 6
    4
      android/build.gradle
  50. BIN
      android/gradle/wrapper/gradle-wrapper.jar
  51. 6
    0
      android/gradle/wrapper/gradle-wrapper.properties
  52. 160
    0
      android/gradlew
  53. 90
    0
      android/gradlew.bat
  54. 0
    25
      ios/RNThumbnail.podspec
  55. 2
    5
      package.json
  56. 0
    3
      yarn.lock

+ 1
- 1
Example/.babelrc View File

1
 {
1
 {
2
-  "presets": ["react-native"]
2
+  "presets": ["module:metro-react-native-babel-preset"]
3
 }
3
 }

+ 28
- 6
Example/.flowconfig View File

16
 ; Ignore polyfills
16
 ; Ignore polyfills
17
 .*/Libraries/polyfills/.*
17
 .*/Libraries/polyfills/.*
18
 
18
 
19
+; Ignore metro
20
+.*/node_modules/metro/.*
21
+
19
 [include]
22
 [include]
20
 
23
 
21
 [libs]
24
 [libs]
22
 node_modules/react-native/Libraries/react-native/react-native-interface.js
25
 node_modules/react-native/Libraries/react-native/react-native-interface.js
23
 node_modules/react-native/flow/
26
 node_modules/react-native/flow/
27
+node_modules/react-native/flow-github/
24
 
28
 
25
 [options]
29
 [options]
26
 emoji=true
30
 emoji=true
27
 
31
 
32
+esproposal.optional_chaining=enable
33
+esproposal.nullish_coalescing=enable
34
+
28
 module.system=haste
35
 module.system=haste
36
+module.system.haste.use_name_reducers=true
37
+# get basename
38
+module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1'
39
+# strip .js or .js.flow suffix
40
+module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1'
41
+# strip .ios suffix
42
+module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1'
43
+module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1'
44
+module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1'
45
+module.system.haste.paths.blacklist=.*/__tests__/.*
46
+module.system.haste.paths.blacklist=.*/__mocks__/.*
47
+module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/Animated/src/polyfills/.*
48
+module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/Libraries/.*
29
 
49
 
30
 munge_underscores=true
50
 munge_underscores=true
31
 
51
 
32
 module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
52
 module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
33
 
53
 
54
+module.file_ext=.js
55
+module.file_ext=.jsx
56
+module.file_ext=.json
57
+module.file_ext=.native.js
58
+
34
 suppress_type=$FlowIssue
59
 suppress_type=$FlowIssue
35
 suppress_type=$FlowFixMe
60
 suppress_type=$FlowFixMe
36
 suppress_type=$FlowFixMeProps
61
 suppress_type=$FlowFixMeProps
37
 suppress_type=$FlowFixMeState
62
 suppress_type=$FlowFixMeState
38
-suppress_type=$FixMe
39
 
63
 
40
-suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(5[0-3]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
41
-suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(5[0-3]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
64
+suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
65
+suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
42
 suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
66
 suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
43
 suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
67
 suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
44
 
68
 
45
-unsafe.enable_getters_and_setters=true
46
-
47
 [version]
69
 [version]
48
-^0.53.0
70
+^0.78.0

+ 3
- 0
Example/.gitignore View File

51
 */fastlane/report.xml
51
 */fastlane/report.xml
52
 */fastlane/Preview.html
52
 */fastlane/Preview.html
53
 */fastlane/screenshots
53
 */fastlane/screenshots
54
+
55
+# Bundle artifact
56
+*.jsbundle

+ 0
- 12
Example/__tests__/App.js View File

1
-import 'react-native';
2
-import React from 'react';
3
-import App from '../App';
4
-
5
-// Note: test renderer must be required after react-native.
6
-import renderer from 'react-test-renderer';
7
-
8
-it('renders correctly', () => {
9
-  const tree = renderer.create(
10
-    <App />
11
-  );
12
-});

+ 2
- 2
Example/android/app/BUCK View File

45
 
45
 
46
 android_build_config(
46
 android_build_config(
47
     name = "build_config",
47
     name = "build_config",
48
-    package = "com.example",
48
+    package = "com.example573",
49
 )
49
 )
50
 
50
 
51
 android_resource(
51
 android_resource(
52
     name = "res",
52
     name = "res",
53
-    package = "com.example",
53
+    package = "com.example573",
54
     res = "src/main/res",
54
     res = "src/main/res",
55
 )
55
 )
56
 
56
 

+ 8
- 8
Example/android/app/build.gradle View File

94
 def enableProguardInReleaseBuilds = false
94
 def enableProguardInReleaseBuilds = false
95
 
95
 
96
 android {
96
 android {
97
-    compileSdkVersion 23
98
-    buildToolsVersion "23.0.1"
97
+    compileSdkVersion rootProject.ext.compileSdkVersion
98
+    buildToolsVersion rootProject.ext.buildToolsVersion
99
 
99
 
100
     defaultConfig {
100
     defaultConfig {
101
-        applicationId "com.example"
102
-        minSdkVersion 16
103
-        targetSdkVersion 22
101
+        applicationId "com.example573"
102
+        minSdkVersion rootProject.ext.minSdkVersion
103
+        targetSdkVersion rootProject.ext.targetSdkVersion
104
         versionCode 1
104
         versionCode 1
105
         versionName "1.0"
105
         versionName "1.0"
106
         ndk {
106
         ndk {
139
 dependencies {
139
 dependencies {
140
     compile project(':react-native-thumbnail')
140
     compile project(':react-native-thumbnail')
141
     compile project(':react-native-image-picker')
141
     compile project(':react-native-image-picker')
142
-    compile fileTree(dir: "libs", include: ["*.jar"])
143
-    compile "com.android.support:appcompat-v7:23.0.1"
144
-    compile "com.facebook.react:react-native:+"  // From node_modules
142
+    implementation fileTree(dir: "libs", include: ["*.jar"])
143
+    implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
144
+    implementation "com.facebook.react:react-native:+"  // From node_modules
145
 }
145
 }
146
 
146
 
147
 // Run this once to be able to run the application with BUCK
147
 // Run this once to be able to run the application with BUCK

+ 0
- 53
Example/android/app/proguard-rules.pro View File

15
 #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
15
 #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16
 #   public *;
16
 #   public *;
17
 #}
17
 #}
18
-
19
-# Disabling obfuscation is useful if you collect stack traces from production crashes
20
-# (unless you are using a system that supports de-obfuscate the stack traces).
21
--dontobfuscate
22
-
23
-# React Native
24
-
25
-# Keep our interfaces so they can be used by other ProGuard rules.
26
-# See http://sourceforge.net/p/proguard/bugs/466/
27
--keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip
28
--keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters
29
--keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip
30
-
31
-# Do not strip any method/class that is annotated with @DoNotStrip
32
--keep @com.facebook.proguard.annotations.DoNotStrip class *
33
--keep @com.facebook.common.internal.DoNotStrip class *
34
--keepclassmembers class * {
35
-    @com.facebook.proguard.annotations.DoNotStrip *;
36
-    @com.facebook.common.internal.DoNotStrip *;
37
-}
38
-
39
--keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * {
40
-  void set*(***);
41
-  *** get*();
42
-}
43
-
44
--keep class * extends com.facebook.react.bridge.JavaScriptModule { *; }
45
--keep class * extends com.facebook.react.bridge.NativeModule { *; }
46
--keepclassmembers,includedescriptorclasses class * { native <methods>; }
47
--keepclassmembers class *  { @com.facebook.react.uimanager.UIProp <fields>; }
48
--keepclassmembers class *  { @com.facebook.react.uimanager.annotations.ReactProp <methods>; }
49
--keepclassmembers class *  { @com.facebook.react.uimanager.annotations.ReactPropGroup <methods>; }
50
-
51
--dontwarn com.facebook.react.**
52
-
53
-# TextLayoutBuilder uses a non-public Android constructor within StaticLayout.
54
-# See libs/proxy/src/main/java/com/facebook/fbui/textlayoutbuilder/proxy for details.
55
--dontwarn android.text.StaticLayout
56
-
57
-# okhttp
58
-
59
--keepattributes Signature
60
--keepattributes *Annotation*
61
--keep class okhttp3.** { *; }
62
--keep interface okhttp3.** { *; }
63
--dontwarn okhttp3.**
64
-
65
-# okio
66
-
67
--keep class sun.misc.Unsafe { *; }
68
--dontwarn java.nio.file.*
69
--dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
70
--dontwarn okio.**

+ 2
- 8
Example/android/app/src/main/AndroidManifest.xml View File

1
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
1
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
2
-    package="com.example"
3
-    android:versionCode="1"
4
-    android:versionName="1.0">
2
+    package="com.example573">
5
 
3
 
6
     <uses-permission android:name="android.permission.INTERNET" />
4
     <uses-permission android:name="android.permission.INTERNET" />
7
     <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
5
     <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
8
 
6
 
9
-    <uses-sdk
10
-        android:minSdkVersion="16"
11
-        android:targetSdkVersion="22" />
12
-
13
     <application
7
     <application
14
       android:name=".MainApplication"
8
       android:name=".MainApplication"
15
-      android:allowBackup="true"
16
       android:label="@string/app_name"
9
       android:label="@string/app_name"
17
       android:icon="@mipmap/ic_launcher"
10
       android:icon="@mipmap/ic_launcher"
11
+      android:allowBackup="false"
18
       android:theme="@style/AppTheme">
12
       android:theme="@style/AppTheme">
19
       <activity
13
       <activity
20
         android:name=".MainActivity"
14
         android:name=".MainActivity"

Example/android/app/src/main/java/com/example/MainActivity.java → Example/android/app/src/main/java/com/example573/MainActivity.java View File

1
-package com.example;
1
+package com.example573;
2
 
2
 
3
 import com.facebook.react.ReactActivity;
3
 import com.facebook.react.ReactActivity;
4
 
4
 
10
      */
10
      */
11
     @Override
11
     @Override
12
     protected String getMainComponentName() {
12
     protected String getMainComponentName() {
13
-        return "Example";
13
+        return "example573";
14
     }
14
     }
15
 }
15
 }

Example/android/app/src/main/java/com/example/MainApplication.java → Example/android/app/src/main/java/com/example573/MainApplication.java View File

1
-package com.example;
1
+package com.example573;
2
 
2
 
3
 import android.app.Application;
3
 import android.app.Application;
4
 
4
 
5
 import com.facebook.react.ReactApplication;
5
 import com.facebook.react.ReactApplication;
6
-import io.thumbnail.RNThumbnailPackage;
6
+import me.hauvo.thumbnail.RNThumbnailPackage;
7
 import com.imagepicker.ImagePickerPackage;
7
 import com.imagepicker.ImagePickerPackage;
8
 import com.facebook.react.ReactNativeHost;
8
 import com.facebook.react.ReactNativeHost;
9
 import com.facebook.react.ReactPackage;
9
 import com.facebook.react.ReactPackage;

BIN
Example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png View File


BIN
Example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png View File


BIN
Example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png View File


BIN
Example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png View File


BIN
Example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png View File


BIN
Example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png View File


BIN
Example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png View File


BIN
Example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png View File


BIN
Example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png View File


BIN
Example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png View File


+ 1
- 1
Example/android/app/src/main/res/values/strings.xml View File

1
 <resources>
1
 <resources>
2
-    <string name="app_name">Example</string>
2
+    <string name="app_name">example573</string>
3
 </resources>
3
 </resources>

+ 16
- 1
Example/android/build.gradle View File

1
 // Top-level build file where you can add configuration options common to all sub-projects/modules.
1
 // Top-level build file where you can add configuration options common to all sub-projects/modules.
2
 
2
 
3
 buildscript {
3
 buildscript {
4
+    ext {
5
+        buildToolsVersion = "27.0.3"
6
+        minSdkVersion = 16
7
+        compileSdkVersion = 27
8
+        targetSdkVersion = 26
9
+        supportLibVersion = "27.1.1"
10
+    }
4
     repositories {
11
     repositories {
5
         jcenter()
12
         jcenter()
13
+        google()
6
     }
14
     }
7
     dependencies {
15
     dependencies {
8
-        classpath 'com.android.tools.build:gradle:2.2.3'
16
+        classpath 'com.android.tools.build:gradle:3.1.4'
9
 
17
 
10
         // NOTE: Do not place your application dependencies here; they belong
18
         // NOTE: Do not place your application dependencies here; they belong
11
         // in the individual module build.gradle files
19
         // in the individual module build.gradle files
20
             // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
28
             // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
21
             url "$rootDir/../node_modules/react-native/android"
29
             url "$rootDir/../node_modules/react-native/android"
22
         }
30
         }
31
+        google()
23
     }
32
     }
24
 }
33
 }
34
+
35
+
36
+task wrapper(type: Wrapper) {
37
+    gradleVersion = '4.4'
38
+    distributionUrl = distributionUrl.replace("bin", "all")
39
+}

+ 0
- 2
Example/android/gradle.properties View File

16
 # This option should only be used with decoupled projects. More details, visit
16
 # This option should only be used with decoupled projects. More details, visit
17
 # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17
 # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18
 # org.gradle.parallel=true
18
 # org.gradle.parallel=true
19
-
20
-android.useDeprecatedNdk=true

BIN
Example/android/gradle/wrapper/gradle-wrapper.jar View File


+ 1
- 1
Example/android/gradle/wrapper/gradle-wrapper.properties View File

2
 distributionPath=wrapper/dists
2
 distributionPath=wrapper/dists
3
 zipStoreBase=GRADLE_USER_HOME
3
 zipStoreBase=GRADLE_USER_HOME
4
 zipStorePath=wrapper/dists
4
 zipStorePath=wrapper/dists
5
-distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
5
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip

+ 43
- 35
Example/android/gradlew View File

1
-#!/usr/bin/env bash
1
+#!/usr/bin/env sh
2
 
2
 
3
 ##############################################################################
3
 ##############################################################################
4
 ##
4
 ##
6
 ##
6
 ##
7
 ##############################################################################
7
 ##############################################################################
8
 
8
 
9
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10
-DEFAULT_JVM_OPTS=""
9
+# Attempt to set APP_HOME
10
+# Resolve links: $0 may be a link
11
+PRG="$0"
12
+# Need this for relative symlinks.
13
+while [ -h "$PRG" ] ; do
14
+    ls=`ls -ld "$PRG"`
15
+    link=`expr "$ls" : '.*-> \(.*\)$'`
16
+    if expr "$link" : '/.*' > /dev/null; then
17
+        PRG="$link"
18
+    else
19
+        PRG=`dirname "$PRG"`"/$link"
20
+    fi
21
+done
22
+SAVED="`pwd`"
23
+cd "`dirname \"$PRG\"`/" >/dev/null
24
+APP_HOME="`pwd -P`"
25
+cd "$SAVED" >/dev/null
11
 
26
 
12
 APP_NAME="Gradle"
27
 APP_NAME="Gradle"
13
 APP_BASE_NAME=`basename "$0"`
28
 APP_BASE_NAME=`basename "$0"`
14
 
29
 
30
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31
+DEFAULT_JVM_OPTS=""
32
+
15
 # Use the maximum available, or set MAX_FD != -1 to use that value.
33
 # Use the maximum available, or set MAX_FD != -1 to use that value.
16
 MAX_FD="maximum"
34
 MAX_FD="maximum"
17
 
35
 
18
-warn ( ) {
36
+warn () {
19
     echo "$*"
37
     echo "$*"
20
 }
38
 }
21
 
39
 
22
-die ( ) {
40
+die () {
23
     echo
41
     echo
24
     echo "$*"
42
     echo "$*"
25
     echo
43
     echo
30
 cygwin=false
48
 cygwin=false
31
 msys=false
49
 msys=false
32
 darwin=false
50
 darwin=false
51
+nonstop=false
33
 case "`uname`" in
52
 case "`uname`" in
34
   CYGWIN* )
53
   CYGWIN* )
35
     cygwin=true
54
     cygwin=true
40
   MINGW* )
59
   MINGW* )
41
     msys=true
60
     msys=true
42
     ;;
61
     ;;
62
+  NONSTOP* )
63
+    nonstop=true
64
+    ;;
43
 esac
65
 esac
44
 
66
 
45
-# For Cygwin, ensure paths are in UNIX format before anything is touched.
46
-if $cygwin ; then
47
-    [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
48
-fi
49
-
50
-# Attempt to set APP_HOME
51
-# Resolve links: $0 may be a link
52
-PRG="$0"
53
-# Need this for relative symlinks.
54
-while [ -h "$PRG" ] ; do
55
-    ls=`ls -ld "$PRG"`
56
-    link=`expr "$ls" : '.*-> \(.*\)$'`
57
-    if expr "$link" : '/.*' > /dev/null; then
58
-        PRG="$link"
59
-    else
60
-        PRG=`dirname "$PRG"`"/$link"
61
-    fi
62
-done
63
-SAVED="`pwd`"
64
-cd "`dirname \"$PRG\"`/" >&-
65
-APP_HOME="`pwd -P`"
66
-cd "$SAVED" >&-
67
-
68
 CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
67
 CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
69
 
68
 
70
 # Determine the Java command to use to start the JVM.
69
 # Determine the Java command to use to start the JVM.
90
 fi
89
 fi
91
 
90
 
92
 # Increase the maximum file descriptors if we can.
91
 # Increase the maximum file descriptors if we can.
93
-if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
92
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
94
     MAX_FD_LIMIT=`ulimit -H -n`
93
     MAX_FD_LIMIT=`ulimit -H -n`
95
     if [ $? -eq 0 ] ; then
94
     if [ $? -eq 0 ] ; then
96
         if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
95
         if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
114
 if $cygwin ; then
113
 if $cygwin ; then
115
     APP_HOME=`cygpath --path --mixed "$APP_HOME"`
114
     APP_HOME=`cygpath --path --mixed "$APP_HOME"`
116
     CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
115
     CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
116
+    JAVACMD=`cygpath --unix "$JAVACMD"`
117
 
117
 
118
     # We build the pattern for arguments to be converted via cygpath
118
     # We build the pattern for arguments to be converted via cygpath
119
     ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
119
     ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
154
     esac
154
     esac
155
 fi
155
 fi
156
 
156
 
157
-# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
158
-function splitJvmOpts() {
159
-    JVM_OPTS=("$@")
157
+# Escape application args
158
+save () {
159
+    for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160
+    echo " "
160
 }
161
 }
161
-eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
162
-JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
162
+APP_ARGS=$(save "$@")
163
+
164
+# Collect all arguments for the java command, following the shell quoting and substitution rules
165
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
166
+
167
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
168
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
169
+  cd "$(dirname "$0")"
170
+fi
163
 
171
 
164
-exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
172
+exec "$JAVACMD" "$@"

+ 4
- 10
Example/android/gradlew.bat View File

8
 @rem Set local scope for the variables with windows NT shell
8
 @rem Set local scope for the variables with windows NT shell
9
 if "%OS%"=="Windows_NT" setlocal
9
 if "%OS%"=="Windows_NT" setlocal
10
 
10
 
11
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12
-set DEFAULT_JVM_OPTS=
13
-
14
 set DIRNAME=%~dp0
11
 set DIRNAME=%~dp0
15
 if "%DIRNAME%" == "" set DIRNAME=.
12
 if "%DIRNAME%" == "" set DIRNAME=.
16
 set APP_BASE_NAME=%~n0
13
 set APP_BASE_NAME=%~n0
17
 set APP_HOME=%DIRNAME%
14
 set APP_HOME=%DIRNAME%
18
 
15
 
16
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17
+set DEFAULT_JVM_OPTS=
18
+
19
 @rem Find java.exe
19
 @rem Find java.exe
20
 if defined JAVA_HOME goto findJavaFromJavaHome
20
 if defined JAVA_HOME goto findJavaFromJavaHome
21
 
21
 
46
 goto fail
46
 goto fail
47
 
47
 
48
 :init
48
 :init
49
-@rem Get command-line arguments, handling Windowz variants
49
+@rem Get command-line arguments, handling Windows variants
50
 
50
 
51
 if not "%OS%" == "Windows_NT" goto win9xME_args
51
 if not "%OS%" == "Windows_NT" goto win9xME_args
52
-if "%@eval[2+2]" == "4" goto 4NT_args
53
 
52
 
54
 :win9xME_args
53
 :win9xME_args
55
 @rem Slurp the command line arguments.
54
 @rem Slurp the command line arguments.
60
 if "x%~1" == "x" goto execute
59
 if "x%~1" == "x" goto execute
61
 
60
 
62
 set CMD_LINE_ARGS=%*
61
 set CMD_LINE_ARGS=%*
63
-goto execute
64
-
65
-:4NT_args
66
-@rem Get arguments from the 4NT Shell from JP Software
67
-set CMD_LINE_ARGS=%$
68
 
62
 
69
 :execute
63
 :execute
70
 @rem Setup the command line
64
 @rem Setup the command line

+ 1
- 1
Example/android/settings.gradle View File

1
-rootProject.name = 'Example'
1
+rootProject.name = 'example573'
2
 include ':react-native-thumbnail'
2
 include ':react-native-thumbnail'
3
 project(':react-native-thumbnail').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-thumbnail/android')
3
 project(':react-native-thumbnail').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-thumbnail/android')
4
 include ':react-native-image-picker'
4
 include ':react-native-image-picker'

+ 2
- 2
Example/app.json View File

1
 {
1
 {
2
-  "name": "Example",
3
-  "displayName": "Example"
2
+  "name": "example573",
3
+  "displayName": "example573"
4
 }
4
 }

+ 5
- 2
Example/index.js View File

1
-import { AppRegistry } from 'react-native';
1
+/** @format */
2
+
3
+import {AppRegistry} from 'react-native';
2
 import App from './App';
4
 import App from './App';
5
+import {name as appName} from './app.json';
3
 
6
 
4
-AppRegistry.registerComponent('Example', () => App);
7
+AppRegistry.registerComponent(appName, () => App);

+ 0
- 16
Example/ios/Example/AppDelegate.h View File

1
-/**
2
- * Copyright (c) 2015-present, Facebook, Inc.
3
- * All rights reserved.
4
- *
5
- * This source code is licensed under the BSD-style license found in the
6
- * LICENSE file in the root directory of this source tree. An additional grant
7
- * of patent rights can be found in the PATENTS file in the same directory.
8
- */
9
-
10
-#import <UIKit/UIKit.h>
11
-
12
-@interface AppDelegate : UIResponder <UIApplicationDelegate>
13
-
14
-@property (nonatomic, strong) UIWindow *window;
15
-
16
-@end

Example/ios/Example-tvOS/Info.plist → Example/ios/example573-tvOS/Info.plist View File


Example/ios/Example-tvOSTests/Info.plist → Example/ios/example573-tvOSTests/Info.plist View File


Example/ios/example573.xcodeproj/project.pbxproj
File diff suppressed because it is too large
View File


Example/ios/Example.xcodeproj/xcshareddata/xcschemes/Example-tvOS.xcscheme → Example/ios/example573.xcodeproj/xcshareddata/xcschemes/example573-tvOS.xcscheme View File

1
 <?xml version="1.0" encoding="UTF-8"?>
1
 <?xml version="1.0" encoding="UTF-8"?>
2
 <Scheme
2
 <Scheme
3
-   LastUpgradeVersion = "0820"
3
+   LastUpgradeVersion = "0940"
4
    version = "1.3">
4
    version = "1.3">
5
    <BuildAction
5
    <BuildAction
6
       parallelizeBuildables = "NO"
6
       parallelizeBuildables = "NO"
29
             <BuildableReference
29
             <BuildableReference
30
                BuildableIdentifier = "primary"
30
                BuildableIdentifier = "primary"
31
                BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
31
                BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
32
-               BuildableName = "Example-tvOS.app"
33
-               BlueprintName = "Example-tvOS"
34
-               ReferencedContainer = "container:Example.xcodeproj">
32
+               BuildableName = "example573-tvOS.app"
33
+               BlueprintName = "example573-tvOS"
34
+               ReferencedContainer = "container:example573.xcodeproj">
35
             </BuildableReference>
35
             </BuildableReference>
36
          </BuildActionEntry>
36
          </BuildActionEntry>
37
          <BuildActionEntry
37
          <BuildActionEntry
43
             <BuildableReference
43
             <BuildableReference
44
                BuildableIdentifier = "primary"
44
                BuildableIdentifier = "primary"
45
                BlueprintIdentifier = "2D02E48F1E0B4A5D006451C7"
45
                BlueprintIdentifier = "2D02E48F1E0B4A5D006451C7"
46
-               BuildableName = "Example-tvOSTests.xctest"
47
-               BlueprintName = "Example-tvOSTests"
48
-               ReferencedContainer = "container:Example.xcodeproj">
46
+               BuildableName = "example573-tvOSTests.xctest"
47
+               BlueprintName = "example573-tvOSTests"
48
+               ReferencedContainer = "container:example573.xcodeproj">
49
             </BuildableReference>
49
             </BuildableReference>
50
          </BuildActionEntry>
50
          </BuildActionEntry>
51
       </BuildActionEntries>
51
       </BuildActionEntries>
61
             <BuildableReference
61
             <BuildableReference
62
                BuildableIdentifier = "primary"
62
                BuildableIdentifier = "primary"
63
                BlueprintIdentifier = "2D02E48F1E0B4A5D006451C7"
63
                BlueprintIdentifier = "2D02E48F1E0B4A5D006451C7"
64
-               BuildableName = "Example-tvOSTests.xctest"
65
-               BlueprintName = "Example-tvOSTests"
66
-               ReferencedContainer = "container:Example.xcodeproj">
64
+               BuildableName = "example573-tvOSTests.xctest"
65
+               BlueprintName = "example573-tvOSTests"
66
+               ReferencedContainer = "container:example573.xcodeproj">
67
             </BuildableReference>
67
             </BuildableReference>
68
          </TestableReference>
68
          </TestableReference>
69
       </Testables>
69
       </Testables>
71
          <BuildableReference
71
          <BuildableReference
72
             BuildableIdentifier = "primary"
72
             BuildableIdentifier = "primary"
73
             BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
73
             BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
74
-            BuildableName = "Example-tvOS.app"
75
-            BlueprintName = "Example-tvOS"
76
-            ReferencedContainer = "container:Example.xcodeproj">
74
+            BuildableName = "example573-tvOS.app"
75
+            BlueprintName = "example573-tvOS"
76
+            ReferencedContainer = "container:example573.xcodeproj">
77
          </BuildableReference>
77
          </BuildableReference>
78
       </MacroExpansion>
78
       </MacroExpansion>
79
       <AdditionalOptions>
79
       <AdditionalOptions>
94
          <BuildableReference
94
          <BuildableReference
95
             BuildableIdentifier = "primary"
95
             BuildableIdentifier = "primary"
96
             BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
96
             BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
97
-            BuildableName = "Example-tvOS.app"
98
-            BlueprintName = "Example-tvOS"
99
-            ReferencedContainer = "container:Example.xcodeproj">
97
+            BuildableName = "example573-tvOS.app"
98
+            BlueprintName = "example573-tvOS"
99
+            ReferencedContainer = "container:example573.xcodeproj">
100
          </BuildableReference>
100
          </BuildableReference>
101
       </BuildableProductRunnable>
101
       </BuildableProductRunnable>
102
       <AdditionalOptions>
102
       <AdditionalOptions>
113
          <BuildableReference
113
          <BuildableReference
114
             BuildableIdentifier = "primary"
114
             BuildableIdentifier = "primary"
115
             BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
115
             BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
116
-            BuildableName = "Example-tvOS.app"
117
-            BlueprintName = "Example-tvOS"
118
-            ReferencedContainer = "container:Example.xcodeproj">
116
+            BuildableName = "example573-tvOS.app"
117
+            BlueprintName = "example573-tvOS"
118
+            ReferencedContainer = "container:example573.xcodeproj">
119
          </BuildableReference>
119
          </BuildableReference>
120
       </BuildableProductRunnable>
120
       </BuildableProductRunnable>
121
    </ProfileAction>
121
    </ProfileAction>

Example/ios/Example.xcodeproj/xcshareddata/xcschemes/Example.xcscheme → Example/ios/example573.xcodeproj/xcshareddata/xcschemes/example573.xcscheme View File

1
 <?xml version="1.0" encoding="UTF-8"?>
1
 <?xml version="1.0" encoding="UTF-8"?>
2
 <Scheme
2
 <Scheme
3
-   LastUpgradeVersion = "0620"
3
+   LastUpgradeVersion = "0940"
4
    version = "1.3">
4
    version = "1.3">
5
    <BuildAction
5
    <BuildAction
6
       parallelizeBuildables = "NO"
6
       parallelizeBuildables = "NO"
29
             <BuildableReference
29
             <BuildableReference
30
                BuildableIdentifier = "primary"
30
                BuildableIdentifier = "primary"
31
                BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
31
                BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
32
-               BuildableName = "Example.app"
33
-               BlueprintName = "Example"
34
-               ReferencedContainer = "container:Example.xcodeproj">
32
+               BuildableName = "example573.app"
33
+               BlueprintName = "example573"
34
+               ReferencedContainer = "container:example573.xcodeproj">
35
             </BuildableReference>
35
             </BuildableReference>
36
          </BuildActionEntry>
36
          </BuildActionEntry>
37
          <BuildActionEntry
37
          <BuildActionEntry
43
             <BuildableReference
43
             <BuildableReference
44
                BuildableIdentifier = "primary"
44
                BuildableIdentifier = "primary"
45
                BlueprintIdentifier = "00E356ED1AD99517003FC87E"
45
                BlueprintIdentifier = "00E356ED1AD99517003FC87E"
46
-               BuildableName = "ExampleTests.xctest"
47
-               BlueprintName = "ExampleTests"
48
-               ReferencedContainer = "container:Example.xcodeproj">
46
+               BuildableName = "example573Tests.xctest"
47
+               BlueprintName = "example573Tests"
48
+               ReferencedContainer = "container:example573.xcodeproj">
49
             </BuildableReference>
49
             </BuildableReference>
50
          </BuildActionEntry>
50
          </BuildActionEntry>
51
       </BuildActionEntries>
51
       </BuildActionEntries>
61
             <BuildableReference
61
             <BuildableReference
62
                BuildableIdentifier = "primary"
62
                BuildableIdentifier = "primary"
63
                BlueprintIdentifier = "00E356ED1AD99517003FC87E"
63
                BlueprintIdentifier = "00E356ED1AD99517003FC87E"
64
-               BuildableName = "ExampleTests.xctest"
65
-               BlueprintName = "ExampleTests"
66
-               ReferencedContainer = "container:Example.xcodeproj">
64
+               BuildableName = "example573Tests.xctest"
65
+               BlueprintName = "example573Tests"
66
+               ReferencedContainer = "container:example573.xcodeproj">
67
             </BuildableReference>
67
             </BuildableReference>
68
          </TestableReference>
68
          </TestableReference>
69
       </Testables>
69
       </Testables>
71
          <BuildableReference
71
          <BuildableReference
72
             BuildableIdentifier = "primary"
72
             BuildableIdentifier = "primary"
73
             BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
73
             BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
74
-            BuildableName = "Example.app"
75
-            BlueprintName = "Example"
76
-            ReferencedContainer = "container:Example.xcodeproj">
74
+            BuildableName = "example573.app"
75
+            BlueprintName = "example573"
76
+            ReferencedContainer = "container:example573.xcodeproj">
77
          </BuildableReference>
77
          </BuildableReference>
78
       </MacroExpansion>
78
       </MacroExpansion>
79
       <AdditionalOptions>
79
       <AdditionalOptions>
94
          <BuildableReference
94
          <BuildableReference
95
             BuildableIdentifier = "primary"
95
             BuildableIdentifier = "primary"
96
             BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
96
             BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
97
-            BuildableName = "Example.app"
98
-            BlueprintName = "Example"
99
-            ReferencedContainer = "container:Example.xcodeproj">
97
+            BuildableName = "example573.app"
98
+            BlueprintName = "example573"
99
+            ReferencedContainer = "container:example573.xcodeproj">
100
          </BuildableReference>
100
          </BuildableReference>
101
       </BuildableProductRunnable>
101
       </BuildableProductRunnable>
102
       <AdditionalOptions>
102
       <AdditionalOptions>
113
          <BuildableReference
113
          <BuildableReference
114
             BuildableIdentifier = "primary"
114
             BuildableIdentifier = "primary"
115
             BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
115
             BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
116
-            BuildableName = "Example.app"
117
-            BlueprintName = "Example"
118
-            ReferencedContainer = "container:Example.xcodeproj">
116
+            BuildableName = "example573.app"
117
+            BlueprintName = "example573"
118
+            ReferencedContainer = "container:example573.xcodeproj">
119
          </BuildableReference>
119
          </BuildableReference>
120
       </BuildableProductRunnable>
120
       </BuildableProductRunnable>
121
    </ProfileAction>
121
    </ProfileAction>

+ 14
- 0
Example/ios/example573/AppDelegate.h View File

1
+/**
2
+ * Copyright (c) 2015-present, Facebook, Inc.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+#import <UIKit/UIKit.h>
9
+
10
+@interface AppDelegate : UIResponder <UIApplicationDelegate>
11
+
12
+@property (nonatomic, strong) UIWindow *window;
13
+
14
+@end

Example/ios/Example/AppDelegate.m → Example/ios/example573/AppDelegate.m View File

1
 /**
1
 /**
2
  * Copyright (c) 2015-present, Facebook, Inc.
2
  * Copyright (c) 2015-present, Facebook, Inc.
3
- * All rights reserved.
4
  *
3
  *
5
- * This source code is licensed under the BSD-style license found in the
6
- * LICENSE file in the root directory of this source tree. An additional grant
7
- * of patent rights can be found in the PATENTS file in the same directory.
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
8
  */
6
  */
9
 
7
 
10
 #import "AppDelegate.h"
8
 #import "AppDelegate.h"
21
   jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
19
   jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
22
 
20
 
23
   RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
21
   RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
24
-                                                      moduleName:@"Example"
22
+                                                      moduleName:@"example573"
25
                                                initialProperties:nil
23
                                                initialProperties:nil
26
                                                    launchOptions:launchOptions];
24
                                                    launchOptions:launchOptions];
27
   rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
25
   rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];

Example/ios/Example/Base.lproj/LaunchScreen.xib → Example/ios/example573/Base.lproj/LaunchScreen.xib View File

18
                     <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
18
                     <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
19
                     <nil key="highlightedColor"/>
19
                     <nil key="highlightedColor"/>
20
                 </label>
20
                 </label>
21
-                <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Example" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
21
+                <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="example573" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
22
                     <rect key="frame" x="20" y="140" width="441" height="43"/>
22
                     <rect key="frame" x="20" y="140" width="441" height="43"/>
23
                     <fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
23
                     <fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
24
                     <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
24
                     <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>

Example/ios/Example/Images.xcassets/AppIcon.appiconset/Contents.json → Example/ios/example573/Images.xcassets/AppIcon.appiconset/Contents.json View File


+ 6
- 0
Example/ios/example573/Images.xcassets/Contents.json View File

1
+{
2
+  "info" : {
3
+    "version" : 1,
4
+    "author" : "xcode"
5
+  }
6
+}

Example/ios/Example/Info.plist → Example/ios/example573/Info.plist View File

5
 	<key>CFBundleDevelopmentRegion</key>
5
 	<key>CFBundleDevelopmentRegion</key>
6
 	<string>en</string>
6
 	<string>en</string>
7
 	<key>CFBundleDisplayName</key>
7
 	<key>CFBundleDisplayName</key>
8
-	<string>RNThumbnail</string>
8
+	<string>example573</string>
9
 	<key>CFBundleExecutable</key>
9
 	<key>CFBundleExecutable</key>
10
 	<string>$(EXECUTABLE_NAME)</string>
10
 	<string>$(EXECUTABLE_NAME)</string>
11
 	<key>CFBundleIdentifier</key>
11
 	<key>CFBundleIdentifier</key>
24
 	<string>1</string>
24
 	<string>1</string>
25
 	<key>LSRequiresIPhoneOS</key>
25
 	<key>LSRequiresIPhoneOS</key>
26
 	<true/>
26
 	<true/>
27
-	<key>NSAppTransportSecurity</key>
28
-	<dict>
29
-		<key>NSExceptionDomains</key>
30
-		<dict>
31
-			<key>localhost</key>
32
-			<dict>
33
-				<key>NSExceptionAllowsInsecureHTTPLoads</key>
34
-				<true/>
35
-			</dict>
36
-		</dict>
37
-	</dict>
38
 	<key>NSLocationWhenInUseUsageDescription</key>
27
 	<key>NSLocationWhenInUseUsageDescription</key>
39
 	<string></string>
28
 	<string></string>
40
 	<key>UILaunchStoryboardName</key>
29
 	<key>UILaunchStoryboardName</key>
49
 		<string>UIInterfaceOrientationLandscapeLeft</string>
38
 		<string>UIInterfaceOrientationLandscapeLeft</string>
50
 		<string>UIInterfaceOrientationLandscapeRight</string>
39
 		<string>UIInterfaceOrientationLandscapeRight</string>
51
 	</array>
40
 	</array>
52
-	<key>NSPhotoLibraryUsageDescription</key>
53
-	<string>For testing only</string>
54
-	<key>NSCameraUsageDescription</key>
55
-	<string>For testing only</string>
56
 	<key>UIViewControllerBasedStatusBarAppearance</key>
41
 	<key>UIViewControllerBasedStatusBarAppearance</key>
57
 	<false/>
42
 	<false/>
43
+	<key>NSAppTransportSecurity</key>
44
+	<dict>
45
+		<key>NSAllowsArbitraryLoads</key>
46
+		<true/>
47
+		<key>NSExceptionDomains</key>
48
+		<dict>
49
+			<key>localhost</key>
50
+			<dict>
51
+				<key>NSExceptionAllowsInsecureHTTPLoads</key>
52
+				<true/>
53
+			</dict>
54
+		</dict>
55
+	</dict>
56
+	<key>NSPhotoLibraryUsageDescription</key>
57
+	<string>Choose photo</string>
58
+	<key>NSCameraUsageDescription</key>
59
+	<string>Take photo</string>
58
 </dict>
60
 </dict>
59
 </plist>
61
 </plist>

Example/ios/Example/main.m → Example/ios/example573/main.m View File

1
 /**
1
 /**
2
  * Copyright (c) 2015-present, Facebook, Inc.
2
  * Copyright (c) 2015-present, Facebook, Inc.
3
- * All rights reserved.
4
  *
3
  *
5
- * This source code is licensed under the BSD-style license found in the
6
- * LICENSE file in the root directory of this source tree. An additional grant
7
- * of patent rights can be found in the PATENTS file in the same directory.
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
8
  */
6
  */
9
 
7
 
10
 #import <UIKit/UIKit.h>
8
 #import <UIKit/UIKit.h>

Example/ios/ExampleTests/Info.plist → Example/ios/example573Tests/Info.plist View File

7
 	<key>CFBundleExecutable</key>
7
 	<key>CFBundleExecutable</key>
8
 	<string>$(EXECUTABLE_NAME)</string>
8
 	<string>$(EXECUTABLE_NAME)</string>
9
 	<key>CFBundleIdentifier</key>
9
 	<key>CFBundleIdentifier</key>
10
-	<string>org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)</string>
10
+	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
11
 	<key>CFBundleInfoDictionaryVersion</key>
11
 	<key>CFBundleInfoDictionaryVersion</key>
12
 	<string>6.0</string>
12
 	<string>6.0</string>
13
 	<key>CFBundleName</key>
13
 	<key>CFBundleName</key>

Example/ios/ExampleTests/ExampleTests.m → Example/ios/example573Tests/example573Tests.m View File

1
 /**
1
 /**
2
  * Copyright (c) 2015-present, Facebook, Inc.
2
  * Copyright (c) 2015-present, Facebook, Inc.
3
- * All rights reserved.
4
  *
3
  *
5
- * This source code is licensed under the BSD-style license found in the
6
- * LICENSE file in the root directory of this source tree. An additional grant
7
- * of patent rights can be found in the PATENTS file in the same directory.
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
8
  */
6
  */
9
 
7
 
10
 #import <UIKit/UIKit.h>
8
 #import <UIKit/UIKit.h>
16
 #define TIMEOUT_SECONDS 600
14
 #define TIMEOUT_SECONDS 600
17
 #define TEXT_TO_LOOK_FOR @"Welcome to React Native!"
15
 #define TEXT_TO_LOOK_FOR @"Welcome to React Native!"
18
 
16
 
19
-@interface ExampleTests : XCTestCase
17
+@interface example573Tests : XCTestCase
20
 
18
 
21
 @end
19
 @end
22
 
20
 
23
-@implementation ExampleTests
21
+@implementation example573Tests
24
 
22
 
25
 - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test
23
 - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test
26
 {
24
 {

+ 26
- 22
Example/package.json View File

1
 {
1
 {
2
-	"name": "rnthumbnail-example",
3
-	"version": "0.0.1",
4
-	"private": true,
5
-	"scripts": {
6
-		"start": "node node_modules/react-native/local-cli/cli.js start",
7
-		"test": "jest"
8
-	},
9
-	"dependencies": {
10
-		"react": "16.0.0-beta.5",
11
-		"react-native": "0.49.3",
12
-		"react-native-image-picker": "^0.26.7",
13
-		"react-native-thumbnail": "^1.1.0"
14
-	},
15
-	"devDependencies": {
16
-		"babel-jest": "21.2.0",
17
-		"babel-preset-react-native": "4.0.0",
18
-		"jest": "21.2.1",
19
-		"react-test-renderer": "16.0.0-beta.5"
20
-	},
21
-	"jest": {
22
-		"preset": "react-native"
23
-	}
2
+  "name": "example573",
3
+  "version": "0.0.1",
4
+  "private": true,
5
+  "scripts": {
6
+    "start": "node node_modules/react-native/local-cli/cli.js start",
7
+    "test": "jest",
8
+    "ios": "react-native run-ios",
9
+    "android": "react-native run-android",
10
+    "rn-fix-fishhook": "sed -i '' 's#<fishhook/fishhook.h>#\"fishhook.h\"#g' ./node_modules/react-native/Libraries/WebSocket/RCTReconnectingWebSocket.m",
11
+    "rn-fix-glog": "cd node_modules/react-native/third-party/glog-0.3.4 && ../../scripts/ios-configure-glog.sh && cd ../../../../"
12
+  },
13
+  "dependencies": {
14
+    "react": "16.6.0-alpha.8af6728",
15
+    "react-native": "0.57.3",
16
+    "react-native-image-picker": "^0.27.1",
17
+    "react-native-thumbnail": "^1.1.2"
18
+  },
19
+  "devDependencies": {
20
+    "babel-jest": "23.6.0",
21
+    "jest": "23.6.0",
22
+    "metro-react-native-babel-preset": "0.48.1",
23
+    "react-test-renderer": "16.6.0-alpha.8af6728"
24
+  },
25
+  "jest": {
26
+    "preset": "react-native"
27
+  }
24
 }
28
 }

+ 2741
- 1859
Example/yarn.lock
File diff suppressed because it is too large
View File


+ 1
- 1
RNThumbnail.podspec View File

16
   s.platform       = :ios, '7.0'
16
   s.platform       = :ios, '7.0'
17
 
17
 
18
   s.preserve_paths = 'README.md', 'package.json', 'index.js'
18
   s.preserve_paths = 'README.md', 'package.json', 'index.js'
19
-  s.source_files   = 'iOS/*.{h,m}'
19
+  s.source_files   = 'ios/**/*.{h,m}'
20
 
20
 
21
   s.dependency 'React'
21
   s.dependency 'React'
22
 end
22
 end

+ 6
- 4
android/build.gradle View File

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

BIN
android/gradle/wrapper/gradle-wrapper.jar View File


+ 6
- 0
android/gradle/wrapper/gradle-wrapper.properties View File

1
+#Sun Oct 14 16:44:27 ICT 2018
2
+distributionBase=GRADLE_USER_HOME
3
+distributionPath=wrapper/dists
4
+zipStoreBase=GRADLE_USER_HOME
5
+zipStorePath=wrapper/dists
6
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip

+ 160
- 0
android/gradlew View File

1
+#!/usr/bin/env bash
2
+
3
+##############################################################################
4
+##
5
+##  Gradle start up script for UN*X
6
+##
7
+##############################################################################
8
+
9
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10
+DEFAULT_JVM_OPTS=""
11
+
12
+APP_NAME="Gradle"
13
+APP_BASE_NAME=`basename "$0"`
14
+
15
+# Use the maximum available, or set MAX_FD != -1 to use that value.
16
+MAX_FD="maximum"
17
+
18
+warn ( ) {
19
+    echo "$*"
20
+}
21
+
22
+die ( ) {
23
+    echo
24
+    echo "$*"
25
+    echo
26
+    exit 1
27
+}
28
+
29
+# OS specific support (must be 'true' or 'false').
30
+cygwin=false
31
+msys=false
32
+darwin=false
33
+case "`uname`" in
34
+  CYGWIN* )
35
+    cygwin=true
36
+    ;;
37
+  Darwin* )
38
+    darwin=true
39
+    ;;
40
+  MINGW* )
41
+    msys=true
42
+    ;;
43
+esac
44
+
45
+# Attempt to set APP_HOME
46
+# Resolve links: $0 may be a link
47
+PRG="$0"
48
+# Need this for relative symlinks.
49
+while [ -h "$PRG" ] ; do
50
+    ls=`ls -ld "$PRG"`
51
+    link=`expr "$ls" : '.*-> \(.*\)$'`
52
+    if expr "$link" : '/.*' > /dev/null; then
53
+        PRG="$link"
54
+    else
55
+        PRG=`dirname "$PRG"`"/$link"
56
+    fi
57
+done
58
+SAVED="`pwd`"
59
+cd "`dirname \"$PRG\"`/" >/dev/null
60
+APP_HOME="`pwd -P`"
61
+cd "$SAVED" >/dev/null
62
+
63
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64
+
65
+# Determine the Java command to use to start the JVM.
66
+if [ -n "$JAVA_HOME" ] ; then
67
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68
+        # IBM's JDK on AIX uses strange locations for the executables
69
+        JAVACMD="$JAVA_HOME/jre/sh/java"
70
+    else
71
+        JAVACMD="$JAVA_HOME/bin/java"
72
+    fi
73
+    if [ ! -x "$JAVACMD" ] ; then
74
+        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75
+
76
+Please set the JAVA_HOME variable in your environment to match the
77
+location of your Java installation."
78
+    fi
79
+else
80
+    JAVACMD="java"
81
+    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82
+
83
+Please set the JAVA_HOME variable in your environment to match the
84
+location of your Java installation."
85
+fi
86
+
87
+# Increase the maximum file descriptors if we can.
88
+if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89
+    MAX_FD_LIMIT=`ulimit -H -n`
90
+    if [ $? -eq 0 ] ; then
91
+        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92
+            MAX_FD="$MAX_FD_LIMIT"
93
+        fi
94
+        ulimit -n $MAX_FD
95
+        if [ $? -ne 0 ] ; then
96
+            warn "Could not set maximum file descriptor limit: $MAX_FD"
97
+        fi
98
+    else
99
+        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100
+    fi
101
+fi
102
+
103
+# For Darwin, add options to specify how the application appears in the dock
104
+if $darwin; then
105
+    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106
+fi
107
+
108
+# For Cygwin, switch paths to Windows format before running java
109
+if $cygwin ; then
110
+    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111
+    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112
+    JAVACMD=`cygpath --unix "$JAVACMD"`
113
+
114
+    # We build the pattern for arguments to be converted via cygpath
115
+    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116
+    SEP=""
117
+    for dir in $ROOTDIRSRAW ; do
118
+        ROOTDIRS="$ROOTDIRS$SEP$dir"
119
+        SEP="|"
120
+    done
121
+    OURCYGPATTERN="(^($ROOTDIRS))"
122
+    # Add a user-defined pattern to the cygpath arguments
123
+    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124
+        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125
+    fi
126
+    # Now convert the arguments - kludge to limit ourselves to /bin/sh
127
+    i=0
128
+    for arg in "$@" ; do
129
+        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130
+        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
131
+
132
+        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
133
+            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134
+        else
135
+            eval `echo args$i`="\"$arg\""
136
+        fi
137
+        i=$((i+1))
138
+    done
139
+    case $i in
140
+        (0) set -- ;;
141
+        (1) set -- "$args0" ;;
142
+        (2) set -- "$args0" "$args1" ;;
143
+        (3) set -- "$args0" "$args1" "$args2" ;;
144
+        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145
+        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146
+        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147
+        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148
+        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149
+        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150
+    esac
151
+fi
152
+
153
+# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154
+function splitJvmOpts() {
155
+    JVM_OPTS=("$@")
156
+}
157
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159
+
160
+exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"

+ 90
- 0
android/gradlew.bat View File

1
+@if "%DEBUG%" == "" @echo off
2
+@rem ##########################################################################
3
+@rem
4
+@rem  Gradle startup script for Windows
5
+@rem
6
+@rem ##########################################################################
7
+
8
+@rem Set local scope for the variables with windows NT shell
9
+if "%OS%"=="Windows_NT" setlocal
10
+
11
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12
+set DEFAULT_JVM_OPTS=
13
+
14
+set DIRNAME=%~dp0
15
+if "%DIRNAME%" == "" set DIRNAME=.
16
+set APP_BASE_NAME=%~n0
17
+set APP_HOME=%DIRNAME%
18
+
19
+@rem Find java.exe
20
+if defined JAVA_HOME goto findJavaFromJavaHome
21
+
22
+set JAVA_EXE=java.exe
23
+%JAVA_EXE% -version >NUL 2>&1
24
+if "%ERRORLEVEL%" == "0" goto init
25
+
26
+echo.
27
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28
+echo.
29
+echo Please set the JAVA_HOME variable in your environment to match the
30
+echo location of your Java installation.
31
+
32
+goto fail
33
+
34
+:findJavaFromJavaHome
35
+set JAVA_HOME=%JAVA_HOME:"=%
36
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37
+
38
+if exist "%JAVA_EXE%" goto init
39
+
40
+echo.
41
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42
+echo.
43
+echo Please set the JAVA_HOME variable in your environment to match the
44
+echo location of your Java installation.
45
+
46
+goto fail
47
+
48
+:init
49
+@rem Get command-line arguments, handling Windowz variants
50
+
51
+if not "%OS%" == "Windows_NT" goto win9xME_args
52
+if "%@eval[2+2]" == "4" goto 4NT_args
53
+
54
+:win9xME_args
55
+@rem Slurp the command line arguments.
56
+set CMD_LINE_ARGS=
57
+set _SKIP=2
58
+
59
+:win9xME_args_slurp
60
+if "x%~1" == "x" goto execute
61
+
62
+set CMD_LINE_ARGS=%*
63
+goto execute
64
+
65
+:4NT_args
66
+@rem Get arguments from the 4NT Shell from JP Software
67
+set CMD_LINE_ARGS=%$
68
+
69
+:execute
70
+@rem Setup the command line
71
+
72
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73
+
74
+@rem Execute Gradle
75
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76
+
77
+:end
78
+@rem End local scope for the variables with windows NT shell
79
+if "%ERRORLEVEL%"=="0" goto mainEnd
80
+
81
+:fail
82
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83
+rem the _cmd.exe /c_ return code!
84
+if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85
+exit /b 1
86
+
87
+:mainEnd
88
+if "%OS%"=="Windows_NT" endlocal
89
+
90
+:omega

+ 0
- 25
ios/RNThumbnail.podspec View File

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.homepage     = "https://github.com/author/RNThumbnail"
14
-  s.platform     = :ios, "7.0"
15
-  s.source       = { :git => "https://github.com/author/RNThumbnail.git", :tag => "master" }
16
-  s.source_files  = "RNThumbnail/**/*.{h,m}"
17
-  s.requires_arc = true
18
-
19
-
20
-  s.dependency "React"
21
-  #s.dependency "others"
22
-
23
-end
24
-
25
-  

+ 2
- 5
package.json View File

1
 {
1
 {
2
   "name": "react-native-thumbnail",
2
   "name": "react-native-thumbnail",
3
-  "version": "1.1.1",
3
+  "version": "1.1.3",
4
   "description": "Get thumbnail from local media.",
4
   "description": "Get thumbnail from local media.",
5
   "main": "index.js",
5
   "main": "index.js",
6
   "scripts": {
6
   "scripts": {
14
     "url": "git+https://github.com/phuochau/react-native-thumbnail.git"
14
     "url": "git+https://github.com/phuochau/react-native-thumbnail.git"
15
   },
15
   },
16
   "author": "Hau Vo <hau.vophuoc@gmail.com>",
16
   "author": "Hau Vo <hau.vophuoc@gmail.com>",
17
-  "license": "MIT",
18
-  "peerDependencies": {
19
-    "react-native": "^0.47.0"
20
-  }
17
+  "license": "MIT"
21
 }
18
 }

+ 0
- 3
yarn.lock View File

2
 # yarn lockfile v1
2
 # yarn lockfile v1
3
 
3
 
4
 
4
 
5
-react-native-thumbnail@^1.1.0:
6
-  version "1.1.0"
7
-  resolved "https://registry.yarnpkg.com/react-native-thumbnail/-/react-native-thumbnail-1.1.0.tgz#d3fc34e642340541117ffdae887514450e4b4552"