reactnativecn/react-native-http-cache

RN 0.43 不支持

Opened this issue · 3 comments

无效使用: ios 报变量重复声明等错
node_modules/react-native-http-cache/ios/RCTHttpCache/RCTHttpCache.m:12:
../../react-native/React/Base/RCTBridge.h:66:1: error: duplicate interface definition for class 'RCTBridge'

android: 找不到符号

node_modules/react-native-http-cache/android/src/main/java/cn/reactnative/httpcache/HttpCacheModule.java:69: 错误: 找不到符号
FileCache cache1 = ImagePipelineFactory.getInstance().getMainDiskStorageCache();
^
符号: 方法 getMainDiskStorageCache()
位置: 类 ImagePipelineFactory
/node_modules/react-native-http-cache/android/src/main/java/cn/reactnative/httpcache/HttpCacheModule.java:80: 错误: 找不到符号
FileCache cache2 = ImagePipelineFactory.getInstance().getSmallImageDiskStorageCache();
^
符号: 方法 getSmallImageDiskStorageCache()
位置: 类 ImagePipelineFactory

"react": "16.0.0-alpha.6",
"react-native": "0.43.3",
"react-native-http-cache": "^0.2.0",

ios: /node_modules/react-native-http-cache/ios/RCTHttpCache/RCTHttpCache.m 下做如下更改
#import "RCTImageLoader.h" -> #import "React/RCTImageLoader.h"
#import "RCTBridge.h" -> #import "React/RCTBridge.h"

android: /node_modules/react-native-http-cache/android/src/main/java/cn/reactnative/httpcache/HttpCacheModule.java 下做如下更改
getMainDiskStorageCache 替换为-> getMainFileCache
getSmallImageDiskStorageCache 替换为-> getSmallImageFileCache
参考自:https://www.fresco-cn.org/javadoc/reference/com/facebook/imagepipeline/core/ImagePipelineFactory.html

ios 在模拟器上可用,android 真机可用,麻烦测试更新下

I also used it in 0.43 , but getCacheSize = 0 ?
I have used react-native-img-cache & react-native-storage
so i want to ask a question , how could I get cacheSize ?