diff --git a/CachedImageExample/android/app/build.gradle b/CachedImageExample/android/app/build.gradle
index 046ed6a..8b80c23 100644
--- a/CachedImageExample/android/app/build.gradle
+++ b/CachedImageExample/android/app/build.gradle
@@ -126,7 +126,7 @@ android {
}
dependencies {
- compile project(':react-native-fs')
+ compile project(':react-native-fetch-blob')
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:+" // From node_modules
diff --git a/CachedImageExample/android/app/src/main/AndroidManifest.xml b/CachedImageExample/android/app/src/main/AndroidManifest.xml
index acd1d79..6969dfc 100644
--- a/CachedImageExample/android/app/src/main/AndroidManifest.xml
+++ b/CachedImageExample/android/app/src/main/AndroidManifest.xml
@@ -1,31 +1,33 @@
+ package="com.cachedimageexample"
+ android:versionCode="1"
+ android:versionName="1.0">
-
+
+
+ android:minSdkVersion="16"
+ android:targetSdkVersion="22"/>
-
-
-
-
-
-
-
+ android:name=".MainApplication"
+ android:allowBackup="true"
+ android:label="@string/app_name"
+ android:icon="@mipmap/ic_launcher"
+ android:theme="@style/AppTheme">
+
+
+
+
+
+
+
+
diff --git a/CachedImageExample/android/app/src/main/java/com/cachedimageexample/MainApplication.java b/CachedImageExample/android/app/src/main/java/com/cachedimageexample/MainApplication.java
index 3761e0e..2be1265 100644
--- a/CachedImageExample/android/app/src/main/java/com/cachedimageexample/MainApplication.java
+++ b/CachedImageExample/android/app/src/main/java/com/cachedimageexample/MainApplication.java
@@ -1,10 +1,10 @@
package com.cachedimageexample;
-import android.app.Application;
import android.util.Log;
+import android.app.Application;
import com.facebook.react.ReactApplication;
-import com.rnfs.RNFSPackage;
+import com.RNFetchBlob.RNFetchBlobPackage;
import com.facebook.react.ReactInstanceManager;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
@@ -16,29 +16,29 @@
public class MainApplication extends Application implements ReactApplication {
- private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
+ private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
+ @Override
+ protected boolean getUseDeveloperSupport() {
+ return BuildConfig.DEBUG;
+ }
+
+ @Override
+ protected List getPackages() {
+ return Arrays.asList(
+ new MainReactPackage(),
+ new RNFetchBlobPackage()
+ );
+ }
+ };
+
@Override
- protected boolean getUseDeveloperSupport() {
- return BuildConfig.DEBUG;
+ public ReactNativeHost getReactNativeHost() {
+ return mReactNativeHost;
}
@Override
- protected List getPackages() {
- return Arrays.asList(
- new MainReactPackage(),
- new RNFSPackage()
- );
+ public void onCreate() {
+ super.onCreate();
+ SoLoader.init(this, /* native exopackage */ false);
}
- };
-
- @Override
- public ReactNativeHost getReactNativeHost() {
- return mReactNativeHost;
- }
-
- @Override
- public void onCreate() {
- super.onCreate();
- SoLoader.init(this, /* native exopackage */ false);
- }
}
diff --git a/CachedImageExample/android/settings.gradle b/CachedImageExample/android/settings.gradle
index 1017109..693eaa1 100644
--- a/CachedImageExample/android/settings.gradle
+++ b/CachedImageExample/android/settings.gradle
@@ -1,5 +1,5 @@
rootProject.name = 'CachedImageExample'
-include ':react-native-fs'
-project(':react-native-fs').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fs/android')
+include ':react-native-fetch-blob'
+project(':react-native-fetch-blob').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fetch-blob/android')
include ':app'
diff --git a/CachedImageExample/ios/CachedImageExample.xcodeproj/project.pbxproj b/CachedImageExample/ios/CachedImageExample.xcodeproj/project.pbxproj
index 882e8c4..3a98ae2 100644
--- a/CachedImageExample/ios/CachedImageExample.xcodeproj/project.pbxproj
+++ b/CachedImageExample/ios/CachedImageExample.xcodeproj/project.pbxproj
@@ -22,9 +22,9 @@
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
+ 5A301533C1D248A684417411 /* libRNFetchBlob.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0E55B5701ADA444EBBC8EA5A /* libRNFetchBlob.a */; };
5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */; };
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
- B1270DC51DF3596000F5EFCB /* libRNFS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B1270DC41DF352E700F5EFCB /* libRNFS.a */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -168,13 +168,6 @@
remoteGlobalIDString = 2D2A28131D9B038B00D4039D;
remoteInfo = "React-tvOS";
};
- B1270DC31DF352E700F5EFCB /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = BF9C5953EFE448558A3F8F8A /* RNFS.xcodeproj */;
- proxyType = 2;
- remoteGlobalIDString = F12AFB9B1ADAF8F800E0535D;
- remoteInfo = RNFS;
- };
B13BE7821E3E2B0A00C046E0 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
@@ -217,6 +210,13 @@
remoteGlobalIDString = 3D3CD9181DE5FBD800167DC4;
remoteInfo = "jschelpers-tvOS";
};
+ B19920D01E91305700803196 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 7308BE64683240A988168F6A /* RNFetchBlob.xcodeproj */;
+ proxyType = 2;
+ remoteGlobalIDString = A15C300E1CD25C330074CB35;
+ remoteInfo = RNFetchBlob;
+ };
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
@@ -229,6 +229,7 @@
00E356EE1AD99517003FC87E /* CachedImageExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CachedImageExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
00E356F21AD99517003FC87E /* CachedImageExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CachedImageExampleTests.m; sourceTree = ""; };
+ 0E55B5701ADA444EBBC8EA5A /* libRNFetchBlob.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNFetchBlob.a; sourceTree = ""; };
139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = ""; };
139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = ""; };
13B07F961A680F5B00A75B9A /* CachedImageExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CachedImageExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -240,9 +241,9 @@
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = CachedImageExample/main.m; sourceTree = ""; };
146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = ""; };
5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = ""; };
+ 7308BE64683240A988168F6A /* RNFetchBlob.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNFetchBlob.xcodeproj; path = "../node_modules/react-native-fetch-blob/ios/RNFetchBlob.xcodeproj"; sourceTree = ""; };
78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = ""; };
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; };
- BF9C5953EFE448558A3F8F8A /* RNFS.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNFS.xcodeproj; path = "../node_modules/react-native-fs/RNFS.xcodeproj"; sourceTree = ""; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -258,7 +259,6 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- B1270DC51DF3596000F5EFCB /* libRNFS.a in Frameworks */,
5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */,
146834051AC3E58100842450 /* libReact.a in Frameworks */,
00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */,
@@ -270,6 +270,7 @@
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */,
00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */,
139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */,
+ 5A301533C1D248A684417411 /* libRNFetchBlob.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -414,7 +415,7 @@
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */,
00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */,
139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */,
- BF9C5953EFE448558A3F8F8A /* RNFS.xcodeproj */,
+ 7308BE64683240A988168F6A /* RNFetchBlob.xcodeproj */,
);
name = Libraries;
sourceTree = "";
@@ -449,10 +450,10 @@
name = Products;
sourceTree = "";
};
- B1270DAD1DF352E700F5EFCB /* Products */ = {
+ B19920B41E91305700803196 /* Products */ = {
isa = PBXGroup;
children = (
- B1270DC41DF352E700F5EFCB /* libRNFS.a */,
+ B19920D11E91305700803196 /* libRNFetchBlob.a */,
);
name = Products;
sourceTree = "";
@@ -502,7 +503,7 @@
83CBB9F71A601CBA00E9B192 /* Project object */ = {
isa = PBXProject;
attributes = {
- LastUpgradeCheck = 0820;
+ LastUpgradeCheck = 820;
ORGANIZATIONNAME = Facebook;
TargetAttributes = {
00E356ED1AD99517003FC87E = {
@@ -568,8 +569,8 @@
ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */;
},
{
- ProductGroup = B1270DAD1DF352E700F5EFCB /* Products */;
- ProjectRef = BF9C5953EFE448558A3F8F8A /* RNFS.xcodeproj */;
+ ProductGroup = B19920B41E91305700803196 /* Products */;
+ ProjectRef = 7308BE64683240A988168F6A /* RNFetchBlob.xcodeproj */;
},
);
projectRoot = "";
@@ -714,13 +715,6 @@
remoteRef = B1270DA01DF34CB700F5EFCB /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
- B1270DC41DF352E700F5EFCB /* libRNFS.a */ = {
- isa = PBXReferenceProxy;
- fileType = archive.ar;
- path = libRNFS.a;
- remoteRef = B1270DC31DF352E700F5EFCB /* PBXContainerItemProxy */;
- sourceTree = BUILT_PRODUCTS_DIR;
- };
B13BE7831E3E2B0A00C046E0 /* libyoga.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
@@ -763,6 +757,13 @@
remoteRef = B13BE78C1E3E2B0A00C046E0 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
+ B19920D11E91305700803196 /* libRNFetchBlob.a */ = {
+ isa = PBXReferenceProxy;
+ fileType = archive.ar;
+ path = libRNFetchBlob.a;
+ remoteRef = B19920D01E91305700803196 /* PBXContainerItemProxy */;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
/* End PBXReferenceProxy section */
/* Begin PBXResourcesBuildPhase section */
@@ -856,6 +857,7 @@
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
+ "\"$(SRCROOT)/$(TARGET_NAME)\"",
);
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -874,6 +876,7 @@
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
+ "\"$(SRCROOT)/$(TARGET_NAME)\"",
);
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -962,7 +965,7 @@
"$(inherited)",
"$(SRCROOT)/../node_modules/react-native/React/**",
"$(SRCROOT)/../node_modules/react-native/ReactCommon/**",
- "$(SRCROOT)/../node_modules/react-native-fs/**",
+ "$(SRCROOT)/../node_modules/react-native-fetch-blob/ios/**",
);
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = YES;
@@ -1007,6 +1010,7 @@
"$(SRCROOT)/../node_modules/react-native/React/**",
"$(SRCROOT)/../node_modules/react-native/ReactCommon/**",
"$(SRCROOT)/../node_modules/react-native-fs/**",
+ "$(SRCROOT)/../node_modules/react-native-fetch-blob/ios/**",
);
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
diff --git a/CachedImageExample/package.json b/CachedImageExample/package.json
index 732a07e..d028497 100644
--- a/CachedImageExample/package.json
+++ b/CachedImageExample/package.json
@@ -5,12 +5,12 @@
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest",
- "dev": "rm -rf ./node_modules/react-native-cached-image; sane 'rsync -av --include='*.js' --include='package.json' --exclude='*' ../ ./node_modules/react-native-cached-image' ../ --glob '*.js' --glob 'package.json'"
+ "dev": "yarn && rm -rf ./node_modules/react-native-cached-image; sane 'rsync -av --include='*.js' --include='package.json' --exclude='*' ../ ./node_modules/react-native-cached-image' ../ --glob '*.js' --glob 'package.json'"
},
"dependencies": {
"react": "15.4.2",
"react-native": "0.40.0",
- "react-native-cached-image": "1.2.0"
+ "react-native-cached-image": "*"
},
"devDependencies": {
"babel-jest": "18.0.0",
@@ -22,4 +22,4 @@
"jest": {
"preset": "react-native"
}
-}
\ No newline at end of file
+}
diff --git a/CachedImageExample/yarn.lock b/CachedImageExample/yarn.lock
index 0f9fcd4..601960d 100644
--- a/CachedImageExample/yarn.lock
+++ b/CachedImageExample/yarn.lock
@@ -780,7 +780,7 @@ balanced-match@^0.4.1:
version "0.4.2"
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838"
-base-64@^0.1.0:
+base-64@0.1.0, base-64@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/base-64/-/base-64-0.1.0.tgz#780a99c84e7d600260361511c4877613bf24f6bb"
@@ -1575,7 +1575,7 @@ glob@^5.0.15:
once "^1.3.0"
path-is-absolute "^1.0.0"
-glob@^7.0.3, glob@^7.0.5:
+glob@^7.0.3, glob@^7.0.5, glob@^7.0.6:
version "7.1.1"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8"
dependencies:
@@ -2471,7 +2471,7 @@ lodash.templatesettings@^3.0.0:
lodash._reinterpolate "^3.0.0"
lodash.escape "^3.0.0"
-lodash@4.17.4:
+lodash@4.17.4, lodash@^4.14.0, lodash@^4.2.0, lodash@^4.3.0, lodash@^4.6.1:
version "4.17.4"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae"
@@ -2479,7 +2479,7 @@ lodash@^3.5.0:
version "3.10.1"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6"
-lodash@^4.14.0, lodash@^4.16.6, lodash@^4.2.0, lodash@^4.3.0, lodash@^4.6.1:
+lodash@^4.16.6:
version "4.17.2"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.2.tgz#34a3055babe04ce42467b607d700072c7ff6bf42"
@@ -3014,6 +3014,21 @@ react-native-cached-image@1.2.0:
react-native-fs "2.1.0-rc.1"
url-parse "1.1.7"
+"react-native-cached-image@file:../":
+ version "1.2.6"
+ dependencies:
+ crypto-js "3.1.9-1"
+ lodash "4.17.4"
+ react-native-fetch-blob "0.10.4"
+ url-parse "1.1.7"
+
+react-native-fetch-blob@0.10.4:
+ version "0.10.4"
+ resolved "https://registry.yarnpkg.com/react-native-fetch-blob/-/react-native-fetch-blob-0.10.4.tgz#7e2d2096ea79dbc8da96e1915cf862f6afe2d0fd"
+ dependencies:
+ base-64 "0.1.0"
+ glob "^7.0.6"
+
react-native-fs@2.1.0-rc.1:
version v2.1.0-rc.1
resolved "https://registry.yarnpkg.com/react-native-fs/-/react-native-fs-2.1.0-rc.1.tgz#f6078891005478648738db396e822ec0aefc4b95"