瀏覽代碼

rn: use new AsyncStorage package

It was extracted from the RN core to a community maintained package.
j8
Saúl Ibarra Corretgé 6 年之前
父節點
當前提交
b45a5da6e2

+ 2
- 1
android/sdk/build.gradle 查看文件

@@ -63,6 +63,7 @@ dependencies {
63 63
     implementation project(':react-native-vector-icons')
64 64
     implementation project(':react-native-webrtc')
65 65
     implementation project(':react-native-webview')
66
+    implementation project(':@react-native-community_async-storage')
66 67
 
67 68
     testImplementation 'junit:junit:4.12'
68 69
 }
@@ -206,7 +207,7 @@ publishing {
206 207
                     def groupId = it.moduleGroup
207 208
                     def artifactId = it.moduleName
208 209
 
209
-                    if (artifactId.startsWith('react-native-')
210
+                    if ((artifactId.startsWith('react-native-') || artifactId.startsWith('@react-native-community'))
210 211
                             && groupId.equals('jitsi-meet')) {
211 212
                         groupId = rootProject.ext.moduleGroupId
212 213
                     }

+ 1
- 0
android/sdk/src/main/java/org/jitsi/meet/sdk/ReactInstanceManagerHolder.java 查看文件

@@ -147,6 +147,7 @@ class ReactInstanceManagerHolder {
147 147
                 new com.oblador.vectoricons.VectorIconsPackage(),
148 148
                 new com.ocetnik.timer.BackgroundTimerPackage(),
149 149
                 new com.oney.WebRTCModule.WebRTCModulePackage(),
150
+                new com.reactnativecommunity.asyncstorage.AsyncStoragePackage(),
150 151
                 new com.reactnativecommunity.webview.RNCWebViewPackage(),
151 152
                 new com.rnimmersive.RNImmersivePackage(),
152 153
                 new com.zmxv.RNSound.RNSoundPackage(),

+ 2
- 0
android/settings.gradle 查看文件

@@ -23,3 +23,5 @@ include ':react-native-webrtc'
23 23
 project(':react-native-webrtc').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-webrtc/android')
24 24
 include ':react-native-webview'
25 25
 project(':react-native-webview').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-webview/android')
26
+include ':@react-native-community_async-storage'
27
+project(':@react-native-community_async-storage').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/async-storage/android')

+ 22
- 23
ios/Podfile 查看文件

@@ -14,6 +14,9 @@ end
14 14
 target 'JitsiMeet' do
15 15
   project 'sdk/sdk.xcodeproj'
16 16
 
17
+  # React Native and its dependencies
18
+  #
19
+
17 20
   pod 'React', :path => '../node_modules/react-native', :subspecs => [
18 21
     'Core',
19 22
     'CxxBridge',
@@ -27,35 +30,31 @@ target 'JitsiMeet' do
27 30
     'RCTWebSocket',
28 31
   ]
29 32
   pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
33
+  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
34
+  pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
35
+  pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
30 36
 
31
-  pod 'DoubleConversion',
32
-    :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
33
-  pod 'glog',
34
-    :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
35
-  pod 'Folly',
36
-    :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
37
-
38
-  pod 'Amplitude-iOS', '~> 4.0.4'
39
-  pod 'ObjectiveDropboxOfficial', '~> 3.9.4'
37
+  # React Native plugins
38
+  #
40 39
 
41
-  pod 'react-native-background-timer',
42
-    :path => '../node_modules/react-native-background-timer'
43
-  pod 'react-native-calendar-events',
44
-    :path => '../node_modules/react-native-calendar-events'
45
-  pod 'react-native-fast-image',
46
-    :path => '../node_modules/react-native-fast-image'
47
-  pod 'react-native-keep-awake',
48
-    :path => '../node_modules/react-native-keep-awake'
49
-  pod 'react-native-webview',
50
-    :path => '../node_modules/react-native-webview'
51
-  pod 'BVLinearGradient',
52
-    :path => '../node_modules/react-native-linear-gradient'
40
+  pod 'react-native-background-timer', :path => '../node_modules/react-native-background-timer'
41
+  pod 'react-native-calendar-events', :path => '../node_modules/react-native-calendar-events'
42
+  pod 'react-native-fast-image', :path => '../node_modules/react-native-fast-image'
43
+  pod 'react-native-keep-awake', :path => '../node_modules/react-native-keep-awake'
44
+  pod 'react-native-webview', :path => '../node_modules/react-native-webview'
53 45
   pod 'react-native-webrtc', :path => '../node_modules/react-native-webrtc'
54
-  pod 'RNGoogleSignin',
55
-    :path => '../node_modules/react-native-google-signin'
46
+  pod 'BVLinearGradient', :path => '../node_modules/react-native-linear-gradient'
47
+  pod 'RNCAsyncStorage', :path => '../node_modules/@react-native-community/async-storage'
48
+  pod 'RNGoogleSignin', :path => '../node_modules/react-native-google-signin'
56 49
   pod 'RNSound', :path => '../node_modules/react-native-sound'
57 50
   pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
58 51
   pod 'RNWatch', :path => '../node_modules/react-native-watch-connectivity'
52
+
53
+  # Native pod dependencies
54
+  #
55
+
56
+  pod 'Amplitude-iOS', '~> 4.0.4'
57
+  pod 'ObjectiveDropboxOfficial', '~> 3.9.4'
59 58
 end
60 59
 
61 60
 post_install do |installer|

+ 7
- 1
ios/Podfile.lock 查看文件

@@ -148,6 +148,8 @@ PODS:
148 148
     - React/Core
149 149
     - React/fishhook
150 150
     - React/RCTBlob
151
+  - RNCAsyncStorage (1.3.4):
152
+    - React
151 153
   - RNGoogleSignin (1.0.2):
152 154
     - GoogleSignIn
153 155
     - React
@@ -193,6 +195,7 @@ DEPENDENCIES:
193 195
   - React/RCTNetwork (from `../node_modules/react-native`)
194 196
   - React/RCTText (from `../node_modules/react-native`)
195 197
   - React/RCTWebSocket (from `../node_modules/react-native`)
198
+  - "RNCAsyncStorage (from `../node_modules/@react-native-community/async-storage`)"
196 199
   - RNGoogleSignin (from `../node_modules/react-native-google-signin`)
197 200
   - RNSound (from `../node_modules/react-native-sound`)
198 201
   - RNVectorIcons (from `../node_modules/react-native-vector-icons`)
@@ -244,6 +247,8 @@ EXTERNAL SOURCES:
244 247
     :path: "../node_modules/react-native-webrtc"
245 248
   react-native-webview:
246 249
     :path: "../node_modules/react-native-webview"
250
+  RNCAsyncStorage:
251
+    :path: "../node_modules/@react-native-community/async-storage"
247 252
   RNGoogleSignin:
248 253
     :path: "../node_modules/react-native-google-signin"
249 254
   RNSound:
@@ -285,6 +290,7 @@ SPEC CHECKSUMS:
285 290
   react-native-keep-awake: eba3137546b10003361b37c761f6c429b59814ae
286 291
   react-native-webrtc: 90a847d19deb2d7323fef8cc89ca12b8995fbc90
287 292
   react-native-webview: a95842e3f351a6d2c8bc8bcc9eab689c7e7e5ad4
293
+  RNCAsyncStorage: 8e31405a9f12fbf42c2bb330e4560bfd79c18323
288 294
   RNGoogleSignin: 361174d9a3090d295b06257162b560d8efc8a6ed
289 295
   RNSound: e157320f503bdd4f4ee6d8542e948d54f90c3c3a
290 296
   RNVectorIcons: d819334932bcda3332deb3d2c8ea4d069e0b98f9
@@ -292,6 +298,6 @@ SPEC CHECKSUMS:
292 298
   SDWebImage: 3f3f0c02f09798048c47a5ed0a13f17b063572d8
293 299
   yoga: 2e571f113e8cbeb0eb752aeebc86c1bfe7a8200c
294 300
 
295
-PODFILE CHECKSUM: 531b5a1ff1f50f5c56208c3f53bae152a71e213e
301
+PODFILE CHECKSUM: b55338cc43312051ed83f8d9c6aadbd8c9402e6a
296 302
 
297 303
 COCOAPODS: 1.6.1

+ 5
- 0
package-lock.json 查看文件

@@ -2448,6 +2448,11 @@
2448 2448
         "isomorphic-fetch": "^2.2.1"
2449 2449
       }
2450 2450
     },
2451
+    "@react-native-community/async-storage": {
2452
+      "version": "1.3.4",
2453
+      "resolved": "https://registry.npmjs.org/@react-native-community/async-storage/-/async-storage-1.3.4.tgz",
2454
+      "integrity": "sha512-fJmzL27x0BEjhmMXPnDPnUNCZK7bph+NBVCfAz9fzHzAamaiOkdUwuL3PvE4Oj4Kw4knP8ocw5VRDGorAidZ2g=="
2455
+    },
2451 2456
     "@react-native-community/cli": {
2452 2457
       "version": "1.9.2",
2453 2458
       "resolved": "https://registry.npmjs.org/@react-native-community/cli/-/cli-1.9.2.tgz",

+ 1
- 0
package.json 查看文件

@@ -34,6 +34,7 @@
34 34
     "@atlaskit/toggle": "5.0.14",
35 35
     "@atlaskit/tooltip": "12.1.13",
36 36
     "@microsoft/microsoft-graph-client": "1.1.0",
37
+    "@react-native-community/async-storage": "1.3.4",
37 38
     "@webcomponents/url": "0.7.1",
38 39
     "amplitude-js": "4.5.2",
39 40
     "bc-css-flags": "3.0.0",

+ 1
- 1
react/features/base/storage/native/Storage.js 查看文件

@@ -1,4 +1,4 @@
1
-import { AsyncStorage } from 'react-native';
1
+import AsyncStorage from '@react-native-community/async-storage';
2 2
 
3 3
 /**
4 4
  * A Web Sorage API implementation used for polyfilling

Loading…
取消
儲存