Parcourir la source

fix. new 0.58.0

matrixbirds il y a 5 ans
Parent
révision
50d049ecdc
25 fichiers modifiés avec 2943 ajouts et 201 suppressions
  1. 1
    1
      samples/simpleDemo/.flowconfig
  2. 58
    0
      samples/simpleDemo/.gitignore
  3. 4
    14
      samples/simpleDemo/android/app/BUCK
  4. 3
    5
      samples/simpleDemo/android/app/build.gradle
  5. 19
    0
      samples/simpleDemo/android/app/build_defs.bzl
  6. 1
    0
      samples/simpleDemo/android/app/src/main/AndroidManifest.xml
  7. 3
    1
      samples/simpleDemo/android/app/src/main/java/com/simpledemo/MainApplication.java
  8. 6
    6
      samples/simpleDemo/android/build.gradle
  9. 1
    1
      samples/simpleDemo/android/gradle/wrapper/gradle-wrapper.properties
  10. 2
    0
      samples/simpleDemo/android/settings.gradle
  11. 3
    0
      samples/simpleDemo/babel.config.js
  12. 27
    11
      samples/simpleDemo/ios/Podfile
  13. 1
    35
      samples/simpleDemo/ios/Podfile.lock
  14. 1796
    0
      samples/simpleDemo/ios/simpleDemo.xcodeproj/project.pbxproj
  15. 7
    0
      samples/simpleDemo/ios/simpleDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  16. 8
    0
      samples/simpleDemo/ios/simpleDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
  17. BIN
      samples/simpleDemo/ios/simpleDemo.xcodeproj/project.xcworkspace/xcuserdata/ly.xcuserdatad/UserInterfaceState.xcuserstate
  18. 19
    0
      samples/simpleDemo/ios/simpleDemo.xcodeproj/xcuserdata/ly.xcuserdatad/xcschemes/xcschememanagement.plist
  19. 10
    0
      samples/simpleDemo/ios/simpleDemo.xcworkspace/contents.xcworkspacedata
  20. 1
    1
      samples/simpleDemo/ios/simpleDemo/AppDelegate.h
  21. 3
    7
      samples/simpleDemo/ios/simpleDemo/AppDelegate.m
  22. 1
    1
      samples/simpleDemo/ios/simpleDemo/main.m
  23. 1
    1
      samples/simpleDemo/ios/simpleDemoTests/simpleDemoTests.m
  24. 2
    2
      samples/simpleDemo/package.json
  25. 966
    115
      samples/simpleDemo/yarn.lock

+ 1
- 1
samples/simpleDemo/.flowconfig Voir le fichier

@@ -67,4 +67,4 @@ suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
67 67
 suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
68 68
 
69 69
 [version]
70
-^0.78.0
70
+^0.86.0

+ 58
- 0
samples/simpleDemo/.gitignore Voir le fichier

@@ -56,3 +56,61 @@ buck-out/
56 56
 *.jsbundle
57 57
 Pods
58 58
 **/*~
59
+# OSX
60
+#
61
+.DS_Store
62
+
63
+# Xcode
64
+#
65
+build/
66
+*.pbxuser
67
+!default.pbxuser
68
+*.mode1v3
69
+!default.mode1v3
70
+*.mode2v3
71
+!default.mode2v3
72
+*.perspectivev3
73
+!default.perspectivev3
74
+xcuserdata
75
+*.xccheckout
76
+*.moved-aside
77
+DerivedData
78
+*.hmap
79
+*.ipa
80
+*.xcuserstate
81
+project.xcworkspace
82
+
83
+# Android/IntelliJ
84
+#
85
+build/
86
+.idea
87
+.gradle
88
+local.properties
89
+*.iml
90
+
91
+# node.js
92
+#
93
+node_modules/
94
+npm-debug.log
95
+yarn-error.log
96
+
97
+# BUCK
98
+buck-out/
99
+\.buckd/
100
+*.keystore
101
+
102
+# fastlane
103
+#
104
+# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
105
+# screenshots whenever they are needed.
106
+# For more information about the recommended setup visit:
107
+# https://docs.fastlane.tools/best-practices/source-control/
108
+
109
+*/fastlane/report.xml
110
+*/fastlane/Preview.html
111
+*/fastlane/screenshots
112
+
113
+# Bundle artifact
114
+*.jsbundle
115
+Pods
116
+**/*~

+ 4
- 14
samples/simpleDemo/android/app/BUCK Voir le fichier

@@ -8,23 +8,13 @@
8 8
 # - `buck install -r android/app` - compile, install and run application
9 9
 #
10 10
 
11
+load(":build_defs.bzl", "create_aar_targets", "create_jar_targets")
12
+
11 13
 lib_deps = []
12 14
 
13
-for jarfile in glob(['libs/*.jar']):
14
-  name = 'jars__' + jarfile[jarfile.rindex('/') + 1: jarfile.rindex('.jar')]
15
-  lib_deps.append(':' + name)
16
-  prebuilt_jar(
17
-    name = name,
18
-    binary_jar = jarfile,
19
-  )
15
+create_aar_targets(glob(["libs/*.aar"]))
20 16
 
21
-for aarfile in glob(['libs/*.aar']):
22
-  name = 'aars__' + aarfile[aarfile.rindex('/') + 1: aarfile.rindex('.aar')]
23
-  lib_deps.append(':' + name)
24
-  android_prebuilt_aar(
25
-    name = name,
26
-    aar = aarfile,
27
-  )
17
+create_jar_targets(glob(["libs/*.jar"]))
28 18
 
29 19
 android_library(
30 20
     name = "all-libs",

+ 3
- 5
samples/simpleDemo/android/app/build.gradle Voir le fichier

@@ -103,16 +103,13 @@ android {
103 103
         targetSdkVersion rootProject.ext.targetSdkVersion
104 104
         versionCode 1
105 105
         versionName "1.0"
106
-        ndk {
107
-            abiFilters "armeabi-v7a", "x86"
108
-        }
109 106
     }
110 107
     splits {
111 108
         abi {
112 109
             reset()
113 110
             enable enableSeparateBuildPerCPUArchitecture
114 111
             universalApk false  // If true, also generate a universal APK
115
-            include "armeabi-v7a", "x86"
112
+            include "armeabi-v7a", "x86", "arm64-v8a"
116 113
         }
117 114
     }
118 115
     buildTypes {
@@ -126,7 +123,7 @@ android {
126 123
         variant.outputs.each { output ->
127 124
             // For each separate APK per architecture, set a unique version code as described here:
128 125
             // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
129
-            def versionCodes = ["armeabi-v7a":1, "x86":2]
126
+            def versionCodes = ["armeabi-v7a":1, "x86":2, "arm64-v8a": 3]
130 127
             def abi = output.getFilter(OutputFile.ABI)
131 128
             if (abi != null) {  // null for the universal-debug, universal-release variants
132 129
                 output.versionCodeOverride =
@@ -137,6 +134,7 @@ android {
137 134
 }
138 135
 
139 136
 dependencies {
137
+    implementation project(':react-native-agora')
140 138
     implementation fileTree(dir: "libs", include: ["*.jar"])
141 139
     implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
142 140
     implementation "com.facebook.react:react-native:+"  // From node_modules

+ 19
- 0
samples/simpleDemo/android/app/build_defs.bzl Voir le fichier

@@ -0,0 +1,19 @@
1
+"""Helper definitions to glob .aar and .jar targets"""
2
+
3
+def create_aar_targets(aarfiles):
4
+    for aarfile in aarfiles:
5
+        name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")]
6
+        lib_deps.append(":" + name)
7
+        android_prebuilt_aar(
8
+            name = name,
9
+            aar = aarfile,
10
+        )
11
+
12
+def create_jar_targets(jarfiles):
13
+    for jarfile in jarfiles:
14
+        name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")]
15
+        lib_deps.append(":" + name)
16
+        prebuilt_jar(
17
+            name = name,
18
+            binary_jar = jarfile,
19
+        )

+ 1
- 0
samples/simpleDemo/android/app/src/main/AndroidManifest.xml Voir le fichier

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

+ 3
- 1
samples/simpleDemo/android/app/src/main/java/com/simpledemo/MainApplication.java Voir le fichier

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

+ 6
- 6
samples/simpleDemo/android/build.gradle Voir le fichier

@@ -2,18 +2,18 @@
2 2
 
3 3
 buildscript {
4 4
     ext {
5
-        buildToolsVersion = "27.0.3"
5
+        buildToolsVersion = "28.0.2"
6 6
         minSdkVersion = 16
7
-        compileSdkVersion = 27
8
-        targetSdkVersion = 26
9
-        supportLibVersion = "27.1.1"
7
+        compileSdkVersion = 28
8
+        targetSdkVersion = 27
9
+        supportLibVersion = "28.0.0"
10 10
     }
11 11
     repositories {
12 12
         google()
13 13
         jcenter()
14 14
     }
15 15
     dependencies {
16
-        classpath 'com.android.tools.build:gradle:3.1.4'
16
+        classpath 'com.android.tools.build:gradle:3.2.1'
17 17
 
18 18
         // NOTE: Do not place your application dependencies here; they belong
19 19
         // in the individual module build.gradle files
@@ -34,6 +34,6 @@ allprojects {
34 34
 
35 35
 
36 36
 task wrapper(type: Wrapper) {
37
-    gradleVersion = '4.4'
37
+    gradleVersion = '4.7'
38 38
     distributionUrl = distributionUrl.replace("bin", "all")
39 39
 }

+ 1
- 1
samples/simpleDemo/android/gradle/wrapper/gradle-wrapper.properties Voir le fichier

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

+ 2
- 0
samples/simpleDemo/android/settings.gradle Voir le fichier

@@ -1,3 +1,5 @@
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')
2 4
 
3 5
 include ':app'

+ 3
- 0
samples/simpleDemo/babel.config.js Voir le fichier

@@ -0,0 +1,3 @@
1
+module.exports = {
2
+  presets: ["module:metro-react-native-babel-preset"]
3
+}

+ 27
- 11
samples/simpleDemo/ios/Podfile Voir le fichier

@@ -1,24 +1,40 @@
1
-react_native_path = '../node_modules/react-native'
2
-project 'simpleDemo.xcodeproj'
3
-
4 1
 # Uncomment the next line to define a global platform for your project
5 2
 platform :ios, '9.0'
3
+react_native_path = "../node_modules/react-native"
4
+project "simpleDemo.xcodeproj"
6 5
 
7 6
 target 'simpleDemo' do
8 7
   # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
9
-  use_frameworks!
8
+  # use_frameworks!
10 9
 
11 10
   # Pods for simpleDemo
12
-  pod 'react-native-agora', path: '../node_modules/react-native-agora'
13
-  pod 'React', path: react_native_path
14
-  pod 'yoga', path: "#{react_native_path}/ReactCommon/yoga"
15
-  %w(DoubleConversion Folly glog).each do |lib_name|
16
-    pod lib_name, podspec: "#{react_native_path}/third-party-podspecs/#{lib_name}.podspec"
17
-  end
18
-  #pod 'AgoraRtcEngine_iOS', '2.3.3'
11
+
12
+  #target 'simpleDemo-tvOSTests' do
13
+  #  inherit! :search_paths
14
+  #  # Pods for testing
15
+  #end
16
+  pod "react-native-agora", path: "../node_modules/react-native-agora"
17
+  #pod "React", path: react_native_path
18
+  #%w(DoubleConversion Folly glog).each do |lib_name|
19
+  #  pod lib_name, podspec: "#{react_native_path}/third-party-podspecs/#{lib_name}.podspec"
20
+  #end
21
+
19 22
   target 'simpleDemoTests' do
20 23
     inherit! :search_paths
21 24
     # Pods for testing
22 25
   end
23 26
 
24 27
 end
28
+
29
+target 'simpleDemo-tvOS' do
30
+  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
31
+  # use_frameworks!
32
+
33
+  # Pods for simpleDemo-tvOS
34
+
35
+  target 'simpleDemo-tvOSTests' do
36
+    inherit! :search_paths
37
+    # Pods for testing
38
+  end
39
+
40
+end

+ 1
- 35
samples/simpleDemo/ios/Podfile.lock Voir le fichier

@@ -1,14 +1,5 @@
1 1
 PODS:
2 2
   - AgoraRtcEngine_iOS (2.3.3)
3
-  - boost-for-react-native (1.63.0)
4
-  - DoubleConversion (1.1.6)
5
-  - Folly (2016.10.31.00):
6
-    - boost-for-react-native
7
-    - DoubleConversion
8
-    - glog
9
-  - glog (0.3.5)
10
-  - React (0.57.8):
11
-    - React/Core (= 0.57.8)
12 3
   - react-native-agora (2.3.3):
13 4
     - AgoraRtcEngine_iOS (= 2.3.3)
14 5
     - react-native-agora/AgoraRtcCryptoLoader (= 2.3.3)
@@ -17,47 +8,22 @@ PODS:
17 8
     - AgoraRtcEngine_iOS (= 2.3.3)
18 9
   - react-native-agora/AgoraRtcEngineKit (2.3.3):
19 10
     - AgoraRtcEngine_iOS (= 2.3.3)
20
-  - React/Core (0.57.8):
21
-    - yoga (= 0.57.8.React)
22
-  - yoga (0.57.8.React)
23 11
 
24 12
 DEPENDENCIES:
25
-  - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
26
-  - Folly (from `../node_modules/react-native/third-party-podspecs/Folly.podspec`)
27
-  - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
28
-  - React (from `../node_modules/react-native`)
29 13
   - react-native-agora (from `../node_modules/react-native-agora`)
30
-  - yoga (from `../node_modules/react-native/ReactCommon/yoga`)
31 14
 
32 15
 SPEC REPOS:
33 16
   https://github.com/cocoapods/specs.git:
34 17
     - AgoraRtcEngine_iOS
35
-    - boost-for-react-native
36 18
 
37 19
 EXTERNAL SOURCES:
38
-  DoubleConversion:
39
-    :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
40
-  Folly:
41
-    :podspec: "../node_modules/react-native/third-party-podspecs/Folly.podspec"
42
-  glog:
43
-    :podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec"
44
-  React:
45
-    :path: "../node_modules/react-native"
46 20
   react-native-agora:
47 21
     :path: "../node_modules/react-native-agora"
48
-  yoga:
49
-    :path: "../node_modules/react-native/ReactCommon/yoga"
50 22
 
51 23
 SPEC CHECKSUMS:
52 24
   AgoraRtcEngine_iOS: 8ad4b58dafed2cec5df03fa1f0ddbdad2c9ff958
53
-  boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
54
-  DoubleConversion: bb338842f62ab1d708ceb63ec3d999f0f3d98ecd
55
-  Folly: c89ac2d5c6ab169cd7397ef27485c44f35f742c7
56
-  glog: e8acf0ebbf99759d3ff18c86c292a5898282dcde
57
-  React: 1fe0eb13d90b625d94c3b117c274dcfd2e760e11
58 25
   react-native-agora: ad43868aad1298fa32f167d9a00887e2c88af54b
59
-  yoga: b1ce48b6cf950b98deae82838f5173ea7cf89e85
60 26
 
61
-PODFILE CHECKSUM: a165c0bfbdd660ff2132e775c48c7a2e58dd3cf7
27
+PODFILE CHECKSUM: ed05ca9e60ab637de485899d548c81338155a2ae
62 28
 
63 29
 COCOAPODS: 1.5.3

+ 1796
- 0
samples/simpleDemo/ios/simpleDemo.xcodeproj/project.pbxproj
Fichier diff supprimé car celui-ci est trop grand
Voir le fichier


+ 7
- 0
samples/simpleDemo/ios/simpleDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata Voir le fichier

@@ -0,0 +1,7 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<Workspace
3
+   version = "1.0">
4
+   <FileRef
5
+      location = "self:">
6
+   </FileRef>
7
+</Workspace>

+ 8
- 0
samples/simpleDemo/ios/simpleDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist Voir le fichier

@@ -0,0 +1,8 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+<plist version="1.0">
4
+<dict>
5
+	<key>IDEDidComputeMac32BitWarning</key>
6
+	<true/>
7
+</dict>
8
+</plist>

BIN
samples/simpleDemo/ios/simpleDemo.xcodeproj/project.xcworkspace/xcuserdata/ly.xcuserdatad/UserInterfaceState.xcuserstate Voir le fichier


+ 19
- 0
samples/simpleDemo/ios/simpleDemo.xcodeproj/xcuserdata/ly.xcuserdatad/xcschemes/xcschememanagement.plist Voir le fichier

@@ -0,0 +1,19 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+<plist version="1.0">
4
+<dict>
5
+	<key>SchemeUserState</key>
6
+	<dict>
7
+		<key>simpleDemo-tvOS.xcscheme_^#shared#^_</key>
8
+		<dict>
9
+			<key>orderHint</key>
10
+			<integer>1</integer>
11
+		</dict>
12
+		<key>simpleDemo.xcscheme_^#shared#^_</key>
13
+		<dict>
14
+			<key>orderHint</key>
15
+			<integer>0</integer>
16
+		</dict>
17
+	</dict>
18
+</dict>
19
+</plist>

+ 10
- 0
samples/simpleDemo/ios/simpleDemo.xcworkspace/contents.xcworkspacedata Voir le fichier

@@ -0,0 +1,10 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<Workspace
3
+   version = "1.0">
4
+   <FileRef
5
+      location = "group:simpleDemo.xcodeproj">
6
+   </FileRef>
7
+   <FileRef
8
+      location = "group:Pods/Pods.xcodeproj">
9
+   </FileRef>
10
+</Workspace>

+ 1
- 1
samples/simpleDemo/ios/simpleDemo/AppDelegate.h Voir le fichier

@@ -1,5 +1,5 @@
1 1
 /**
2
- * Copyright (c) 2015-present, Facebook, Inc.
2
+ * Copyright (c) Facebook, Inc. and its affiliates.
3 3
  *
4 4
  * This source code is licensed under the MIT license found in the
5 5
  * LICENSE file in the root directory of this source tree.

+ 3
- 7
samples/simpleDemo/ios/simpleDemo/AppDelegate.m Voir le fichier

@@ -1,5 +1,5 @@
1 1
 /**
2
- * Copyright (c) 2015-present, Facebook, Inc.
2
+ * Copyright (c) Facebook, Inc. and its affiliates.
3 3
  *
4 4
  * This source code is licensed under the MIT license found in the
5 5
  * LICENSE file in the root directory of this source tree.
@@ -16,17 +16,13 @@
16 16
 {
17 17
   NSURL *jsCodeLocation;
18 18
 
19
-  #ifdef DEBUG
20
-    jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
21
-  #else
22
-    jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
23
-  #endif
19
+  jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
24 20
 
25 21
   RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
26 22
                                                       moduleName:@"simpleDemo"
27 23
                                                initialProperties:nil
28 24
                                                    launchOptions:launchOptions];
29
-  rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
25
+  rootView.backgroundColor = [UIColor blackColor];
30 26
 
31 27
   self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
32 28
   UIViewController *rootViewController = [UIViewController new];

+ 1
- 1
samples/simpleDemo/ios/simpleDemo/main.m Voir le fichier

@@ -1,5 +1,5 @@
1 1
 /**
2
- * Copyright (c) 2015-present, Facebook, Inc.
2
+ * Copyright (c) Facebook, Inc. and its affiliates.
3 3
  *
4 4
  * This source code is licensed under the MIT license found in the
5 5
  * LICENSE file in the root directory of this source tree.

+ 1
- 1
samples/simpleDemo/ios/simpleDemoTests/simpleDemoTests.m Voir le fichier

@@ -1,5 +1,5 @@
1 1
 /**
2
- * Copyright (c) 2015-present, Facebook, Inc.
2
+ * Copyright (c) Facebook, Inc. and its affiliates.
3 3
  *
4 4
  * This source code is licensed under the MIT license found in the
5 5
  * LICENSE file in the root directory of this source tree.

+ 2
- 2
samples/simpleDemo/package.json Voir le fichier

@@ -11,8 +11,8 @@
11 11
     "test": "jest"
12 12
   },
13 13
   "dependencies": {
14
-    "react": "16.6.3",
15
-    "react-native": "0.57.8",
14
+    "react": "16.7.0",
15
+    "react-native": "0.58.3",
16 16
     "react-native-agora": "file:../.."
17 17
   },
18 18
   "devDependencies": {

+ 966
- 115
samples/simpleDemo/yarn.lock
Fichier diff supprimé car celui-ci est trop grand
Voir le fichier