简体   繁体   English

Xamarin上的SocketIOClient在实际设备上不起作用

[英]SocketIOClient on Xamarin doesn't work on real device

I'm trying to use SocketIOClient on Xamarin.Android and Xamarin.iOS, and it works corrrectly but only on imulators. 我正在尝试在Xamarin.Android和Xamarin.iOS上使用SocketIOClient,它可以正确运行,但只能在模拟器上使用。 When I start apps on real devices socket doesn't work and app just doesn't show any errors in try-catch blocks. 当我在真实设备上启动应用程序时,套接字不起作用,并且应用程序在try-catch块中没有显示任何错误。 May by anyone has same problem and fixed it. 可能任何人都有同样的问题,并已解决。 Thanks. 谢谢。

Did you use this library SocketIoClientDotNet . 您是否使用了SocketIoClientDotNet这个库。 If yes, I also have your problem on iOS. 如果是,我在iOS上也遇到您的问题。 My solution is get the SocketIoClientDotNet code and rebuild in my xamarin project. 我的解决方案是获取SocketIoClientDotNet代码并在我的xamarin项目中重建。

Checkout my demo here: https://github.com/tudushare/XamarinSocketIODemo 在此处查看我的演示: https : //github.com/tudushare/XamarinSocketIODemo

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM