Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

react-native websocket无法连接 #559

Open
joesonw opened this issue Jul 12, 2017 · 1 comment
Open

react-native websocket无法连接 #559

joesonw opened this issue Jul 12, 2017 · 1 comment

Comments

@joesonw
Copy link

joesonw commented Jul 12, 2017

在模拟器上一点问题都没有, 在真机上, realtime.createIMClient(clientId) 这一步会timeout挂掉(模拟器检查Network, 是websocket请求这一步卡住). 请问这个问题如何解决呀.

Info.plist 已经允许了*.leancloud.cn和*.clouddn.com域名.

环境:
iOS 10.3.2
react-native: 0.42.3
leancloud-realtime: 3.4.1

@tang3w
Copy link

tang3w commented Jul 12, 2017

SDK 是通过 HTTPS 去访问 leancloud.cn 域名的,开启 ATS 的应用不用在 Info.plist 中设置。
建议将 Info.plist 中跟 leancloud.cn 域名有关的设置去掉,测试一下看看问题是否解决。
请提供一下 Info.plist 中 NSAppTransportSecurity 的设置。
如果问题仍然存在,请提供更详细的网络请求错误信息。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants