Преглед на файлове

remove. sample demo, instead using agora community quickstart

matrixbirds преди 5 години
родител
ревизия
bd0e7fb926
променени са 73 файла, в които са добавени 8 реда и са изтрити 10812 реда
  1. 6
    1
      CHANGELOG
  2. 1
    1
      ios/RCTAgora/AgoraConst.m
  3. 1
    1
      samples/README.md
  4. 0
    3
      samples/simpleDemo/.babelrc
  5. 0
    6
      samples/simpleDemo/.buckconfig
  6. 0
    70
      samples/simpleDemo/.flowconfig
  7. 0
    1
      samples/simpleDemo/.gitattributes
  8. 0
    116
      samples/simpleDemo/.gitignore
  9. 0
    1
      samples/simpleDemo/.watchmanconfig
  10. 0
    167
      samples/simpleDemo/App.js
  11. 0
    68
      samples/simpleDemo/README.md
  12. 0
    34
      samples/simpleDemo/README.zh.md
  13. 0
    55
      samples/simpleDemo/android/app/BUCK
  14. 0
    158
      samples/simpleDemo/android/app/build.gradle
  15. 0
    19
      samples/simpleDemo/android/app/build_defs.bzl
  16. 0
    17
      samples/simpleDemo/android/app/proguard-rules.pro
  17. 0
    28
      samples/simpleDemo/android/app/src/main/AndroidManifest.xml
  18. 0
    15
      samples/simpleDemo/android/app/src/main/java/com/simpledemo/MainActivity.java
  19. 0
    47
      samples/simpleDemo/android/app/src/main/java/com/simpledemo/MainApplication.java
  20. BIN
      samples/simpleDemo/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
  21. BIN
      samples/simpleDemo/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
  22. BIN
      samples/simpleDemo/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
  23. BIN
      samples/simpleDemo/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
  24. BIN
      samples/simpleDemo/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
  25. BIN
      samples/simpleDemo/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
  26. BIN
      samples/simpleDemo/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
  27. BIN
      samples/simpleDemo/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
  28. BIN
      samples/simpleDemo/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
  29. BIN
      samples/simpleDemo/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
  30. 0
    3
      samples/simpleDemo/android/app/src/main/res/values/strings.xml
  31. 0
    8
      samples/simpleDemo/android/app/src/main/res/values/styles.xml
  32. 0
    39
      samples/simpleDemo/android/build.gradle
  33. 0
    18
      samples/simpleDemo/android/gradle.properties
  34. BIN
      samples/simpleDemo/android/gradle/wrapper/gradle-wrapper.jar
  35. 0
    5
      samples/simpleDemo/android/gradle/wrapper/gradle-wrapper.properties
  36. 0
    172
      samples/simpleDemo/android/gradlew
  37. 0
    84
      samples/simpleDemo/android/gradlew.bat
  38. 0
    8
      samples/simpleDemo/android/keystores/BUCK
  39. 0
    4
      samples/simpleDemo/android/keystores/debug.keystore.properties
  40. 0
    5
      samples/simpleDemo/android/settings.gradle
  41. 0
    4
      samples/simpleDemo/app.json
  42. BIN
      samples/simpleDemo/assets/btn_endcall.png
  43. BIN
      samples/simpleDemo/assets/btn_mute.png
  44. BIN
      samples/simpleDemo/assets/btn_speaker.png
  45. BIN
      samples/simpleDemo/assets/btn_switch_camera.png
  46. BIN
      samples/simpleDemo/assets/btn_video.png
  47. BIN
      samples/simpleDemo/assets/disable_camera.png
  48. BIN
      samples/simpleDemo/assets/disable_photoflash.png
  49. BIN
      samples/simpleDemo/assets/enable_camera.png
  50. BIN
      samples/simpleDemo/assets/enable_photoflash.png
  51. BIN
      samples/simpleDemo/assets/icon_muted.png
  52. BIN
      samples/simpleDemo/assets/icon_speaker.png
  53. 0
    8
      samples/simpleDemo/babel.config.js
  54. 0
    373
      samples/simpleDemo/components/agora.js
  55. 0
    7
      samples/simpleDemo/index.js
  56. 0
    42
      samples/simpleDemo/ios/Podfile
  57. 0
    54
      samples/simpleDemo/ios/simpleDemo-tvOS/Info.plist
  58. 0
    24
      samples/simpleDemo/ios/simpleDemo-tvOSTests/Info.plist
  59. 0
    1753
      samples/simpleDemo/ios/simpleDemo.xcodeproj/project.pbxproj
  60. 0
    129
      samples/simpleDemo/ios/simpleDemo.xcodeproj/xcshareddata/xcschemes/simpleDemo-tvOS.xcscheme
  61. 0
    129
      samples/simpleDemo/ios/simpleDemo.xcodeproj/xcshareddata/xcschemes/simpleDemo.xcscheme
  62. 0
    14
      samples/simpleDemo/ios/simpleDemo/AppDelegate.h
  63. 0
    35
      samples/simpleDemo/ios/simpleDemo/AppDelegate.m
  64. 0
    42
      samples/simpleDemo/ios/simpleDemo/Base.lproj/LaunchScreen.xib
  65. 0
    53
      samples/simpleDemo/ios/simpleDemo/Images.xcassets/AppIcon.appiconset/Contents.json
  66. 0
    6
      samples/simpleDemo/ios/simpleDemo/Images.xcassets/Contents.json
  67. 0
    65
      samples/simpleDemo/ios/simpleDemo/Info.plist
  68. 0
    16
      samples/simpleDemo/ios/simpleDemo/main.m
  69. 0
    24
      samples/simpleDemo/ios/simpleDemoTests/Info.plist
  70. 0
    68
      samples/simpleDemo/ios/simpleDemoTests/simpleDemoTests.m
  71. 0
    27
      samples/simpleDemo/package.json
  72. 0
    26
      samples/simpleDemo/utils.js
  73. 0
    6759
      samples/simpleDemo/yarn.lock

+ 6
- 1
CHANGELOG Целия файл

@@ -1,8 +1,13 @@
1 1
 ## THE CHANGELOG
2 2
 
3
+#### 2.4.1-alpha.2
4
+- deprecated `sendMessage` & `createDataStream` & `removeAllListeners`
5
+- refactor event system
6
+
7
+
3 8
 #### 2.4.1-alpha
4 9
 - support 2.4.1-alpha.1 agora video sdk android-2.4.1 / iOS-2.4.1
5
-  1. Deprecate iOS
10
+  1. Deprecate iOS manual link operator, instead using cocoapods resolve compile dependencies.
6 11
   2. Add methods getAudioMixingPlayoutVolume, getAudioMixingPublishVolume for audio mixing troubleshooting.
7 12
   3. Add `txPacketLossRate`, `rxPacketLossRate` on `rtcStats` interface. usage: `RtcEngine.on('rtcStats', (data) => console.log(data))`.
8 13
   4. Rename `receivedFrameRate` to `rendererOutputFrameRate` this property related on `localVideoStats` and `remoteVideoStats`.

+ 1
- 1
ios/RCTAgora/AgoraConst.m Целия файл

@@ -100,7 +100,7 @@ static AgoraConst *_person;
100 100
                                   AGMediaMetaDataReceived];
101 101
   
102 102
   NSMutableArray<NSString *> *eventList = [NSMutableArray arrayWithCapacity:[array count]];
103
-  [eventList enumerateObjectsUsingBlock:^(NSString * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
103
+  [array enumerateObjectsUsingBlock:^(NSString * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
104 104
     id mapObj = [NSString stringWithFormat:@"%@%@", AG_PREFIX, obj];
105 105
     [eventList addObject:mapObj];
106 106
   }];

+ 1
- 1
samples/README.md Целия файл

@@ -2,4 +2,4 @@
2 2
 
3 3
 | name | description |
4 4
 | :-------------: | :-------------: |
5
-| [simpleDemo](./simpleDemo) | react-native-agora demo for beginner |
5
+| [agora-rn-quickstart](./https://github.com/agoraio-community/agora-rn-quickstart) | react-native-agora demo for beginner |

+ 0
- 3
samples/simpleDemo/.babelrc Целия файл

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

+ 0
- 6
samples/simpleDemo/.buckconfig Целия файл

@@ -1,6 +0,0 @@
1
-
2
-[android]
3
-  target = Google Inc.:Google APIs:23
4
-
5
-[maven_repositories]
6
-  central = https://repo1.maven.org/maven2

+ 0
- 70
samples/simpleDemo/.flowconfig Целия файл

@@ -1,70 +0,0 @@
1
-[ignore]
2
-; We fork some components by platform
3
-.*/*[.]android.js
4
-
5
-; Ignore "BUCK" generated dirs
6
-<PROJECT_ROOT>/\.buckd/
7
-
8
-; Ignore unexpected extra "@providesModule"
9
-.*/node_modules/.*/node_modules/fbjs/.*
10
-
11
-; Ignore duplicate module providers
12
-; For RN Apps installed via npm, "Libraries" folder is inside
13
-; "node_modules/react-native" but in the source repo it is in the root
14
-.*/Libraries/react-native/React.js
15
-
16
-; Ignore polyfills
17
-.*/Libraries/polyfills/.*
18
-
19
-; Ignore metro
20
-.*/node_modules/metro/.*
21
-
22
-[include]
23
-
24
-[libs]
25
-node_modules/react-native/Libraries/react-native/react-native-interface.js
26
-node_modules/react-native/flow/
27
-node_modules/react-native/flow-github/
28
-
29
-[options]
30
-emoji=true
31
-
32
-esproposal.optional_chaining=enable
33
-esproposal.nullish_coalescing=enable
34
-
35
-module.system=haste
36
-module.system.haste.use_name_reducers=true
37
-# get basename
38
-module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1'
39
-# strip .js or .js.flow suffix
40
-module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1'
41
-# strip .ios suffix
42
-module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1'
43
-module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1'
44
-module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1'
45
-module.system.haste.paths.blacklist=.*/__tests__/.*
46
-module.system.haste.paths.blacklist=.*/__mocks__/.*
47
-module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/Animated/src/polyfills/.*
48
-module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/Libraries/.*
49
-
50
-munge_underscores=true
51
-
52
-module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
53
-
54
-module.file_ext=.js
55
-module.file_ext=.jsx
56
-module.file_ext=.json
57
-module.file_ext=.native.js
58
-
59
-suppress_type=$FlowIssue
60
-suppress_type=$FlowFixMe
61
-suppress_type=$FlowFixMeProps
62
-suppress_type=$FlowFixMeState
63
-
64
-suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
65
-suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
66
-suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
67
-suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
68
-
69
-[version]
70
-^0.86.0

+ 0
- 1
samples/simpleDemo/.gitattributes Целия файл

@@ -1 +0,0 @@
1
-*.pbxproj -text

+ 0
- 116
samples/simpleDemo/.gitignore Целия файл

@@ -1,116 +0,0 @@
1
-# OSX
2
-#
3
-.DS_Store
4
-
5
-# Xcode
6
-#
7
-build/
8
-*.pbxuser
9
-!default.pbxuser
10
-*.mode1v3
11
-!default.mode1v3
12
-*.mode2v3
13
-!default.mode2v3
14
-*.perspectivev3
15
-!default.perspectivev3
16
-xcuserdata
17
-*.xccheckout
18
-*.moved-aside
19
-DerivedData
20
-*.hmap
21
-*.ipa
22
-*.xcuserstate
23
-project.xcworkspace
24
-
25
-# Android/IntelliJ
26
-#
27
-build/
28
-.idea
29
-.gradle
30
-local.properties
31
-*.iml
32
-
33
-# node.js
34
-#
35
-node_modules/
36
-npm-debug.log
37
-yarn-error.log
38
-
39
-# BUCK
40
-buck-out/
41
-\.buckd/
42
-*.keystore
43
-
44
-# fastlane
45
-#
46
-# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
47
-# screenshots whenever they are needed.
48
-# For more information about the recommended setup visit:
49
-# https://docs.fastlane.tools/best-practices/source-control/
50
-
51
-*/fastlane/report.xml
52
-*/fastlane/Preview.html
53
-*/fastlane/screenshots
54
-
55
-# Bundle artifact
56
-*.jsbundle
57
-Pods
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
-**/*~

+ 0
- 1
samples/simpleDemo/.watchmanconfig Целия файл

@@ -1 +0,0 @@
1
-{}

+ 0
- 167
samples/simpleDemo/App.js Целия файл

@@ -1,167 +0,0 @@
1
-/**
2
- * Sample React Native App
3
- * https://github.com/facebook/react-native
4
- *
5
- * @format
6
- * @flow
7
- */
8
-
9
-import React, {Component} from 'react';
10
-import {
11
-  StyleSheet, Text, View, TouchableOpacity, TextInput,
12
-  PermissionsAndroid
13
-} from 'react-native';
14
-import AgoraRTCView from './components/agora';
15
-
16
-const styles = StyleSheet.create({
17
-  container: {
18
-    flex: 1,
19
-    justifyContent: 'center',
20
-    alignItems: 'center',
21
-    backgroundColor: '#F5FCFF',
22
-  },
23
-  welcome: {
24
-    fontSize: 20,
25
-    textAlign: 'center',
26
-    margin: 10,
27
-  },
28
-  instructions: {
29
-    textAlign: 'center',
30
-    color: '#333333',
31
-    marginBottom: 5,
32
-  },
33
-  button: {
34
-    height: 44,
35
-    paddingHorizontal:20,
36
-    backgroundColor:'#6A71DD',
37
-    borderRadius:10,
38
-    justifyContent:'center',
39
-    alignItems:'center',
40
-    marginTop: 10
41
-  }
42
-});
43
-
44
-type Props = {};
45
-export default class App extends Component<Props> {
46
-  constructor(props) {
47
-    super(props);
48
-    this.state = {
49
-      showLive: false,
50
-      error: undefined,
51
-      channelProfile: 1,
52
-      videoProfile: 40,
53
-      clientRole: 1,
54
-      uid: 0,
55
-      swapWidthAndHeight: true,
56
-      channelName: null
57
-    };
58
-  }
59
-
60
-  joinChannel = () => {
61
-    this.setState({
62
-      showLive: true
63
-    })
64
-  }
65
-
66
-  onCancel = (error) => {
67
-    this.setState({
68
-      showLive: false,
69
-      error: JSON.stringify(error)
70
-    })
71
-  }
72
-
73
-  async requestCameraAndAudioAndroidPermission() {
74
-    try {
75
-      const granted = await PermissionsAndroid.requestMultiple([
76
-        PermissionsAndroid.PERMISSIONS.CAMERA,
77
-        PermissionsAndroid.PERMISSIONS.RECORD_AUDIO,
78
-      ]);
79
-      if (granted === PermissionsAndroid.RESULTS.GRANTED) {
80
-        console.log('You can use the camera');
81
-      } else {
82
-        console.log('Camera permission denied');
83
-      }
84
-    } catch (err) {
85
-      console.warn(err);
86
-    }
87
-  }
88
-
89
-  componentWillMount () {
90
-    this.requestCameraAndAudioAndroidPermission().then(_ => {});
91
-  }
92
-
93
-  render() {
94
-    if (this.state.showLive) {
95
-      console.log('channelName', this.state.channelName);
96
-      return (<AgoraRTCView
97
-        channelProfile={this.state.channelProfile}
98
-        channelName={this.state.channelName}
99
-        videoProfile={this.state.videoProfile}
100
-        clientRole={this.state.clientRole}
101
-        uid={this.state.uid}
102
-        onCancel={this.onCancel}
103
-      ></AgoraRTCView>);
104
-    }
105
-    return (
106
-      <View style={styles.container}>
107
-        {this.state.error ? <Text>Error Message: {this.state.error}</Text> : null}
108
-        <TextInput
109
-          style={{height: 40}}
110
-          keyboardType='numeric'
111
-          placeholder="Enter channelProfile (numeric)"
112
-          onChangeText={(text) => {
113
-            let matched = text.match(/\d+/g) && text.match(/\d+/g)[0]
114
-            if (matched) {
115
-              this.setState({channelProfile: +matched})
116
-            }
117
-          }
118
-        } />
119
-        <TextInput
120
-          style={{height: 40}}
121
-          keyboardType='numeric'
122
-          placeholder="Enter videoProfile (numeric)"
123
-          onChangeText={(text) => {
124
-            let matched = text.match(/\d+/g) && text.match(/\d+/g)[0]
125
-            if (matched) {
126
-              this.setState({videoProfile: +matched})
127
-            }          }
128
-        } />
129
-        <TextInput
130
-          style={{height: 40}}
131
-          keyboardType='numeric'
132
-          placeholder="Enter clientRole (numeric)"
133
-          onChangeText={(text) => {
134
-            let matched = text.match(/\d+/g) && text.match(/\d+/g)[0]
135
-            if (matched) {
136
-              this.setState({clientRole: +matched})
137
-            }
138
-          }
139
-        } />
140
-        <TextInput
141
-          style={{height: 40}}
142
-          placeholder="Enter channelName"
143
-          onChangeText={
144
-            (text) => {
145
-              this.setState({channelName: text}) 
146
-            }
147
-          }
148
-        />
149
-        <TextInput
150
-          style={{height: 40}}
151
-          placeholder="Enter uid"
152
-          onChangeText={
153
-            (uid) => {
154
-              this.setState({uid: +uid}) 
155
-            }
156
-          }
157
-        />
158
-        <TouchableOpacity
159
-          style={styles.button}
160
-          onPress={this.joinChannel}
161
-        >
162
-          <Text style={{color: "#fff"}}>join room</Text>
163
-        </TouchableOpacity>
164
-      </View>
165
-    );
166
-  }
167
-}

+ 0
- 68
samples/simpleDemo/README.md Целия файл

@@ -1,68 +0,0 @@
1
-# [中文版本](./README.zh.md)
2
-
3
-# Android Setup
4
-
5
-## Prerequisites
6
-  * You should installed and linked `react-native-agora`
7
-  * Android Studio
8
-  * Android SDK
9
-  * Reliable USB Cable
10
-  * Android Device
11
-
12
-## Build
13
-  [More Android Setup details read the doc](../../docs/ANDROID_INSTALLATION.md)
14
-  ```bash
15
-  adb reverse tcp:8081 tcp:8081
16
-  adb reverse tcp:8097 tcp:8097
17
-  npm install
18
-  npm run android
19
-  ```
20
-## Build Signed App
21
-### Generate keystore file.
22
-
23
-  ```bash
24
-    keytool -genkey -v -keystore my-release-key.keystore -alias my-key-alias -keyalg RSA -keysize 2048 -validity 10000
25
-  ```
26
-### Edit android/app/build.gradle
27
-
28
-  ```java
29
-    signingConfigs {
30
-        release {
31
-            if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) {
32
-                storeFile file(MYAPP_RELEASE_STORE_FILE)
33
-                storePassword MYAPP_RELEASE_STORE_PASSWORD
34
-                keyAlias MYAPP_RELEASE_KEY_ALIAS
35
-                keyPassword MYAPP_RELEASE_KEY_PASSWORD
36
-            }
37
-        }
38
-    }
39
-  ```
40
-
41
-### Edit android/gradle.properties
42
-
43
-  ```
44
-  MYAPP_RELEASE_STORE_FILE=my-release-key.keystore # your keystore file name
45
-  MYAPP_RELEASE_KEY_ALIAS=my-key-alias # key alias
46
-  MYAPP_RELEASE_STORE_PASSWORD=****** # password
47
-  MYAPP_RELEASE_KEY_PASSWORD=****** # password confirm
48
-  ```
49
-
50
-### Build
51
-  ```
52
-  npm run build-android
53
-  ```
54
-
55
-# iOS Setup
56
-
57
-## Prerequisites
58
-  * You should installed and linked `react-native-agora`
59
-  * Xcode 10.0+
60
-  * iOS Device
61
-  * Reliable iOS Device Cable
62
-
63
-## Build
64
-  [More iOS Setup details read the doc](../../docs/IOS_INSTALLATION.md)
65
-  ```bash
66
-  npm install
67
-  npm run ios
68
-  ```

+ 0
- 34
samples/simpleDemo/README.zh.md Целия файл

@@ -1,34 +0,0 @@
1
-# [English](./README.md)
2
-
3
-# Android环境搭建
4
-
5
-## 依赖以下环境
6
-  * linked `react-native-agora`
7
-  * Android Studio
8
-  * Android SDK
9
-  * 可靠的USB数据线
10
-  * Android 设备
11
-
12
-## 构建步骤
13
-  [详情请参阅文档](../../docs/ANDROID_INSTALLATION.zh.md)
14
-  ```bash
15
-  adb reverse tcp:8081 tcp:8081
16
-  adb reverse tcp:8097 tcp:8097
17
-  npm install
18
-  npm run android
19
-  ```
20
-
21
-# iOS环境搭建
22
-
23
-## 依赖以下环境
24
-  * linked `react-native-agora`
25
-  * Xcode 10.0+
26
-  * iOS 设备
27
-  * 可靠的苹果设备数据线
28
-
29
-## 构建步骤
30
-  [详情请参阅文档](../../docs/IOS_INSTALLATION.zh.md)
31
-  ```bash
32
-  npm install
33
-  npm run ios
34
-  ```

+ 0
- 55
samples/simpleDemo/android/app/BUCK Целия файл

@@ -1,55 +0,0 @@
1
-# To learn about Buck see [Docs](https://buckbuild.com/).
2
-# To run your application with Buck:
3
-# - install Buck
4
-# - `npm start` - to start the packager
5
-# - `cd android`
6
-# - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
7
-# - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
8
-# - `buck install -r android/app` - compile, install and run application
9
-#
10
-
11
-load(":build_defs.bzl", "create_aar_targets", "create_jar_targets")
12
-
13
-lib_deps = []
14
-
15
-create_aar_targets(glob(["libs/*.aar"]))
16
-
17
-create_jar_targets(glob(["libs/*.jar"]))
18
-
19
-android_library(
20
-    name = "all-libs",
21
-    exported_deps = lib_deps,
22
-)
23
-
24
-android_library(
25
-    name = "app-code",
26
-    srcs = glob([
27
-        "src/main/java/**/*.java",
28
-    ]),
29
-    deps = [
30
-        ":all-libs",
31
-        ":build_config",
32
-        ":res",
33
-    ],
34
-)
35
-
36
-android_build_config(
37
-    name = "build_config",
38
-    package = "com.simpledemo",
39
-)
40
-
41
-android_resource(
42
-    name = "res",
43
-    package = "com.simpledemo",
44
-    res = "src/main/res",
45
-)
46
-
47
-android_binary(
48
-    name = "app",
49
-    keystore = "//android/keystores:debug",
50
-    manifest = "src/main/AndroidManifest.xml",
51
-    package_type = "debug",
52
-    deps = [
53
-        ":app-code",
54
-    ],
55
-)

+ 0
- 158
samples/simpleDemo/android/app/build.gradle Целия файл

@@ -1,158 +0,0 @@
1
-apply plugin: "com.android.application"
2
-
3
-import com.android.build.OutputFile
4
-
5
-/**
6
- * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
7
- * and bundleReleaseJsAndAssets).
8
- * These basically call `react-native bundle` with the correct arguments during the Android build
9
- * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
10
- * bundle directly from the development server. Below you can see all the possible configurations
11
- * and their defaults. If you decide to add a configuration block, make sure to add it before the
12
- * `apply from: "../../node_modules/react-native/react.gradle"` line.
13
- *
14
- * project.ext.react = [
15
- *   // the name of the generated asset file containing your JS bundle
16
- *   bundleAssetName: "index.android.bundle",
17
- *
18
- *   // the entry file for bundle generation
19
- *   entryFile: "index.android.js",
20
- *
21
- *   // whether to bundle JS and assets in debug mode
22
- *   bundleInDebug: false,
23
- *
24
- *   // whether to bundle JS and assets in release mode
25
- *   bundleInRelease: true,
26
- *
27
- *   // whether to bundle JS and assets in another build variant (if configured).
28
- *   // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
29
- *   // The configuration property can be in the following formats
30
- *   //         'bundleIn${productFlavor}${buildType}'
31
- *   //         'bundleIn${buildType}'
32
- *   // bundleInFreeDebug: true,
33
- *   // bundleInPaidRelease: true,
34
- *   // bundleInBeta: true,
35
- *
36
- *   // whether to disable dev mode in custom build variants (by default only disabled in release)
37
- *   // for example: to disable dev mode in the staging build type (if configured)
38
- *   devDisabledInStaging: true,
39
- *   // The configuration property can be in the following formats
40
- *   //         'devDisabledIn${productFlavor}${buildType}'
41
- *   //         'devDisabledIn${buildType}'
42
- *
43
- *   // the root of your project, i.e. where "package.json" lives
44
- *   root: "../../",
45
- *
46
- *   // where to put the JS bundle asset in debug mode
47
- *   jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
48
- *
49
- *   // where to put the JS bundle asset in release mode
50
- *   jsBundleDirRelease: "$buildDir/intermediates/assets/release",
51
- *
52
- *   // where to put drawable resources / React Native assets, e.g. the ones you use via
53
- *   // require('./image.png')), in debug mode
54
- *   resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
55
- *
56
- *   // where to put drawable resources / React Native assets, e.g. the ones you use via
57
- *   // require('./image.png')), in release mode
58
- *   resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
59
- *
60
- *   // by default the gradle tasks are skipped if none of the JS files or assets change; this means
61
- *   // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
62
- *   // date; if you have any other folders that you want to ignore for performance reasons (gradle
63
- *   // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
64
- *   // for example, you might want to remove it from here.
65
- *   inputExcludes: ["android/**", "ios/**"],
66
- *
67
- *   // override which node gets called and with what additional arguments
68
- *   nodeExecutableAndArgs: ["node"],
69
- *
70
- *   // supply additional arguments to the packager
71
- *   extraPackagerArgs: []
72
- * ]
73
- */
74
-
75
-project.ext.react = [
76
-    entryFile: "index.js"
77
-]
78
-
79
-apply from: "../../node_modules/react-native/react.gradle"
80
-
81
-/**
82
- * Set this to true to create two separate APKs instead of one:
83
- *   - An APK that only works on ARM devices
84
- *   - An APK that only works on x86 devices
85
- * The advantage is the size of the APK is reduced by about 4MB.
86
- * Upload all the APKs to the Play Store and people will download
87
- * the correct one based on the CPU architecture of their device.
88
- */
89
-def enableSeparateBuildPerCPUArchitecture = false
90
-
91
-/**
92
- * Run Proguard to shrink the Java bytecode in release builds.
93
- */
94
-def enableProguardInReleaseBuilds = false
95
-
96
-android {
97
-    compileSdkVersion rootProject.ext.compileSdkVersion
98
-    buildToolsVersion rootProject.ext.buildToolsVersion
99
-
100
-    defaultConfig {
101
-        applicationId "com.simpledemo"
102
-        minSdkVersion rootProject.ext.minSdkVersion
103
-        targetSdkVersion rootProject.ext.targetSdkVersion
104
-        versionCode 1
105
-        versionName "1.0"
106
-    }
107
-    splits {
108
-        abi {
109
-            reset()
110
-            enable enableSeparateBuildPerCPUArchitecture
111
-            universalApk false  // If true, also generate a universal APK
112
-            include "armeabi-v7a", "x86", "arm64-v8a"
113
-        }
114
-    }
115
-    buildTypes {
116
-        release {
117
-            minifyEnabled enableProguardInReleaseBuilds
118
-            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
119
-        }
120
-    }
121
-    // applicationVariants are e.g. debug, release
122
-    applicationVariants.all { variant ->
123
-        variant.outputs.each { output ->
124
-            // For each separate APK per architecture, set a unique version code as described here:
125
-            // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
126
-            def versionCodes = ["armeabi-v7a":1, "x86":2, "arm64-v8a": 3]
127
-            def abi = output.getFilter(OutputFile.ABI)
128
-            if (abi != null) {  // null for the universal-debug, universal-release variants
129
-                output.versionCodeOverride =
130
-                        versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
131
-            }
132
-        }
133
-    }
134
-}
135
-
136
-dependencies {
137
-    implementation project(':react-native-agora')
138
-    implementation fileTree(dir: "libs", include: ["*.jar"])
139
-    implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
140
-    implementation "com.facebook.react:react-native:+"  // From node_modules
141
-}
142
-
143
-repositories {
144
-    mavenCentral()
145
-    mavenLocal()
146
-    maven {
147
-        url "$rootDir/../node_modules/react-native/android"
148
-    }
149
-    jcenter()
150
-    google()
151
-}
152
-
153
-// Run this once to be able to run the application with BUCK
154
-// puts all compile dependencies into folder libs for BUCK to use
155
-task copyDownloadableDepsToLibs(type: Copy) {
156
-    from configurations.compile
157
-    into 'libs'
158
-}

+ 0
- 19
samples/simpleDemo/android/app/build_defs.bzl Целия файл

@@ -1,19 +0,0 @@
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
-        )

+ 0
- 17
samples/simpleDemo/android/app/proguard-rules.pro Целия файл

@@ -1,17 +0,0 @@
1
-# Add project specific ProGuard rules here.
2
-# By default, the flags in this file are appended to flags specified
3
-# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
4
-# You can edit the include path and order by changing the proguardFiles
5
-# directive in build.gradle.
6
-#
7
-# For more details, see
8
-#   http://developer.android.com/guide/developing/tools/proguard.html
9
-
10
-# Add any project specific keep options here:
11
-
12
-# If your project uses WebView with JS, uncomment the following
13
-# and specify the fully qualified class name to the JavaScript interface
14
-# class:
15
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16
-#   public *;
17
-#}

+ 0
- 28
samples/simpleDemo/android/app/src/main/AndroidManifest.xml Целия файл

@@ -1,28 +0,0 @@
1
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2
-    package="com.simpledemo">
3
-
4
-    <uses-permission android:name="android.permission.INTERNET" />
5
-    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
6
-
7
-    <application
8
-      android:name=".MainApplication"
9
-      android:label="@string/app_name"
10
-      android:icon="@mipmap/ic_launcher"
11
-      android:roundIcon="@mipmap/ic_launcher_round"
12
-      android:allowBackup="true"
13
-      android:theme="@style/AppTheme"
14
-      >
15
-      <activity
16
-        android:name=".MainActivity"
17
-        android:label="@string/app_name"
18
-        android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
19
-        android:windowSoftInputMode="adjustResize">
20
-        <intent-filter>
21
-            <action android:name="android.intent.action.MAIN" />
22
-            <category android:name="android.intent.category.LAUNCHER" />
23
-        </intent-filter>
24
-      </activity>
25
-      <activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
26
-    </application>
27
-
28
-</manifest>

+ 0
- 15
samples/simpleDemo/android/app/src/main/java/com/simpledemo/MainActivity.java Целия файл

@@ -1,15 +0,0 @@
1
-package com.simpledemo;
2
-
3
-import com.facebook.react.ReactActivity;
4
-
5
-public class MainActivity extends ReactActivity {
6
-
7
-    /**
8
-     * Returns the name of the main component registered from JavaScript.
9
-     * This is used to schedule rendering of the component.
10
-     */
11
-    @Override
12
-    protected String getMainComponentName() {
13
-        return "simpleDemo";
14
-    }
15
-}

+ 0
- 47
samples/simpleDemo/android/app/src/main/java/com/simpledemo/MainApplication.java Целия файл

@@ -1,47 +0,0 @@
1
-package com.simpledemo;
2
-
3
-import android.app.Application;
4
-
5
-import com.facebook.react.ReactApplication;
6
-import com.syan.agora.AgoraPackage;
7
-import com.facebook.react.ReactNativeHost;
8
-import com.facebook.react.ReactPackage;
9
-import com.facebook.react.shell.MainReactPackage;
10
-import com.facebook.soloader.SoLoader;
11
-
12
-import java.util.Arrays;
13
-import java.util.List;
14
-
15
-public class MainApplication extends Application implements ReactApplication {
16
-
17
-  private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
18
-    @Override
19
-    public boolean getUseDeveloperSupport() {
20
-      return BuildConfig.DEBUG;
21
-    }
22
-
23
-    @Override
24
-    protected List<ReactPackage> getPackages() {
25
-      return Arrays.<ReactPackage>asList(
26
-          new MainReactPackage(),
27
-            new AgoraPackage()
28
-      );
29
-    }
30
-
31
-    @Override
32
-    protected String getJSMainModuleName() {
33
-      return "index";
34
-    }
35
-  };
36
-
37
-  @Override
38
-  public ReactNativeHost getReactNativeHost() {
39
-    return mReactNativeHost;
40
-  }
41
-
42
-  @Override
43
-  public void onCreate() {
44
-    super.onCreate();
45
-    SoLoader.init(this, /* native exopackage */ false);
46
-  }
47
-}

BIN
samples/simpleDemo/android/app/src/main/res/mipmap-hdpi/ic_launcher.png Целия файл


BIN
samples/simpleDemo/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png Целия файл


BIN
samples/simpleDemo/android/app/src/main/res/mipmap-mdpi/ic_launcher.png Целия файл


BIN
samples/simpleDemo/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png Целия файл


BIN
samples/simpleDemo/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png Целия файл


BIN
samples/simpleDemo/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png Целия файл


BIN
samples/simpleDemo/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png Целия файл


BIN
samples/simpleDemo/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png Целия файл


BIN
samples/simpleDemo/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png Целия файл


BIN
samples/simpleDemo/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png Целия файл


+ 0
- 3
samples/simpleDemo/android/app/src/main/res/values/strings.xml Целия файл

@@ -1,3 +0,0 @@
1
-<resources>
2
-    <string name="app_name">simpleDemo</string>
3
-</resources>

+ 0
- 8
samples/simpleDemo/android/app/src/main/res/values/styles.xml Целия файл

@@ -1,8 +0,0 @@
1
-<resources>
2
-
3
-    <!-- Base application theme. -->
4
-    <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
5
-        <!-- Customize your theme here. -->
6
-    </style>
7
-
8
-</resources>

+ 0
- 39
samples/simpleDemo/android/build.gradle Целия файл

@@ -1,39 +0,0 @@
1
-// Top-level build file where you can add configuration options common to all sub-projects/modules.
2
-
3
-buildscript {
4
-    ext {
5
-        buildToolsVersion = "28.0.2"
6
-        minSdkVersion = 16
7
-        compileSdkVersion = 28
8
-        targetSdkVersion = 27
9
-        supportLibVersion = "28.0.0"
10
-    }
11
-    repositories {
12
-        google()
13
-        jcenter()
14
-    }
15
-    dependencies {
16
-        classpath 'com.android.tools.build:gradle:3.2.1'
17
-
18
-        // NOTE: Do not place your application dependencies here; they belong
19
-        // in the individual module build.gradle files
20
-    }
21
-}
22
-
23
-allprojects {
24
-    repositories {
25
-        mavenLocal()
26
-        google()
27
-        jcenter()
28
-        maven {
29
-            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
30
-            url "$rootDir/../node_modules/react-native/android"
31
-        }
32
-    }
33
-}
34
-
35
-
36
-task wrapper(type: Wrapper) {
37
-    gradleVersion = '4.7'
38
-    distributionUrl = distributionUrl.replace("bin", "all")
39
-}

+ 0
- 18
samples/simpleDemo/android/gradle.properties Целия файл

@@ -1,18 +0,0 @@
1
-# Project-wide Gradle settings.
2
-
3
-# IDE (e.g. Android Studio) users:
4
-# Gradle settings configured through the IDE *will override*
5
-# any settings specified in this file.
6
-
7
-# For more details on how to configure your build environment visit
8
-# http://www.gradle.org/docs/current/userguide/build_environment.html
9
-
10
-# Specifies the JVM arguments used for the daemon process.
11
-# The setting is particularly useful for tweaking memory settings.
12
-# Default value: -Xmx10248m -XX:MaxPermSize=256m
13
-# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14
-
15
-# When configured, Gradle will run in incubating parallel mode.
16
-# This option should only be used with decoupled projects. More details, visit
17
-# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18
-# org.gradle.parallel=true

BIN
samples/simpleDemo/android/gradle/wrapper/gradle-wrapper.jar Целия файл


+ 0
- 5
samples/simpleDemo/android/gradle/wrapper/gradle-wrapper.properties Целия файл

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

+ 0
- 172
samples/simpleDemo/android/gradlew Целия файл

@@ -1,172 +0,0 @@
1
-#!/usr/bin/env sh
2
-
3
-##############################################################################
4
-##
5
-##  Gradle start up script for UN*X
6
-##
7
-##############################################################################
8
-
9
-# Attempt to set APP_HOME
10
-# Resolve links: $0 may be a link
11
-PRG="$0"
12
-# Need this for relative symlinks.
13
-while [ -h "$PRG" ] ; do
14
-    ls=`ls -ld "$PRG"`
15
-    link=`expr "$ls" : '.*-> \(.*\)$'`
16
-    if expr "$link" : '/.*' > /dev/null; then
17
-        PRG="$link"
18
-    else
19
-        PRG=`dirname "$PRG"`"/$link"
20
-    fi
21
-done
22
-SAVED="`pwd`"
23
-cd "`dirname \"$PRG\"`/" >/dev/null
24
-APP_HOME="`pwd -P`"
25
-cd "$SAVED" >/dev/null
26
-
27
-APP_NAME="Gradle"
28
-APP_BASE_NAME=`basename "$0"`
29
-
30
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31
-DEFAULT_JVM_OPTS=""
32
-
33
-# Use the maximum available, or set MAX_FD != -1 to use that value.
34
-MAX_FD="maximum"
35
-
36
-warn () {
37
-    echo "$*"
38
-}
39
-
40
-die () {
41
-    echo
42
-    echo "$*"
43
-    echo
44
-    exit 1
45
-}
46
-
47
-# OS specific support (must be 'true' or 'false').
48
-cygwin=false
49
-msys=false
50
-darwin=false
51
-nonstop=false
52
-case "`uname`" in
53
-  CYGWIN* )
54
-    cygwin=true
55
-    ;;
56
-  Darwin* )
57
-    darwin=true
58
-    ;;
59
-  MINGW* )
60
-    msys=true
61
-    ;;
62
-  NONSTOP* )
63
-    nonstop=true
64
-    ;;
65
-esac
66
-
67
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
68
-
69
-# Determine the Java command to use to start the JVM.
70
-if [ -n "$JAVA_HOME" ] ; then
71
-    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
72
-        # IBM's JDK on AIX uses strange locations for the executables
73
-        JAVACMD="$JAVA_HOME/jre/sh/java"
74
-    else
75
-        JAVACMD="$JAVA_HOME/bin/java"
76
-    fi
77
-    if [ ! -x "$JAVACMD" ] ; then
78
-        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
79
-
80
-Please set the JAVA_HOME variable in your environment to match the
81
-location of your Java installation."
82
-    fi
83
-else
84
-    JAVACMD="java"
85
-    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
86
-
87
-Please set the JAVA_HOME variable in your environment to match the
88
-location of your Java installation."
89
-fi
90
-
91
-# Increase the maximum file descriptors if we can.
92
-if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
93
-    MAX_FD_LIMIT=`ulimit -H -n`
94
-    if [ $? -eq 0 ] ; then
95
-        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
96
-            MAX_FD="$MAX_FD_LIMIT"
97
-        fi
98
-        ulimit -n $MAX_FD
99
-        if [ $? -ne 0 ] ; then
100
-            warn "Could not set maximum file descriptor limit: $MAX_FD"
101
-        fi
102
-    else
103
-        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
104
-    fi
105
-fi
106
-
107
-# For Darwin, add options to specify how the application appears in the dock
108
-if $darwin; then
109
-    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
110
-fi
111
-
112
-# For Cygwin, switch paths to Windows format before running java
113
-if $cygwin ; then
114
-    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
115
-    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
116
-    JAVACMD=`cygpath --unix "$JAVACMD"`
117
-
118
-    # We build the pattern for arguments to be converted via cygpath
119
-    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120
-    SEP=""
121
-    for dir in $ROOTDIRSRAW ; do
122
-        ROOTDIRS="$ROOTDIRS$SEP$dir"
123
-        SEP="|"
124
-    done
125
-    OURCYGPATTERN="(^($ROOTDIRS))"
126
-    # Add a user-defined pattern to the cygpath arguments
127
-    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128
-        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129
-    fi
130
-    # Now convert the arguments - kludge to limit ourselves to /bin/sh
131
-    i=0
132
-    for arg in "$@" ; do
133
-        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134
-        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
135
-
136
-        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
137
-            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138
-        else
139
-            eval `echo args$i`="\"$arg\""
140
-        fi
141
-        i=$((i+1))
142
-    done
143
-    case $i in
144
-        (0) set -- ;;
145
-        (1) set -- "$args0" ;;
146
-        (2) set -- "$args0" "$args1" ;;
147
-        (3) set -- "$args0" "$args1" "$args2" ;;
148
-        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149
-        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150
-        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151
-        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152
-        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153
-        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154
-    esac
155
-fi
156
-
157
-# Escape application args
158
-save () {
159
-    for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160
-    echo " "
161
-}
162
-APP_ARGS=$(save "$@")
163
-
164
-# Collect all arguments for the java command, following the shell quoting and substitution rules
165
-eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
166
-
167
-# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
168
-if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
169
-  cd "$(dirname "$0")"
170
-fi
171
-
172
-exec "$JAVACMD" "$@"

+ 0
- 84
samples/simpleDemo/android/gradlew.bat Целия файл

@@ -1,84 +0,0 @@
1
-@if "%DEBUG%" == "" @echo off
2
-@rem ##########################################################################
3
-@rem
4
-@rem  Gradle startup script for Windows
5
-@rem
6
-@rem ##########################################################################
7
-
8
-@rem Set local scope for the variables with windows NT shell
9
-if "%OS%"=="Windows_NT" setlocal
10
-
11
-set DIRNAME=%~dp0
12
-if "%DIRNAME%" == "" set DIRNAME=.
13
-set APP_BASE_NAME=%~n0
14
-set APP_HOME=%DIRNAME%
15
-
16
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17
-set DEFAULT_JVM_OPTS=
18
-
19
-@rem Find java.exe
20
-if defined JAVA_HOME goto findJavaFromJavaHome
21
-
22
-set JAVA_EXE=java.exe
23
-%JAVA_EXE% -version >NUL 2>&1
24
-if "%ERRORLEVEL%" == "0" goto init
25
-
26
-echo.
27
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28
-echo.
29
-echo Please set the JAVA_HOME variable in your environment to match the
30
-echo location of your Java installation.
31
-
32
-goto fail
33
-
34
-:findJavaFromJavaHome
35
-set JAVA_HOME=%JAVA_HOME:"=%
36
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37
-
38
-if exist "%JAVA_EXE%" goto init
39
-
40
-echo.
41
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42
-echo.
43
-echo Please set the JAVA_HOME variable in your environment to match the
44
-echo location of your Java installation.
45
-
46
-goto fail
47
-
48
-:init
49
-@rem Get command-line arguments, handling Windows variants
50
-
51
-if not "%OS%" == "Windows_NT" goto win9xME_args
52
-
53
-:win9xME_args
54
-@rem Slurp the command line arguments.
55
-set CMD_LINE_ARGS=
56
-set _SKIP=2
57
-
58
-:win9xME_args_slurp
59
-if "x%~1" == "x" goto execute
60
-
61
-set CMD_LINE_ARGS=%*
62
-
63
-:execute
64
-@rem Setup the command line
65
-
66
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
67
-
68
-@rem Execute Gradle
69
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
70
-
71
-:end
72
-@rem End local scope for the variables with windows NT shell
73
-if "%ERRORLEVEL%"=="0" goto mainEnd
74
-
75
-:fail
76
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
77
-rem the _cmd.exe /c_ return code!
78
-if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
79
-exit /b 1
80
-
81
-:mainEnd
82
-if "%OS%"=="Windows_NT" endlocal
83
-
84
-:omega

+ 0
- 8
samples/simpleDemo/android/keystores/BUCK Целия файл

@@ -1,8 +0,0 @@
1
-keystore(
2
-    name = "debug",
3
-    properties = "debug.keystore.properties",
4
-    store = "debug.keystore",
5
-    visibility = [
6
-        "PUBLIC",
7
-    ],
8
-)

+ 0
- 4
samples/simpleDemo/android/keystores/debug.keystore.properties Целия файл

@@ -1,4 +0,0 @@
1
-key.store=debug.keystore
2
-key.alias=androiddebugkey
3
-key.store.password=android
4
-key.alias.password=android

+ 0
- 5
samples/simpleDemo/android/settings.gradle Целия файл

@@ -1,5 +0,0 @@
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
-
5
-include ':app'

+ 0
- 4
samples/simpleDemo/app.json Целия файл

@@ -1,4 +0,0 @@
1
-{
2
-  "name": "simpleDemo",
3
-  "displayName": "simpleDemo"
4
-}

BIN
samples/simpleDemo/assets/btn_endcall.png Целия файл


BIN
samples/simpleDemo/assets/btn_mute.png Целия файл


BIN
samples/simpleDemo/assets/btn_speaker.png Целия файл


BIN
samples/simpleDemo/assets/btn_switch_camera.png Целия файл


BIN
samples/simpleDemo/assets/btn_video.png Целия файл


BIN
samples/simpleDemo/assets/disable_camera.png Целия файл


BIN
samples/simpleDemo/assets/disable_photoflash.png Целия файл


BIN
samples/simpleDemo/assets/enable_camera.png Целия файл


BIN
samples/simpleDemo/assets/enable_photoflash.png Целия файл


BIN
samples/simpleDemo/assets/icon_muted.png Целия файл


BIN
samples/simpleDemo/assets/icon_speaker.png Целия файл


+ 0
- 8
samples/simpleDemo/babel.config.js Целия файл

@@ -1,8 +0,0 @@
1
-module.exports = {
2
-  presets: ['module:metro-react-native-babel-preset'],
3
-  env: {
4
-    production: {
5
-      plugins: ['react-native-paper/babel'],
6
-    },
7
-  },
8
-};

+ 0
- 373
samples/simpleDemo/components/agora.js Целия файл

@@ -1,373 +0,0 @@
1
-import React, {Component, PureComponent} from 'react';
2
-import {
3
-  StyleSheet, Text, View, TouchableOpacity,
4
-  Image, Dimensions, Modal, Platform, NativeModules
5
-} from 'react-native';
6
-
7
-import {RtcEngine, AgoraView} from 'react-native-agora';
8
-import {
9
-  APPID,
10
-  isIphoneX, isIphoneXR
11
-} from '../utils';
12
-
13
-const {Agora} = NativeModules;
14
-
15
-if (!Agora) {
16
-  throw new Error("Agora load failed in react-native, please check ur compiler environments");
17
-}
18
-
19
-const {
20
-  FPS30,
21
-  FixedLandscape,
22
-  Host,
23
-  AudioProfileDefault,
24
-  AudioScenarioDefault,
25
-} = Agora;
26
-
27
-const BtnEndCall = () => require('../assets/btn_endcall.png');
28
-const BtnMute = () => require('../assets/btn_mute.png');
29
-const BtnSpeaker = () => require('../assets/btn_speaker.png');
30
-const BtnSwitchCamera = () => require('../assets/btn_switch_camera.png');
31
-const BtnVideo = () => require('../assets/btn_video.png');
32
-const EnableCamera = () => require('../assets/enable_camera.png');
33
-const DisableCamera = () => require('../assets/disable_camera.png');
34
-const EnablePhotoflash = () => require('../assets/enable_photoflash.png');
35
-const DisablePhotoflash = () => require('../assets/disable_photoflash.png');
36
-const IconMuted = () => require('../assets/icon_muted.png');
37
-const IconSpeaker = () => require('../assets/icon_speaker.png');
38
-
39
-const {width, height} = Dimensions.get('window');
40
-
41
-const safeTop = (top) => (isIphoneX(Platform, width, height) ?
42
-  (top + 88) :
43
-  (isIphoneXR(Platform, width, height) ? ( top + 64 ) : top)
44
-);
45
-
46
-const styles = StyleSheet.create({
47
-  container: {
48
-    flex: 1,
49
-    backgroundColor: '#F4F4F4'
50
-  },
51
-  absView: {
52
-    position: 'absolute',
53
-    top: safeTop(0),
54
-    left: 0,
55
-    right: 0,
56
-    bottom: 0,
57
-    justifyContent: 'space-between',
58
-  },
59
-  videoView: {
60
-    padding: 5,
61
-    flexWrap: 'wrap',
62
-    flexDirection: 'row',
63
-    zIndex: 100
64
-  },
65
-  localView: {
66
-    flex: 1
67
-  },
68
-  remoteView: {
69
-    width: (width - 40) / 3,
70
-    height: (width - 40) / 3,
71
-    margin: 5
72
-  },
73
-  bottomView: {
74
-    padding: 20,
75
-    flexDirection: 'row',
76
-    justifyContent: 'space-around'
77
-  }
78
-});
79
-
80
-class OperateButton extends PureComponent {
81
-  render() {
82
-    const {onPress, source, style, imgStyle = {width: 50, height: 50}} = this.props;
83
-    return (
84
-      <TouchableOpacity
85
-        style={style}
86
-        onPress={onPress}
87
-        activeOpacity={.7}
88
-      >
89
-        <Image
90
-          style={imgStyle}
91
-          source={source}
92
-        />
93
-      </TouchableOpacity>
94
-    )
95
-  }
96
-}
97
-
98
-type Props = {
99
-  channelProfile: Number,
100
-  channelName: String,
101
-  videoProfile: Number,
102
-  clientRole: Number,
103
-  onCancel: Function,
104
-  uid: Number,
105
-  showVideo: boolean,
106
-}
107
-
108
-export default class AgoraComponent extends Component<Props> {
109
-  state = {
110
-    peerIds: [],
111
-    joinSucceed: false,
112
-    isSpeak: true,
113
-    isMute: false,
114
-    isCameraTorch: false,
115
-    showVideo: true,
116
-    hideButton: false,
117
-    visible: false,
118
-    selectedUid: undefined,
119
-  };
120
-
121
-  componentWillMount () {
122
-    const config = {
123
-      appid: APPID,
124
-      channelProfile: this.props.channelProfile,
125
-      videoProfile: this.props.videoProfile,
126
-      clientRole: this.props.clientRole,
127
-      videoEncoderConfig: {
128
-        width: 360,
129
-        height: 480,
130
-        bitrate: 1,
131
-        frameRate: FPS30,
132
-        orientationMode: FixedLandscape,
133
-      },
134
-      clientRole: Host,
135
-      audioProfile: AudioProfileDefault,
136
-      audioScenario: AudioScenarioDefault
137
-    };
138
-    RtcEngine.on('firstRemoteVideoDecoded', (data) => {
139
-      console.log('[RtcEngine] onFirstRemoteVideoDecoded', data);
140
-    });
141
-    RtcEngine.on('userJoined', (data) => {
142
-      console.log('[RtcEngine] onUserJoined', data);
143
-      const {peerIds} = this.state;
144
-      if (peerIds.indexOf(data.uid) === -1) {
145
-        this.setState({
146
-          peerIds: [...peerIds, data.uid]
147
-        })
148
-      }
149
-    });
150
-    RtcEngine.on('userOffline', (data) => {
151
-      console.log('[RtcEngine] onUserOffline', data);
152
-      this.setState({
153
-          peerIds: this.state.peerIds.filter(uid => uid !== data.uid)
154
-      })
155
-    });
156
-    RtcEngine.on('joinChannelSuccess', (data) => {
157
-      console.log('[RtcEngine] onJoinChannelSuccess', data);
158
-      RtcEngine.startPreview();
159
-      this.setState({
160
-        joinSucceed: true
161
-      })
162
-    });
163
-    RtcEngine.on('audioVolumeIndication', (data) => {
164
-      console.log('[RtcEngine] onAudioVolumeIndication', data);
165
-    });
166
-    RtcEngine.on('clientRoleChanged', (data) => {
167
-      console.log("[RtcEngine] onClientRoleChanged", data);
168
-    })
169
-    RtcEngine.on('error', (data) => {
170
-      if (data.error === 17) {
171
-        RtcEngine.leaveChannel().then(_ => {
172
-          RtcEngine.destroy();
173
-          this.props.onCancel(data);
174
-        });
175
-      }
176
-    })
177
-    console.log("[CONFIG]", JSON.stringify(config));
178
-    console.log("[CONFIG.encoderConfig", config.videoEncoderConfig);
179
-    RtcEngine.init(config);
180
-  }
181
-
182
-  componentDidMount () {
183
-    RtcEngine.getSdkVersion((version) => {
184
-      console.log('[RtcEngine] getSdkVersion', version);
185
-    })
186
-
187
-    console.log('[joinChannel] ' + this.props.channelName);
188
-    RtcEngine.joinChannel(this.props.channelName, this.props.uid);
189
-    RtcEngine.enableAudioVolumeIndication(500, 3);
190
-  }
191
-
192
-  componentWillUnmount () {
193
-    if (this.state.joinSucceed) {
194
-      RtcEngine.leaveChannel();
195
-      RtcEngine.removeAllListeners();
196
-      RtcEngine.destroy();
197
-    }
198
-  }
199
-
200
-  handleCancel = () => {
201
-    RtcEngine.leaveChannel();
202
-    RtcEngine.removeAllListeners();
203
-    RtcEngine.destroy();
204
-    this.props.onCancel();
205
-  }
206
-
207
-  switchCamera = () => {
208
-    RtcEngine.switchCamera();
209
-  }
210
-
211
-  toggleAllRemoteAudioStreams = () => {
212
-    this.setState({
213
-      isMute: !this.state.isMute
214
-    }, () => {
215
-      RtcEngine.muteAllRemoteAudioStreams(this.state.isMute);
216
-    })
217
-  }
218
-
219
-  toggleSpeakerPhone = () => {
220
-    this.setState({
221
-      isSpeak: !this.state.isSpeak
222
-    }, () => {
223
-      RtcEngine.setDefaultAudioRouteToSpeakerphone(this.state.isSpeak);
224
-    })
225
-  }
226
-
227
-  toggleCameraTorch = () => {
228
-    this.setState({
229
-      isCameraTorch: !this.state.isCameraTorch
230
-    }, () => {
231
-      RtcEngine.setCameraTorchOn(this.state.isCameraTorch).then(val => {
232
-        console.log("setCameraTorch", val);
233
-      })
234
-    })
235
-  }
236
-
237
-  toggleVideo = () => {
238
-    const showVideo = !this.state.showVideo
239
-    this.setState({
240
-      showVideo
241
-    })
242
-    if (showVideo) {
243
-      RtcEngine.enableVideo()
244
-      RtcEngine.startPreview()
245
-    } else {
246
-      RtcEngine.disableVideo()
247
-      RtcEngine.stopPreview()
248
-    }
249
-  }
250
-
251
-  toggleHideButtons = () => {
252
-    this.setState({
253
-      hideButton: !this.state.hideButton
254
-    })
255
-  }
256
-
257
-  onPressVideo = (uid) => {
258
-    this.setState({
259
-      selectedUid: uid
260
-    }, () => {
261
-      this.setState({
262
-        visible: true
263
-      })
264
-    })
265
-  }
266
-
267
-  buttonsView = ({hideButton, isCameraTorch, showVideo, isMute, isSpeaker}) => {
268
-    if (!hideButton) {
269
-    return (
270
-      <View>
271
-        <OperateButton
272
-          style={{alignSelf: 'center', marginBottom: -10}}
273
-          onPress={this.handleCancel}
274
-          imgStyle={{width: 60, height: 60}}
275
-          source={BtnEndCall()}
276
-      />
277
-      <View style={styles.bottomView}>
278
-        <OperateButton
279
-          onPress={this.toggleCameraTorch}
280
-          imgStyle={{width: 40, height: 40}}
281
-          source={isCameraTorch ? EnablePhotoflash() : DisablePhotoflash()}
282
-        />
283
-        <OperateButton
284
-          onPress={this.toggleVideo}
285
-          source={showVideo ? EnableCamera() : DisableCamera()}
286
-        />
287
-      </View>
288
-      <View style={styles.bottomView}>
289
-        <OperateButton
290
-          onPress={this.toggleAllRemoteAudioStreams}
291
-          source={isMute ? IconMuted() : BtnMute()}
292
-        />
293
-        <OperateButton
294
-          onPress={this.switchCamera}
295
-          source={BtnSwitchCamera()}
296
-        />
297
-        <OperateButton
298
-          onPress={this.toggleSpeakerPhone}
299
-          source={!isSpeaker ? IconSpeaker() : BtnSpeaker()}
300
-        />
301
-      </View>
302
-      </View>)
303
-    }
304
-  }
305
-
306
-  agoraPeerViews = ({visible, peerIds}) => {
307
-    return (visible ? 
308
-    <View style={styles.videoView} /> :
309
-    <View style={styles.videoView}>{
310
-      peerIds.map((uid, key) => (
311
-      <TouchableOpacity
312
-        activeOpacity={1}
313
-        onPress={() => this.onPressVideo(uid)}
314
-        key={key}>
315
-      <AgoraView
316
-          style={styles.remoteView}
317
-          zOrderMediaOverlay={true}
318
-          remoteUid={uid}
319
-      />
320
-      </TouchableOpacity>
321
-      ))
322
-      }</View>)
323
-  }
324
-
325
-  modalView = ({visible}) => {
326
-    return (
327
-    <Modal
328
-      visible={visible}
329
-      presentationStyle={'fullScreen'}
330
-      animationType={'slide'}
331
-      onRequestClose={() => {}}
332
-      >
333
-      <TouchableOpacity
334
-        activeOpacity={1}
335
-        style={{flex: 1}}
336
-        onPress={() => this.setState({
337
-          visible: false
338
-      })} >
339
-        <AgoraView
340
-          style={{flex: 1}}
341
-          zOrderMediaOverlay={true}
342
-          remoteUid={this.state.selectedUid}
343
-        />
344
-      </TouchableOpacity>
345
-    </Modal>)
346
-  }
347
-
348
-  render () {
349
-    if (!this.state.joinSucceed) {
350
-      return (
351
-      <View style={{flex: 1, backgroundColor: '#fff', justifyContent: 'center', alignItems: 'center'}}>
352
-        <Text>Creating a video conference...</Text>
353
-      </View>
354
-      )
355
-    }
356
-
357
-    return (
358
-      <TouchableOpacity
359
-        activeOpacity={1}
360
-        onPress={this.toggleHideButtons}
361
-        style={styles.container}
362
-      >
363
-        { this.state.showVideo ? <AgoraView style={styles.localView} showLocalVideo={this.state.showVideo} /> : null}
364
-          <View style={styles.absView}>
365
-            <Text>channelName: {this.props.channelName}, peers: {this.state.peerIds.length}</Text>
366
-            {this.agoraPeerViews(this.state)}
367
-            {this.buttonsView(this.state)}
368
-          </View>
369
-        {this.modalView(this.state)}
370
-      </TouchableOpacity>
371
-    )
372
-  }
373
-}

+ 0
- 7
samples/simpleDemo/index.js Целия файл

@@ -1,7 +0,0 @@
1
-/** @format */
2
-
3
-import {AppRegistry} from 'react-native';
4
-import App from './App';
5
-import {name as appName} from './app.json';
6
-
7
-AppRegistry.registerComponent(appName, () => App);

+ 0
- 42
samples/simpleDemo/ios/Podfile Целия файл

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

+ 0
- 54
samples/simpleDemo/ios/simpleDemo-tvOS/Info.plist Целия файл

@@ -1,54 +0,0 @@
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>CFBundleDevelopmentRegion</key>
6
-	<string>en</string>
7
-	<key>CFBundleExecutable</key>
8
-	<string>$(EXECUTABLE_NAME)</string>
9
-	<key>CFBundleIdentifier</key>
10
-	<string>org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)</string>
11
-	<key>CFBundleInfoDictionaryVersion</key>
12
-	<string>6.0</string>
13
-	<key>CFBundleName</key>
14
-	<string>$(PRODUCT_NAME)</string>
15
-	<key>CFBundlePackageType</key>
16
-	<string>APPL</string>
17
-	<key>CFBundleShortVersionString</key>
18
-	<string>1.0</string>
19
-	<key>CFBundleSignature</key>
20
-	<string>????</string>
21
-	<key>CFBundleVersion</key>
22
-	<string>1</string>
23
-	<key>LSRequiresIPhoneOS</key>
24
-	<true/>
25
-	<key>UILaunchStoryboardName</key>
26
-	<string>LaunchScreen</string>
27
-	<key>UIRequiredDeviceCapabilities</key>
28
-	<array>
29
-		<string>armv7</string>
30
-	</array>
31
-	<key>UISupportedInterfaceOrientations</key>
32
-	<array>
33
-		<string>UIInterfaceOrientationPortrait</string>
34
-		<string>UIInterfaceOrientationLandscapeLeft</string>
35
-		<string>UIInterfaceOrientationLandscapeRight</string>
36
-	</array>
37
-	<key>UIViewControllerBasedStatusBarAppearance</key>
38
-	<false/>
39
-	<key>NSLocationWhenInUseUsageDescription</key>
40
-	<string></string>
41
-	<key>NSAppTransportSecurity</key>
42
-	<!--See http://ste.vn/2015/06/10/configuring-app-transport-security-ios-9-osx-10-11/ -->
43
-	<dict>
44
-		<key>NSExceptionDomains</key>
45
-		<dict>
46
-			<key>localhost</key>
47
-			<dict>
48
-				<key>NSExceptionAllowsInsecureHTTPLoads</key>
49
-				<true/>
50
-			</dict>
51
-		</dict>
52
-	</dict>
53
-</dict>
54
-</plist>

+ 0
- 24
samples/simpleDemo/ios/simpleDemo-tvOSTests/Info.plist Целия файл

@@ -1,24 +0,0 @@
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>CFBundleDevelopmentRegion</key>
6
-	<string>en</string>
7
-	<key>CFBundleExecutable</key>
8
-	<string>$(EXECUTABLE_NAME)</string>
9
-	<key>CFBundleIdentifier</key>
10
-	<string>org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)</string>
11
-	<key>CFBundleInfoDictionaryVersion</key>
12
-	<string>6.0</string>
13
-	<key>CFBundleName</key>
14
-	<string>$(PRODUCT_NAME)</string>
15
-	<key>CFBundlePackageType</key>
16
-	<string>BNDL</string>
17
-	<key>CFBundleShortVersionString</key>
18
-	<string>1.0</string>
19
-	<key>CFBundleSignature</key>
20
-	<string>????</string>
21
-	<key>CFBundleVersion</key>
22
-	<string>1</string>
23
-</dict>
24
-</plist>

+ 0
- 1753
samples/simpleDemo/ios/simpleDemo.xcodeproj/project.pbxproj
Файловите разлики са ограничени, защото са твърде много
Целия файл


+ 0
- 129
samples/simpleDemo/ios/simpleDemo.xcodeproj/xcshareddata/xcschemes/simpleDemo-tvOS.xcscheme Целия файл

@@ -1,129 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<Scheme
3
-   LastUpgradeVersion = "1010"
4
-   version = "1.3">
5
-   <BuildAction
6
-      parallelizeBuildables = "NO"
7
-      buildImplicitDependencies = "YES">
8
-      <BuildActionEntries>
9
-         <BuildActionEntry
10
-            buildForTesting = "YES"
11
-            buildForRunning = "YES"
12
-            buildForProfiling = "YES"
13
-            buildForArchiving = "YES"
14
-            buildForAnalyzing = "YES">
15
-            <BuildableReference
16
-               BuildableIdentifier = "primary"
17
-               BlueprintIdentifier = "2D2A28121D9B038B00D4039D"
18
-               BuildableName = "libReact.a"
19
-               BlueprintName = "React-tvOS"
20
-               ReferencedContainer = "container:../node_modules/react-native/React/React.xcodeproj">
21
-            </BuildableReference>
22
-         </BuildActionEntry>
23
-         <BuildActionEntry
24
-            buildForTesting = "YES"
25
-            buildForRunning = "YES"
26
-            buildForProfiling = "YES"
27
-            buildForArchiving = "YES"
28
-            buildForAnalyzing = "YES">
29
-            <BuildableReference
30
-               BuildableIdentifier = "primary"
31
-               BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
32
-               BuildableName = "simpleDemo-tvOS.app"
33
-               BlueprintName = "simpleDemo-tvOS"
34
-               ReferencedContainer = "container:simpleDemo.xcodeproj">
35
-            </BuildableReference>
36
-         </BuildActionEntry>
37
-         <BuildActionEntry
38
-            buildForTesting = "YES"
39
-            buildForRunning = "YES"
40
-            buildForProfiling = "NO"
41
-            buildForArchiving = "NO"
42
-            buildForAnalyzing = "YES">
43
-            <BuildableReference
44
-               BuildableIdentifier = "primary"
45
-               BlueprintIdentifier = "2D02E48F1E0B4A5D006451C7"
46
-               BuildableName = "simpleDemo-tvOSTests.xctest"
47
-               BlueprintName = "simpleDemo-tvOSTests"
48
-               ReferencedContainer = "container:simpleDemo.xcodeproj">
49
-            </BuildableReference>
50
-         </BuildActionEntry>
51
-      </BuildActionEntries>
52
-   </BuildAction>
53
-   <TestAction
54
-      buildConfiguration = "Debug"
55
-      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
56
-      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
57
-      shouldUseLaunchSchemeArgsEnv = "YES">
58
-      <Testables>
59
-         <TestableReference
60
-            skipped = "NO">
61
-            <BuildableReference
62
-               BuildableIdentifier = "primary"
63
-               BlueprintIdentifier = "2D02E48F1E0B4A5D006451C7"
64
-               BuildableName = "simpleDemo-tvOSTests.xctest"
65
-               BlueprintName = "simpleDemo-tvOSTests"
66
-               ReferencedContainer = "container:simpleDemo.xcodeproj">
67
-            </BuildableReference>
68
-         </TestableReference>
69
-      </Testables>
70
-      <MacroExpansion>
71
-         <BuildableReference
72
-            BuildableIdentifier = "primary"
73
-            BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
74
-            BuildableName = "simpleDemo-tvOS.app"
75
-            BlueprintName = "simpleDemo-tvOS"
76
-            ReferencedContainer = "container:simpleDemo.xcodeproj">
77
-         </BuildableReference>
78
-      </MacroExpansion>
79
-      <AdditionalOptions>
80
-      </AdditionalOptions>
81
-   </TestAction>
82
-   <LaunchAction
83
-      buildConfiguration = "Debug"
84
-      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
85
-      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
86
-      launchStyle = "0"
87
-      useCustomWorkingDirectory = "NO"
88
-      ignoresPersistentStateOnLaunch = "NO"
89
-      debugDocumentVersioning = "YES"
90
-      debugServiceExtension = "internal"
91
-      allowLocationSimulation = "YES">
92
-      <BuildableProductRunnable
93
-         runnableDebuggingMode = "0">
94
-         <BuildableReference
95
-            BuildableIdentifier = "primary"
96
-            BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
97
-            BuildableName = "simpleDemo-tvOS.app"
98
-            BlueprintName = "simpleDemo-tvOS"
99
-            ReferencedContainer = "container:simpleDemo.xcodeproj">
100
-         </BuildableReference>
101
-      </BuildableProductRunnable>
102
-      <AdditionalOptions>
103
-      </AdditionalOptions>
104
-   </LaunchAction>
105
-   <ProfileAction
106
-      buildConfiguration = "Release"
107
-      shouldUseLaunchSchemeArgsEnv = "YES"
108
-      savedToolIdentifier = ""
109
-      useCustomWorkingDirectory = "NO"
110
-      debugDocumentVersioning = "YES">
111
-      <BuildableProductRunnable
112
-         runnableDebuggingMode = "0">
113
-         <BuildableReference
114
-            BuildableIdentifier = "primary"
115
-            BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
116
-            BuildableName = "simpleDemo-tvOS.app"
117
-            BlueprintName = "simpleDemo-tvOS"
118
-            ReferencedContainer = "container:simpleDemo.xcodeproj">
119
-         </BuildableReference>
120
-      </BuildableProductRunnable>
121
-   </ProfileAction>
122
-   <AnalyzeAction
123
-      buildConfiguration = "Debug">
124
-   </AnalyzeAction>
125
-   <ArchiveAction
126
-      buildConfiguration = "Release"
127
-      revealArchiveInOrganizer = "YES">
128
-   </ArchiveAction>
129
-</Scheme>

+ 0
- 129
samples/simpleDemo/ios/simpleDemo.xcodeproj/xcshareddata/xcschemes/simpleDemo.xcscheme Целия файл

@@ -1,129 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<Scheme
3
-   LastUpgradeVersion = "1010"
4
-   version = "1.3">
5
-   <BuildAction
6
-      parallelizeBuildables = "NO"
7
-      buildImplicitDependencies = "YES">
8
-      <BuildActionEntries>
9
-         <BuildActionEntry
10
-            buildForTesting = "YES"
11
-            buildForRunning = "YES"
12
-            buildForProfiling = "YES"
13
-            buildForArchiving = "YES"
14
-            buildForAnalyzing = "YES">
15
-            <BuildableReference
16
-               BuildableIdentifier = "primary"
17
-               BlueprintIdentifier = "83CBBA2D1A601D0E00E9B192"
18
-               BuildableName = "libReact.a"
19
-               BlueprintName = "React"
20
-               ReferencedContainer = "container:../node_modules/react-native/React/React.xcodeproj">
21
-            </BuildableReference>
22
-         </BuildActionEntry>
23
-         <BuildActionEntry
24
-            buildForTesting = "YES"
25
-            buildForRunning = "YES"
26
-            buildForProfiling = "YES"
27
-            buildForArchiving = "YES"
28
-            buildForAnalyzing = "YES">
29
-            <BuildableReference
30
-               BuildableIdentifier = "primary"
31
-               BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
32
-               BuildableName = "simpleDemo.app"
33
-               BlueprintName = "simpleDemo"
34
-               ReferencedContainer = "container:simpleDemo.xcodeproj">
35
-            </BuildableReference>
36
-         </BuildActionEntry>
37
-         <BuildActionEntry
38
-            buildForTesting = "YES"
39
-            buildForRunning = "YES"
40
-            buildForProfiling = "NO"
41
-            buildForArchiving = "NO"
42
-            buildForAnalyzing = "YES">
43
-            <BuildableReference
44
-               BuildableIdentifier = "primary"
45
-               BlueprintIdentifier = "00E356ED1AD99517003FC87E"
46
-               BuildableName = "simpleDemoTests.xctest"
47
-               BlueprintName = "simpleDemoTests"
48
-               ReferencedContainer = "container:simpleDemo.xcodeproj">
49
-            </BuildableReference>
50
-         </BuildActionEntry>
51
-      </BuildActionEntries>
52
-   </BuildAction>
53
-   <TestAction
54
-      buildConfiguration = "Debug"
55
-      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
56
-      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
57
-      shouldUseLaunchSchemeArgsEnv = "YES">
58
-      <Testables>
59
-         <TestableReference
60
-            skipped = "NO">
61
-            <BuildableReference
62
-               BuildableIdentifier = "primary"
63
-               BlueprintIdentifier = "00E356ED1AD99517003FC87E"
64
-               BuildableName = "simpleDemoTests.xctest"
65
-               BlueprintName = "simpleDemoTests"
66
-               ReferencedContainer = "container:simpleDemo.xcodeproj">
67
-            </BuildableReference>
68
-         </TestableReference>
69
-      </Testables>
70
-      <MacroExpansion>
71
-         <BuildableReference
72
-            BuildableIdentifier = "primary"
73
-            BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
74
-            BuildableName = "simpleDemo.app"
75
-            BlueprintName = "simpleDemo"
76
-            ReferencedContainer = "container:simpleDemo.xcodeproj">
77
-         </BuildableReference>
78
-      </MacroExpansion>
79
-      <AdditionalOptions>
80
-      </AdditionalOptions>
81
-   </TestAction>
82
-   <LaunchAction
83
-      buildConfiguration = "Debug"
84
-      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
85
-      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
86
-      launchStyle = "0"
87
-      useCustomWorkingDirectory = "NO"
88
-      ignoresPersistentStateOnLaunch = "NO"
89
-      debugDocumentVersioning = "YES"
90
-      debugServiceExtension = "internal"
91
-      allowLocationSimulation = "YES">
92
-      <BuildableProductRunnable
93
-         runnableDebuggingMode = "0">
94
-         <BuildableReference
95
-            BuildableIdentifier = "primary"
96
-            BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
97
-            BuildableName = "simpleDemo.app"
98
-            BlueprintName = "simpleDemo"
99
-            ReferencedContainer = "container:simpleDemo.xcodeproj">
100
-         </BuildableReference>
101
-      </BuildableProductRunnable>
102
-      <AdditionalOptions>
103
-      </AdditionalOptions>
104
-   </LaunchAction>
105
-   <ProfileAction
106
-      buildConfiguration = "Release"
107
-      shouldUseLaunchSchemeArgsEnv = "YES"
108
-      savedToolIdentifier = ""
109
-      useCustomWorkingDirectory = "NO"
110
-      debugDocumentVersioning = "YES">
111
-      <BuildableProductRunnable
112
-         runnableDebuggingMode = "0">
113
-         <BuildableReference
114
-            BuildableIdentifier = "primary"
115
-            BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
116
-            BuildableName = "simpleDemo.app"
117
-            BlueprintName = "simpleDemo"
118
-            ReferencedContainer = "container:simpleDemo.xcodeproj">
119
-         </BuildableReference>
120
-      </BuildableProductRunnable>
121
-   </ProfileAction>
122
-   <AnalyzeAction
123
-      buildConfiguration = "Debug">
124
-   </AnalyzeAction>
125
-   <ArchiveAction
126
-      buildConfiguration = "Release"
127
-      revealArchiveInOrganizer = "YES">
128
-   </ArchiveAction>
129
-</Scheme>

+ 0
- 14
samples/simpleDemo/ios/simpleDemo/AppDelegate.h Целия файл

@@ -1,14 +0,0 @@
1
-/**
2
- * Copyright (c) Facebook, Inc. and its affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
-
8
-#import <UIKit/UIKit.h>
9
-
10
-@interface AppDelegate : UIResponder <UIApplicationDelegate>
11
-
12
-@property (nonatomic, strong) UIWindow *window;
13
-
14
-@end

+ 0
- 35
samples/simpleDemo/ios/simpleDemo/AppDelegate.m Целия файл

@@ -1,35 +0,0 @@
1
-/**
2
- * Copyright (c) Facebook, Inc. and its affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
-
8
-#import "AppDelegate.h"
9
-
10
-#import <React/RCTBundleURLProvider.h>
11
-#import <React/RCTRootView.h>
12
-
13
-@implementation AppDelegate
14
-
15
-- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
16
-{
17
-  NSURL *jsCodeLocation;
18
-
19
-  jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
20
-
21
-  RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
22
-                                                      moduleName:@"simpleDemo"
23
-                                               initialProperties:nil
24
-                                                   launchOptions:launchOptions];
25
-  rootView.backgroundColor = [UIColor blackColor];
26
-
27
-  self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
28
-  UIViewController *rootViewController = [UIViewController new];
29
-  rootViewController.view = rootView;
30
-  self.window.rootViewController = rootViewController;
31
-  [self.window makeKeyAndVisible];
32
-  return YES;
33
-}
34
-
35
-@end

+ 0
- 42
samples/simpleDemo/ios/simpleDemo/Base.lproj/LaunchScreen.xib Целия файл

@@ -1,42 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7702" systemVersion="14D136" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
3
-    <dependencies>
4
-        <deployment identifier="iOS"/>
5
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7701"/>
6
-        <capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
7
-    </dependencies>
8
-    <objects>
9
-        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
10
-        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
11
-        <view contentMode="scaleToFill" id="iN0-l3-epB">
12
-            <rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
13
-            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
14
-            <subviews>
15
-                <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Powered by React Native" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
16
-                    <rect key="frame" x="20" y="439" width="441" height="21"/>
17
-                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
18
-                    <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
19
-                    <nil key="highlightedColor"/>
20
-                </label>
21
-                <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="simpleDemo" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
22
-                    <rect key="frame" x="20" y="140" width="441" height="43"/>
23
-                    <fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
24
-                    <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
25
-                    <nil key="highlightedColor"/>
26
-                </label>
27
-            </subviews>
28
-            <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
29
-            <constraints>
30
-                <constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/>
31
-                <constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/>
32
-                <constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/>
33
-                <constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/>
34
-                <constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/>
35
-                <constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/>
36
-            </constraints>
37
-            <nil key="simulatedStatusBarMetrics"/>
38
-            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
39
-            <point key="canvasLocation" x="548" y="455"/>
40
-        </view>
41
-    </objects>
42
-</document>

+ 0
- 53
samples/simpleDemo/ios/simpleDemo/Images.xcassets/AppIcon.appiconset/Contents.json Целия файл

@@ -1,53 +0,0 @@
1
-{
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
-    {
14
-      "idiom" : "iphone",
15
-      "size" : "29x29",
16
-      "scale" : "2x"
17
-    },
18
-    {
19
-      "idiom" : "iphone",
20
-      "size" : "29x29",
21
-      "scale" : "3x"
22
-    },
23
-    {
24
-      "idiom" : "iphone",
25
-      "size" : "40x40",
26
-      "scale" : "2x"
27
-    },
28
-    {
29
-      "idiom" : "iphone",
30
-      "size" : "40x40",
31
-      "scale" : "3x"
32
-    },
33
-    {
34
-      "idiom" : "iphone",
35
-      "size" : "60x60",
36
-      "scale" : "2x"
37
-    },
38
-    {
39
-      "idiom" : "iphone",
40
-      "size" : "60x60",
41
-      "scale" : "3x"
42
-    },
43
-    {
44
-      "idiom" : "ios-marketing",
45
-      "size" : "1024x1024",
46
-      "scale" : "1x"
47
-    }
48
-  ],
49
-  "info" : {
50
-    "version" : 1,
51
-    "author" : "xcode"
52
-  }
53
-}

+ 0
- 6
samples/simpleDemo/ios/simpleDemo/Images.xcassets/Contents.json Целия файл

@@ -1,6 +0,0 @@
1
-{
2
-  "info" : {
3
-    "version" : 1,
4
-    "author" : "xcode"
5
-  }
6
-}

+ 0
- 65
samples/simpleDemo/ios/simpleDemo/Info.plist Целия файл

@@ -1,65 +0,0 @@
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>CFBundleDevelopmentRegion</key>
6
-	<string>en</string>
7
-	<key>CFBundleDisplayName</key>
8
-	<string>simpleDemo</string>
9
-	<key>CFBundleExecutable</key>
10
-	<string>$(EXECUTABLE_NAME)</string>
11
-	<key>CFBundleIdentifier</key>
12
-	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
13
-	<key>CFBundleInfoDictionaryVersion</key>
14
-	<string>6.0</string>
15
-	<key>CFBundleName</key>
16
-	<string>$(PRODUCT_NAME)</string>
17
-	<key>CFBundlePackageType</key>
18
-	<string>APPL</string>
19
-	<key>CFBundleShortVersionString</key>
20
-	<string>1.0</string>
21
-	<key>CFBundleSignature</key>
22
-	<string>????</string>
23
-	<key>CFBundleVersion</key>
24
-	<string>1</string>
25
-	<key>LSRequiresIPhoneOS</key>
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 avc</string>
42
-	<key>NSLocationWhenInUseUsageDescription</key>
43
-	<string></string>
44
-	<key>NSMicrophoneUsageDescription</key>
45
-	<string>use microphone for avc sdk</string>
46
-	<key>UIBackgroundModes</key>
47
-	<array>
48
-		<string>audio</string>
49
-	</array>
50
-	<key>UILaunchStoryboardName</key>
51
-	<string>LaunchScreen</string>
52
-	<key>UIRequiredDeviceCapabilities</key>
53
-	<array>
54
-		<string>armv7</string>
55
-	</array>
56
-	<key>UISupportedInterfaceOrientations</key>
57
-	<array>
58
-		<string>UIInterfaceOrientationPortrait</string>
59
-		<string>UIInterfaceOrientationLandscapeLeft</string>
60
-		<string>UIInterfaceOrientationLandscapeRight</string>
61
-	</array>
62
-	<key>UIViewControllerBasedStatusBarAppearance</key>
63
-	<false/>
64
-</dict>
65
-</plist>

+ 0
- 16
samples/simpleDemo/ios/simpleDemo/main.m Целия файл

@@ -1,16 +0,0 @@
1
-/**
2
- * Copyright (c) Facebook, Inc. and its affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
-
8
-#import <UIKit/UIKit.h>
9
-
10
-#import "AppDelegate.h"
11
-
12
-int main(int argc, char * argv[]) {
13
-  @autoreleasepool {
14
-    return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15
-  }
16
-}

+ 0
- 24
samples/simpleDemo/ios/simpleDemoTests/Info.plist Целия файл

@@ -1,24 +0,0 @@
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>CFBundleDevelopmentRegion</key>
6
-	<string>en</string>
7
-	<key>CFBundleExecutable</key>
8
-	<string>$(EXECUTABLE_NAME)</string>
9
-	<key>CFBundleIdentifier</key>
10
-	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
11
-	<key>CFBundleInfoDictionaryVersion</key>
12
-	<string>6.0</string>
13
-	<key>CFBundleName</key>
14
-	<string>$(PRODUCT_NAME)</string>
15
-	<key>CFBundlePackageType</key>
16
-	<string>BNDL</string>
17
-	<key>CFBundleShortVersionString</key>
18
-	<string>1.0</string>
19
-	<key>CFBundleSignature</key>
20
-	<string>????</string>
21
-	<key>CFBundleVersion</key>
22
-	<string>1</string>
23
-</dict>
24
-</plist>

+ 0
- 68
samples/simpleDemo/ios/simpleDemoTests/simpleDemoTests.m Целия файл

@@ -1,68 +0,0 @@
1
-/**
2
- * Copyright (c) Facebook, Inc. and its affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
-
8
-#import <UIKit/UIKit.h>
9
-#import <XCTest/XCTest.h>
10
-
11
-#import <React/RCTLog.h>
12
-#import <React/RCTRootView.h>
13
-
14
-#define TIMEOUT_SECONDS 600
15
-#define TEXT_TO_LOOK_FOR @"Welcome to React Native!"
16
-
17
-@interface simpleDemoTests : XCTestCase
18
-
19
-@end
20
-
21
-@implementation simpleDemoTests
22
-
23
-- (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test
24
-{
25
-  if (test(view)) {
26
-    return YES;
27
-  }
28
-  for (UIView *subview in [view subviews]) {
29
-    if ([self findSubviewInView:subview matching:test]) {
30
-      return YES;
31
-    }
32
-  }
33
-  return NO;
34
-}
35
-
36
-- (void)testRendersWelcomeScreen
37
-{
38
-  UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController];
39
-  NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
40
-  BOOL foundElement = NO;
41
-
42
-  __block NSString *redboxError = nil;
43
-  RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) {
44
-    if (level >= RCTLogLevelError) {
45
-      redboxError = message;
46
-    }
47
-  });
48
-
49
-  while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) {
50
-    [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
51
-    [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
52
-
53
-    foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) {
54
-      if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) {
55
-        return YES;
56
-      }
57
-      return NO;
58
-    }];
59
-  }
60
-
61
-  RCTSetLogFunction(RCTDefaultLogFunction);
62
-
63
-  XCTAssertNil(redboxError, @"RedBox error: %@", redboxError);
64
-  XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS);
65
-}
66
-
67
-
68
-@end

+ 0
- 27
samples/simpleDemo/package.json Целия файл

@@ -1,27 +0,0 @@
1
-{
2
-  "name": "simpleDemo",
3
-  "version": "0.0.1",
4
-  "private": true,
5
-  "scripts": {
6
-    "start": "node node_modules/react-native/local-cli/cli.js start",
7
-    "ios": "react-native run-ios && react-native log-ios",
8
-    "android": "react-native run-android && react-native log-android",
9
-    "bundle-android": "react-native bundle --entry-file index.js --bundle-output android/app/build/generated/assets/react/release/index.android.bundle --platform android --assets-dest android/app/src/main/res --dev false",
10
-    "build-android": "cd android && ./gradlew assembleRelease",
11
-    "test": "jest"
12
-  },
13
-  "dependencies": {
14
-    "react": "16.7.0",
15
-    "react-native": "0.58.3",
16
-    "react-native-agora": "file:../.."
17
-  },
18
-  "devDependencies": {
19
-    "babel-jest": "23.6.0",
20
-    "jest": "23.6.0",
21
-    "metro-react-native-babel-preset": "0.51.1",
22
-    "react-test-renderer": "16.6.3"
23
-  },
24
-  "jest": {
25
-    "preset": "react-native"
26
-  }
27
-}

+ 0
- 26
samples/simpleDemo/utils.js Целия файл

@@ -1,26 +0,0 @@
1
-export const APPID = 'Your Agora APP_ID'; //'Your Agora APP_ID'
2
-// iPhoneX Xs
3
-const X_WIDTH = 375;
4
-const X_HEIGHT = 812;
5
-
6
-// iPhoneXR XsMax
7
-const XR_WIDTH = 414;
8
-const XR_HEIGHT = 896;
9
-
10
-//判断是否为iphoneX或Xs
11
-export function isIphoneX(Platform, SCREEN_WIDTH, SCREEN_HEIGHT) {
12
-    return (
13
-        Platform.OS === 'ios' &&
14
-        ((SCREEN_HEIGHT === X_HEIGHT && SCREEN_WIDTH === X_WIDTH) ||
15
-        (SCREEN_HEIGHT === X_WIDTH && SCREEN_WIDTH === X_HEIGHT))
16
-    )
17
-};
18
-
19
-//判断是否为iphoneXR或XsMAX
20
-export function isIphoneXR(Platform, SCREEN_WIDTH, SCREEN_HEIGHT) {
21
-    return (
22
-        Platform.OS === 'ios' &&
23
-        ((SCREEN_HEIGHT === XR_HEIGHT && SCREEN_WIDTH === XR_WIDTH) ||
24
-        (SCREEN_HEIGHT === XR_WIDTH && SCREEN_WIDTH === XR_HEIGHT))
25
-    )
26
-};

+ 0
- 6759
samples/simpleDemo/yarn.lock
Файловите разлики са ограничени, защото са твърде много
Целия файл