Skip to content

Commit 80fa998

Browse files
author
Xia Ning
committed
fix macOS engine context issue. make sure destroy engine when switching examples
update readme file, add token related information
1 parent b92fd1c commit 80fa998

23 files changed

Lines changed: 163 additions & 1 deletion

File tree

Android/APIExample/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ To build and run the sample application, get an App Id:
2323
3. Save the **App Id** from the Dashboard for later use.
2424
4. Generate a temp **Access Token** (valid for 24 hours) from dashboard page with given channel name, save for later use.
2525

26-
5. Open `Android/APIExample` and edit the `app/src/main/res/values/string-config.xml` file. Update `<#Your App Id#>` with your App Id, and change `<#Temp Access Token#>` with the temp Access Token generated from dashboard. Note you can leave the token variable `null` if your project has not turned on security token.
26+
5. Open `Android/APIExample` and edit the `app/src/main/res/values/string_config.xml` file. Update `<#Your App Id#>` with your App Id, and change `<#Temp Access Token#>` with the temp Access Token generated from dashboard. Note you can leave the token variable `null` if your project has not turned on security token.
2727

2828
```
2929
<string name="agora_app_id" translatable="false">YOUR APP ID</string>
@@ -33,6 +33,10 @@ To build and run the sample application, get an App Id:
3333
3434
You are all set. Now connect your Android device and run the project.
3535
36+
> To ensure communication security, Agora uses tokens (dynamic keys) to authenticate users joining a channel.
37+
>
38+
> Temporary tokens are for demonstration and testing purposes only and remain valid for 24 hours. In a production environment, you need to deploy your own server for generating tokens. See [Generate a Token](https://docs.agora.io/en/Interactive Broadcast/token_server)for details.
39+
3640
## Contact Us
3741
3842
- For potential issues, take a look at our [FAQ](https://docs.agora.io/en/faq) first

iOS/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ To build and run the sample application, get an App Id:
5353

5454
You are all set. Now connect your iPhone or iPad device and run the project.
5555

56+
> To ensure communication security, Agora uses tokens (dynamic keys) to authenticate users joining a channel.
57+
>
58+
> Temporary tokens are for demonstration and testing purposes only and remain valid for 24 hours. In a production environment, you need to deploy your own server for generating tokens. See [Generate a Token](https://docs.agora.io/en/Interactive Broadcast/token_server)for details.
59+
5660
## Contact Us
5761

5862
- For potential issues, take a look at our [FAQ](https://docs.agora.io/en/faq) first

iOS/README.zh.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ pod install
5050
5151
然后你就可以使用 `APIExample.xcworkspace` 编译并运行项目了。
5252
53+
>为提高项目的安全性,Agora 使用 Token(动态密钥)对即将加入频道的用户进行鉴权。
54+
>
55+
>临时 Token 仅作为演示和测试用途。在生产环境中,你需要自行部署服务器签发 Token,详见[生成 Token](https://docs.agora.io/cn/Interactive Broadcast/token_server)。
56+
5357
## 联系我们
5458
5559
- 如果你遇到了困难,可以先参阅 [常见问题](https://docs.agora.io/cn/faq)

macOS/APIExample/Examples/Advanced/AudioMixing/AudioMixing.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,7 @@ class AudioMixing: BaseViewController {
363363
LogUtils.log(message: "Left channel", level: .info)
364364
}
365365
}
366+
AgoraRtcEngineKit.destroy()
366367
}
367368

368369
@IBAction func onJoinPressed(_ sender:Any) {

macOS/APIExample/Examples/Advanced/ChannelMediaRelay/ChannelMediaRelay.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ class ChannelMediaRelay: BaseViewController {
117117
LogUtils.log(message: "Left channel", level: .info)
118118
}
119119
}
120+
AgoraRtcEngineKit.destroy()
120121
}
121122

122123
@IBAction func onJoinPressed(_ sender:Any) {

macOS/APIExample/Examples/Advanced/CreateDataStream/CreateDataStream.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ class CreateDataStream: BaseViewController {
145145
LogUtils.log(message: "Left channel", level: .info)
146146
}
147147
}
148+
AgoraRtcEngineKit.destroy()
148149
}
149150

150151
@IBAction func onJoinPressed(_ sender:Any) {

macOS/APIExample/Examples/Advanced/CustomAudioRender/CustomAudioRender.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ class CustomAudioRender: BaseViewController {
137137
LogUtils.log(message: "Left channel", level: .info)
138138
}
139139
}
140+
AgoraRtcEngineKit.destroy()
140141
}
141142

142143
@IBAction func onJoinPressed(_ sender:Any) {

macOS/APIExample/Examples/Advanced/CustomAudioSource/CustomAudioSource.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ class CustomAudioSource: BaseViewController {
136136
LogUtils.log(message: "Left channel", level: .info)
137137
}
138138
}
139+
AgoraRtcEngineKit.destroy()
139140
}
140141

141142
@IBAction func onJoinPressed(_ sender:Any) {

macOS/APIExample/Examples/Advanced/CustomVideoRender/CustomVideoRender.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ class CustomVideoRender: BaseViewController {
173173
LogUtils.log(message: "Left channel", level: .info)
174174
}
175175
}
176+
AgoraRtcEngineKit.destroy()
176177
}
177178

178179
@IBAction func onJoinPressed(_ sender:Any) {

macOS/APIExample/Examples/Advanced/CustomVideoSourceMediaIO/CustomVideoSourceMediaIO.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ class CustomVideoSourceMediaIO: BaseViewController {
196196
LogUtils.log(message: "Left channel", level: .info)
197197
}
198198
}
199+
AgoraRtcEngineKit.destroy()
199200
}
200201

201202
@IBAction func onJoinPressed(_ sender:Any) {

0 commit comments

Comments
 (0)