AgoraIO / API-Examples

Play with AgoraSDK and have fun! Everything you need to start learning Agora.
295 stars 217 forks source link

Mac OS not working #158

Open HenryRocken opened 3 years ago

HenryRocken commented 3 years ago

Can you help to check whether the examples of Mac OS version works?

Log from xcode: "2021-05-21 19:04:24.860906+0800 APIExample[10433:192215] The class 'CocoaRenderView' overrides the method setIdentifier:. This method is implemented by class 'NSView' Warning: warning: 8 2021-05-21 19:04:24.917550+0800 APIExample[10433:192573] [] CMIOHardware.cpp:379:CMIOObjectGetPropertyData Error: 2003332927, failed Warning: warning: 104 Warning: warning: 104 Warning: warning: 104 Warning: warning: 104 " my network works fine, and the parameters works fine i am not able to find the success of the joinchannel agorasdk.log

"INFO (18:57:33:948 | 0) 9735; [ap] GenericUniLbsRequest, flag: 65536, cname: 11C755428F394B399C8F33088E97F9A9, uid: 0,sid: F31B96BE90824AF48BBC94BA03B4BE12, appid: 896929e2b84c4c16917a0dc21676bbc INFO (18:57:33:948 | 0) 9735; [ap] tcp - creating channel with 184.72.18.217:8443, ts 0, flag: 65536 INFO (18:57:33:998 | 50) 9735; [remote:54.178.26.110:8443] on connection close received, reason: 0, detail: INFO (18:57:33:998 | 0) 9735; [remote:54.178.26.110:8443] start time wait, duration: 2000 ms ERROR (18:57:33:998 | 0) 9735; [ap] aut socket error with 54.178.26.110:8443 INFO (18:57:33:998 | 0) 9735; [remote:54.178.26.110:8443] destroy session 0x7fee8f877eb0 INFO (18:57:33:998 | 0) 9735; [remote:54.178.26.110:8443] destroy connection 0x7fee8f0bd000 INFO (18:57:34:269 | 0) 9735; [ap/t] responsed from 184.72.18.217:8443, UDPPROXY(65536). INFO (18:57:34:360 | 91) 9735; [ap/u] responsed from 15.237.134.178:8443, UDPPROXY(65536).

yoreland commented 3 years ago

Just for confirmation, can you use same appID on this demo: https://webdemo.agora.io/agora-web-showcase/examples/Agora-Web-Tutorial-1to1-Web/

and check if it work?

HenryRocken commented 3 years ago

appID works fine. I used the same appID and token in the IOS demo and some other demos. There is no confict either. I aslo tried the demo with other version SDK, and it didn't work either. MAC os version is Big Sur, and XCode was updated to latest verion.

HenryRocken commented 3 years ago

There is a BUG in the code.

Default is not to use proxy, and but proxy is initialized with "udpProxy = 1"

change the defaultProxySettingIdx: Int = 0 and change the order of Proxy to fix it. Commons/Configs.swift

static var defaultProxySettingIdx: Int = 0 static var Proxy:[Bool] = [ false, true]

BUG: Commons/Configs.swift static var defaultProxySettingIdx: Int = 1 static var Proxy:[Bool] = [ true, false ]

let proxySetting = GlobalSettings.shared.proxySetting.selectedOption().value agoraKit.setCloudProxy(AgoraCloudProxyType.init(rawValue: UInt(proxySetting)) ?? .noneProxy) definition public enum AgoraCloudProxyType : UInt { /* Do not use the cloud proxy. / case noneProxy = 0

/* The cloud proxy for the UDP protocol. / case udpProxy = 1

/* The cloud proxy for the TCP (encrypted) protocol. / case tcpProxy = 2 }

tamworth commented 1 day ago

@HenryRocken you can try again using our latest version of the demo. the new SDK has optimized many things.