TideSDK not working with Pusher

2019-04-16 06:48发布

问题:

I'm trying to develop a desktop application coded in HTML, CSS, jQuery and PHP, compiled with TideSDK. This application needs to receive real-time notifications from a webpage, so that when a user clicks on a specific button on the website, the desktop application captures that immediately. I've found Pusher for this matter, and it works great between two websites, but it appears as "unavailable" to connect in a desktop application with TideSDK.

This is what I get from the web:

Pusher : State changed : initialized -> connecting Pusher : Connecting : {"transport":"ws","url":"ws://ws.pusherapp.com:80/app/f230334341334645add9?protocol=7&client=js&version=2.1.5&flash=false"} Pusher : State changed : connecting -> connected

And this is what I get from the TideSDK application:

Pusher : State changed : initialized -> connecting Pusher : Connecting : {"transport":"ws","url":"ws://ws.pusherapp.com:80/app/f230334341334645add9?protocol=7&client=js&version=2.1.5&flash=false"} Pusher : State changed : connecting -> unavailable

Does anyone know if this is a firewall/proxy/router error? Or maybe something else? In either case, how can I make Pusher work in a TideSDK compiled desktop application?

Thank you very much in advance

回答1:

@Jeremy You are running into a limitation of TideSDK's internal WebKit. We've been working on TideKit as you may be aware for some time http://tidekit.com. This is launching quite soon so you will be able to migrate when you wish.

TideKit has most up-to-date implementations for both JavaScriptCore or V8. You can build with whatever is best for your project. Our implementations are both state of the art and have the highest HTML5 scores possible today.

TideKit is a platform as opposed to an SDK and it has a build service you interact with but can also build locally. A bonus is that TideKit is for mobile, desktop and web as opposed to a desktop only solution. If you develop using CommonJS you can actually build on all platforms from a single project source to extend the reach of your app.