matrixbirds 6 年 前
コミット
c53283e0e5

+ 3
- 0
.gitignore ファイルの表示

@@ -52,3 +52,6 @@ fastlane/report.xml
52 52
 fastlane/Preview.html
53 53
 fastlane/screenshots
54 54
 android/src/main/res/drawable/
55
+**/*.*~
56
+**/*.swp
57
+**/*.~

+ 4
- 49
README.md ファイルの表示

@@ -26,56 +26,11 @@ Either way, then link with:
26 26
 
27 27
  `react-native link react-native-agora`
28 28
 
29
-#### iOS
30
-
31
-TARGETS->Build Phases-> Link Binary With Libaries中点击“+”按钮,选择
32
-
33
-    libresolv.tbd
34
-    libc++.tbd
35
-    AVFoundation.framework
36
-    AudioToolbox.framework
37
-    VideoToolbox.framework
38
-    CoreMotion.framework
39
-    CoreMedia.framework
40
-    CoreTelephony.framework
41
-
42
-TARGETS->Build Phases-> Link Binary With Libaries中点击“+”按钮,在弹出的窗口中点击“Add Other”按钮,选择
43
-
44
-    node_modules/react-native-agora/ios/RCTAgora/libs/libcrypto.a
45
-    node_modules/react-native-agora/ios/RCTAgora/libs/AgoraRtcCryptoLoader.framework
46
-    node_modules/react-native-agora/ios/RCTAgora/libs/AgoraRtcEngineKit.framework
47
-
48
-TARGETS->Build Settings->Search Paths->Framework Search Paths添加
49
-
50
-    "$(SRCROOT)/../node_modules/react-native-agora/ios/RCTAgora/libs"
51
-
52
-TARGETS->Build Settings->Search Paths->Library Search Paths添加
53
-
54
-    "$(SRCROOT)/../node_modules/react-native-agora/ios/RCTAgora/libs"
55
-
56
-TARGETS->Build Settings->Enable Bitcode设置为No
57
-
58
-TARGETS->Capabilities->Background Modes->Modes勾选Audio,AirPlay,and Picture In Picture
59
-
60
-项目目录->Info.plist->增加2项
61
-
62
-    "Privacy - Camera Usage Description":"use camera to start video call"
63
-    "Privacy - Microphone Usage Description":"use microphone to start video call"
64
-
65
-
66
-#### Android
67
-
68
-Add following to `AndroidManifest.xml`
69
-
70
-    <uses-permission android:name="android.permission.RECORD_AUDIO" />
71
-    <uses-permission android:name="android.permission.CAMERA" />
72
-    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
73
-    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
74
-
75
-当您在写混淆代码时,请添加以下代码:
76
-
77
-    -keep class io.agora.**{*;}
29
+### [iOS Installation](docs/IOS_INSTALLATION.md)
30
+### [iOS 开发环境安装指南](docs/IOS_INSTALLATION.zh.md)
78 31
 
32
+### [Android Installation](docs/ANDROID_INSTALLATION.md)
33
+### [Android 开发环境安装指南](docs/ANDROID_INSTALLATION.zh.md)
79 34
 
80 35
 ## Documentation
81 36
 

+ 0
- 0
docs/.keeps ファイルの表示


+ 18
- 0
docs/ANDROID_INSTALLATION.md ファイルの表示

@@ -0,0 +1,18 @@
1
+# Android Installation
2
+
3
+# Prerequisites
4
+* Android SDK
5
+* Android Studio
6
+
7
+# Step 1. Add `AndroidManifest.xml`
8
+```xml
9
+<uses-permission android:name="android.permission.RECORD_AUDIO" />
10
+<uses-permission android:name="android.permission.CAMERA" />
11
+<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
12
+<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
13
+```
14
+
15
+# Obfuscation Code Edit `android/proguard-rules.pro`
16
+```java
17
+-keep class io.agora.**{*;}
18
+```

+ 18
- 0
docs/ANDROID_INSTALLATION.zh.md ファイルの表示

@@ -0,0 +1,18 @@
1
+# Android 开发搭建指南
2
+
3
+# 环境准备
4
+* Android SDK
5
+* Android Studio
6
+
7
+# Step 1. 新增 `AndroidManifest.xml`
8
+```xml
9
+<uses-permission android:name="android.permission.RECORD_AUDIO" />
10
+<uses-permission android:name="android.permission.CAMERA" />
11
+<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
12
+<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
13
+```
14
+
15
+# 当您在写混淆代码时,请在``添加以下代码:
16
+```script
17
+    -keep class io.agora.**{*;}
18
+```

+ 61
- 0
docs/IOS_INSTALLATION.md ファイルの表示

@@ -0,0 +1,61 @@
1
+# iOS Installation
2
+
3
+# Prerequisites
4
+* You should installed and linked `react-native-agora`
5
+* Xcode 10.0+
6
+
7
+# Step 1. Open Project in Xcode
8
+Open `ios/projectName.xcodeproj` with XCode
9
+![Step 1](./IOS_INSTALLATION/1.1_Open_iOS_ProjectFile.png)
10
+# Step 2. Add Link Binary With Libraries 
11
+Build Phases -> Link Binary With Libraries -> +
12
+![Step 2](./IOS_INSTALLATION/1.2_LinkBinaryWithLibraries.png)
13
+
14
+    libresolv.tbd
15
+    libc++.tbd
16
+    AVFoundation.framework
17
+    AudioToolbox.framework
18
+    VideoToolbox.framework
19
+    CoreMotion.framework
20
+    CoreMedia.framework
21
+    CoreTelephony.framework
22
+
23
+
24
+# Step 3. Add Other Link Binary With Libraries From `node_modules`
25
+Build Phases -> Link Binary With Libraries -> + -> Add Other
26
+![Step 3](./IOS_INSTALLATION/1.3_Add_Other_Libraries.png)
27
+
28
+    node_modules/react-native-agora/ios/RCTAgora/libs/libcrypto.a
29
+    node_modules/react-native-agora/ios/RCTAgora/libs/AgoraRtcCryptoLoader.framework
30
+    node_modules/react-native-agora/ios/RCTAgora/libs/AgoraRtcEngineKit.framework
31
+
32
+
33
+# Step 4. Add Framework Search Paths
34
+Build Settings -> Framework Search Paths -> + 
35
+![Step 4](./IOS_INSTALLATION/1.4_Add_Framework_Search_Paths.png)
36
+"$(SRCROOT)/../node_modules/react-native-agora/ios/RCTAgora/libs"
37
+
38
+
39
+# Step 5. Add Library Search Paths
40
+Build Settings -> Library Search Paths -> + 
41
+![Step 5](./IOS_INSTALLATION/1.5_Add_Library_Search_Paths.png)
42
+
43
+"$(SRCROOT)/../node_modules/react-native-agora/ios/RCTAgora/libs"
44
+
45
+
46
+# Step 6. Set Build Settings Enable Bitcode No
47
+Build Settings -> Enable Bitcode -> ...
48
+![Step 6](./IOS_INSTALLATION/1.6_Set_Build_Settings_Enable_Bitcode_No.png)
49
+
50
+# Step 7. Set Capabilities Background Modes
51
+Capabilities -> Background Modes -> Audio, Airplay, and Picture in Picture
52
+![Step 7](./IOS_INSTALLATION/1.7_Set_Capabilities_Background_Modes.png)
53
+
54
+# Step 8.1 Set info.plist
55
+Change info.plist  
56
+"Privacy - Camera Usage Description":"use camera to start video call"  
57
+"Privacy - Microphone Usage Description":"use microphone to start video call"  
58
+
59
+![Step 8.1](./IOS_INSTALLATION/1.8.1_Set_info_plist.png)
60
+
61
+![Step 8.2](./IOS_INSTALLATION/1.8.2_Set_camera_and_microphone.png)

+ 57
- 0
docs/IOS_INSTALLATION.zh.md ファイルの表示

@@ -0,0 +1,57 @@
1
+# iOS 开发搭建指南
2
+
3
+# 环境
4
+* 请先在项目里安装 `react-native-agora` & `react-native link react-native-agora`
5
+* Xcode 10.0+
6
+
7
+# Step 1. 使用Xcode打开ios项目
8
+用Xcode打开RN项目里的`ios/RN项目.xcodeproj`文件
9
+![Step 1](./IOS_INSTALLATION/1.1_Open_iOS_ProjectFile.png)
10
+# Step 2. 添加如下的链接库到Xcode工程
11
+选择 Build Phases -> Link Binary With Libraries -> +
12
+![Step 2](./IOS_INSTALLATION/1.2_LinkBinaryWithLibraries.png)
13
+
14
+    libresolv.tbd
15
+    libc++.tbd
16
+    AVFoundation.framework
17
+    AudioToolbox.framework
18
+    VideoToolbox.framework
19
+    CoreMotion.framework
20
+    CoreMedia.framework
21
+    CoreTelephony.framework
22
+# Step 3. 添加node_modules库到Xcode工程
23
+选择 Build Phases-> Link Binary With Libaries中点击“+”按钮,在弹出的窗口中点击“Add Other”按钮,选择
24
+![Step 3](./IOS_INSTALLATION/1.3_Add_Other_Libraries.png)
25
+
26
+    node_modules/react-native-agora/ios/RCTAgora/libs/libcrypto.a
27
+    node_modules/react-native-agora/ios/RCTAgora/libs/AgoraRtcCryptoLoader.framework
28
+    node_modules/react-native-agora/ios/RCTAgora/libs/AgoraRtcEngineKit.framework
29
+
30
+# Step 4. 添加Framework Search Paths
31
+选择 Build Settings->Search Paths->Framework Search Paths添加
32
+"$(SRCROOT)/../node_modules/react-native-agora/ios/RCTAgora/libs"
33
+![Step 4](./IOS_INSTALLATION/1.4_Add_Framework_Search_Paths.png)
34
+
35
+# Step 5. 添加Library Search Paths
36
+选择 Build Settings->Search Paths->Library Search Paths添加
37
+"$(SRCROOT)/../node_modules/react-native-agora/ios/RCTAgora/libs"
38
+![Step 5](./IOS_INSTALLATION/1.5_Add_Library_Search_Paths.png)
39
+
40
+
41
+# Step 6. 设置Build Settings Enable Bitcode No
42
+选择 Build Settings->Enable Bitcode设置为No
43
+![Step 6](./IOS_INSTALLATION/1.6_Set_Build_Settings_Enable_Bitcode_No.png)
44
+
45
+# Step 7. 设置Capabilities Background Modes
46
+选择 Capabilities->Background Modes->Modes勾选Audio,AirPlay,and Picture In Picture
47
+![Step 7](./IOS_INSTALLATION/1.7_Set_Capabilities_Background_Modes.png)
48
+
49
+# Step 8.1 设置info.plist
50
+修改info.plist
51
+新增2项:  
52
+"Privacy - Camera Usage Description":"use camera to start video call"  
53
+"Privacy - Microphone Usage Description":"use microphone to start video call"
54
+
55
+![Step 8.1](./IOS_INSTALLATION/1.8.1_Set_info_plist.png)
56
+
57
+![Step 8.2](./IOS_INSTALLATION/1.8.2_Set_camera_and_microphone.png)

バイナリ
docs/IOS_INSTALLATION/1.1_Open_iOS_ProjectFile.png ファイルの表示


バイナリ
docs/IOS_INSTALLATION/1.2_LinkBinaryWithLibraries.png ファイルの表示


バイナリ
docs/IOS_INSTALLATION/1.3_Add_Other_Libraries.png ファイルの表示


バイナリ
docs/IOS_INSTALLATION/1.4_Add_Framework_Search_Paths.png ファイルの表示


バイナリ
docs/IOS_INSTALLATION/1.5_Add_Library_Search_Paths.png ファイルの表示


バイナリ
docs/IOS_INSTALLATION/1.6_Set_Build_Settings_Enable_Bitcode_No.png ファイルの表示


バイナリ
docs/IOS_INSTALLATION/1.7_Set_Capabilities_Background_Modes.png ファイルの表示


バイナリ
docs/IOS_INSTALLATION/1.8.1_Set_info_plist.png ファイルの表示


バイナリ
docs/IOS_INSTALLATION/1.8.2_Set_camera_and_microphone.png ファイルの表示