Browse Source

upgrade sampleDemo

matrixbirds 5 years ago
parent
commit
fadc43d74e

+ 7
- 5
package.json View File

@@ -34,17 +34,16 @@
34 34
   },
35 35
   "homepage": "https://github.com/syanbo/react-native-agora#readme",
36 36
   "peerDependencies": {
37
-    "react": "16.3.0",
38
-    "react-native": "0.57.8",
39
-    "tslib": "latest"
37
+    "react": ">=16.7.0",
38
+    "react-native": ">=0.58.3"
40 39
   },
41 40
   "devDependencies": {
42
-    "react": "^16.7.0",
43
-    "react-native": "^0.58.3",
44 41
     "@types/jest": "^23.3.13",
45 42
     "@types/react": "^16.7.20",
46 43
     "@types/react-native": "^0.57.31",
47 44
     "@types/react-test-renderer": "^16.0.3",
45
+    "react": "16.7.0",
46
+    "react-native": "0.58.3",
48 47
     "react-native-typescript-transformer": "^1.2.11",
49 48
     "ts-jest": "^23.10.5",
50 49
     "tslint": "^5.12.1",
@@ -70,5 +69,8 @@
70 69
       "<rootDir>/node_modules/"
71 70
     ],
72 71
     "cacheDirectory": ".jest/cache"
72
+  },
73
+  "dependencies": {
74
+    "tslib": "^1.9.3"
73 75
   }
74 76
 }

+ 0
- 1
samples/simpleDemo/android/app/build.gradle View File

@@ -137,7 +137,6 @@ android {
137 137
 }
138 138
 
139 139
 dependencies {
140
-    compile project(':react-native-agora')
141 140
     implementation fileTree(dir: "libs", include: ["*.jar"])
142 141
     implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
143 142
     implementation "com.facebook.react:react-native:+"  // From node_modules

+ 1
- 1
samples/simpleDemo/android/app/src/main/AndroidManifest.xml View File

@@ -8,7 +8,7 @@
8 8
       android:name=".MainApplication"
9 9
       android:label="@string/app_name"
10 10
       android:icon="@mipmap/ic_launcher"
11
-      android:allowBackup="true"
11
+      android:allowBackup="false"
12 12
       android:theme="@style/AppTheme">
13 13
       <activity
14 14
         android:name=".MainActivity"

+ 1
- 3
samples/simpleDemo/android/app/src/main/java/com/simpledemo/MainApplication.java View File

@@ -3,7 +3,6 @@ package com.simpledemo;
3 3
 import android.app.Application;
4 4
 
5 5
 import com.facebook.react.ReactApplication;
6
-import com.syan.agora.AgoraPackage;
7 6
 import com.facebook.react.ReactNativeHost;
8 7
 import com.facebook.react.ReactPackage;
9 8
 import com.facebook.react.shell.MainReactPackage;
@@ -23,8 +22,7 @@ public class MainApplication extends Application implements ReactApplication {
23 22
     @Override
24 23
     protected List<ReactPackage> getPackages() {
25 24
       return Arrays.<ReactPackage>asList(
26
-          new MainReactPackage(),
27
-            new AgoraPackage()
25
+          new MainReactPackage()
28 26
       );
29 27
     }
30 28
 

+ 0
- 11
samples/simpleDemo/android/build.gradle View File

@@ -37,14 +37,3 @@ task wrapper(type: Wrapper) {
37 37
     gradleVersion = '4.4'
38 38
     distributionUrl = distributionUrl.replace("bin", "all")
39 39
 }
40
-
41
-subprojects {
42
-    afterEvaluate {project ->
43
-        if (project.hasProperty("android")) {
44
-            android {
45
-                compileSdkVersion 27
46
-                buildToolsVersion "27.0.3"
47
-            }
48
-        }
49
-    }
50
-}

+ 0
- 2
samples/simpleDemo/android/settings.gradle View File

@@ -1,5 +1,3 @@
1 1
 rootProject.name = 'simpleDemo'
2
-include ':react-native-agora'
3
-project(':react-native-agora').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-agora/android')
4 2
 
5 3
 include ':app'

+ 1
- 0
samples/simpleDemo/ios/Podfile View File

@@ -15,6 +15,7 @@ target 'simpleDemo' do
15 15
   %w(DoubleConversion Folly glog).each do |lib_name|
16 16
     pod lib_name, podspec: "#{react_native_path}/third-party-podspecs/#{lib_name}.podspec"
17 17
   end
18
+  #pod 'AgoraRtcEngine_iOS', '2.3.3'
18 19
   target 'simpleDemoTests' do
19 20
     inherit! :search_paths
20 21
     # Pods for testing

+ 2
- 2
samples/simpleDemo/ios/Podfile.lock View File

@@ -55,9 +55,9 @@ SPEC CHECKSUMS:
55 55
   Folly: c89ac2d5c6ab169cd7397ef27485c44f35f742c7
56 56
   glog: e8acf0ebbf99759d3ff18c86c292a5898282dcde
57 57
   React: 1fe0eb13d90b625d94c3b117c274dcfd2e760e11
58
-  react-native-agora: 9a1e39cad840c86ad542fc3834824f9e031ae376
58
+  react-native-agora: ad43868aad1298fa32f167d9a00887e2c88af54b
59 59
   yoga: b1ce48b6cf950b98deae82838f5173ea7cf89e85
60 60
 
61
-PODFILE CHECKSUM: d5a5e2217f8f5a968a621c228e072b287bf5380b
61
+PODFILE CHECKSUM: a165c0bfbdd660ff2132e775c48c7a2e58dd3cf7
62 62
 
63 63
 COCOAPODS: 1.5.3

+ 1
- 1
samples/simpleDemo/ios/simpleDemo.xcodeproj/xcshareddata/xcschemes/simpleDemo-tvOS.xcscheme View File

@@ -1,6 +1,6 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2 2
 <Scheme
3
-   LastUpgradeVersion = "1010"
3
+   LastUpgradeVersion = "0940"
4 4
    version = "1.3">
5 5
    <BuildAction
6 6
       parallelizeBuildables = "NO"

+ 1
- 1
samples/simpleDemo/ios/simpleDemo.xcodeproj/xcshareddata/xcschemes/simpleDemo.xcscheme View File

@@ -1,6 +1,6 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2 2
 <Scheme
3
-   LastUpgradeVersion = "1010"
3
+   LastUpgradeVersion = "0940"
4 4
    version = "1.3">
5 5
    <BuildAction
6 6
       parallelizeBuildables = "NO"

+ 0
- 15
samples/simpleDemo/ios/simpleDemo/Images.xcassets/AppIcon.appiconset/Contents.json View File

@@ -1,15 +1,5 @@
1 1
 {
2 2
   "images" : [
3
-    {
4
-      "idiom" : "iphone",
5
-      "size" : "20x20",
6
-      "scale" : "2x"
7
-    },
8
-    {
9
-      "idiom" : "iphone",
10
-      "size" : "20x20",
11
-      "scale" : "3x"
12
-    },
13 3
     {
14 4
       "idiom" : "iphone",
15 5
       "size" : "29x29",
@@ -39,11 +29,6 @@
39 29
       "idiom" : "iphone",
40 30
       "size" : "60x60",
41 31
       "scale" : "3x"
42
-    },
43
-    {
44
-      "idiom" : "ios-marketing",
45
-      "size" : "1024x1024",
46
-      "scale" : "1x"
47 32
     }
48 33
   ],
49 34
   "info" : {

+ 16
- 21
samples/simpleDemo/ios/simpleDemo/Info.plist View File

@@ -24,29 +24,8 @@
24 24
 	<string>1</string>
25 25
 	<key>LSRequiresIPhoneOS</key>
26 26
 	<true/>
27
-	<key>NSAppTransportSecurity</key>
28
-	<dict>
29
-		<key>NSAllowsArbitraryLoads</key>
30
-		<true/>
31
-		<key>NSExceptionDomains</key>
32
-		<dict>
33
-			<key>localhost</key>
34
-			<dict>
35
-				<key>NSExceptionAllowsInsecureHTTPLoads</key>
36
-				<true/>
37
-			</dict>
38
-		</dict>
39
-	</dict>
40
-	<key>NSCameraUsageDescription</key>
41
-	<string>use camera for agora video call</string>
42 27
 	<key>NSLocationWhenInUseUsageDescription</key>
43 28
 	<string></string>
44
-	<key>NSMicrophoneUsageDescription</key>
45
-	<string>use microphone for agora video call</string>
46
-	<key>UIBackgroundModes</key>
47
-	<array>
48
-		<string>audio</string>
49
-	</array>
50 29
 	<key>UILaunchStoryboardName</key>
51 30
 	<string>LaunchScreen</string>
52 31
 	<key>UIRequiredDeviceCapabilities</key>
@@ -61,5 +40,21 @@
61 40
 	</array>
62 41
 	<key>UIViewControllerBasedStatusBarAppearance</key>
63 42
 	<false/>
43
+	<key>NSLocationWhenInUseUsageDescription</key>
44
+	<string></string>
45
+	<key>NSAppTransportSecurity</key>
46
+	<!--See http://ste.vn/2015/06/10/configuring-app-transport-security-ios-9-osx-10-11/ -->
47
+	<dict>
48
+    <key>NSAllowsArbitraryLoads</key>
49
+    <true/>
50
+		<key>NSExceptionDomains</key>
51
+		<dict>
52
+			<key>localhost</key>
53
+			<dict>
54
+				<key>NSExceptionAllowsInsecureHTTPLoads</key>
55
+				<true/>
56
+			</dict>
57
+		</dict>
58
+	</dict>
64 59
 </dict>
65 60
 </plist>

+ 10
- 3
samples/simpleDemo/yarn.lock View File

@@ -694,9 +694,9 @@ acorn@^6.0.1:
694 694
   integrity sha1-zXUYFnDVuZvbGxyZOUHTojmrH1Y=
695 695
 
696 696
 ajv@^6.5.5:
697
-  version "6.7.0"
698
-  resolved "http://registry.npm.taobao.org/ajv/download/ajv-6.7.0.tgz#e3ce7bb372d6577bb1839f1dfdfcbf5ad2948d96"
699
-  integrity sha1-4857s3LWV3uxg58d/fy/WtKUjZY=
697
+  version "6.8.1"
698
+  resolved "http://registry.npm.taobao.org/ajv/download/ajv-6.8.1.tgz#0890b93742985ebf8973cd365c5b23920ce3cb20"
699
+  integrity sha1-CJC5N0KYXr+Jc802XFsjkgzjyyA=
700 700
   dependencies:
701 701
     fast-deep-equal "^2.0.1"
702 702
     fast-json-stable-stringify "^2.0.0"
@@ -4545,6 +4545,8 @@ react-is@^16.6.3:
4545 4545
 
4546 4546
 "react-native-agora@file:../..":
4547 4547
   version "2.3.3"
4548
+  dependencies:
4549
+    tslib "^1.9.3"
4548 4550
 
4549 4551
 react-native@0.57.8:
4550 4552
   version "0.57.8"
@@ -5498,6 +5500,11 @@ trim-right@^1.0.1:
5498 5500
   resolved "http://registry.npm.taobao.org/trim-right/download/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003"
5499 5501
   integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=
5500 5502
 
5503
+tslib@^1.9.3:
5504
+  version "1.9.3"
5505
+  resolved "http://registry.npm.taobao.org/tslib/download/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286"
5506
+  integrity sha1-1+TdeSRdhUKMTX5IIqeZF5VMooY=
5507
+
5501 5508
 tunnel-agent@^0.6.0:
5502 5509
   version "0.6.0"
5503 5510
   resolved "http://registry.npm.taobao.org/tunnel-agent/download/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd"

+ 1
- 1
yarn.lock View File

@@ -6039,7 +6039,7 @@ ts-jest@^23.10.5:
6039 6039
     semver "^5.5"
6040 6040
     yargs-parser "10.x"
6041 6041
 
6042
-tslib@^1.8.0, tslib@^1.8.1:
6042
+tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.3:
6043 6043
   version "1.9.3"
6044 6044
   resolved "http://registry.npm.taobao.org/tslib/download/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286"
6045 6045
   integrity sha1-1+TdeSRdhUKMTX5IIqeZF5VMooY=