ratchet icon indicating copy to clipboard operation
ratchet copied to clipboard

Push.js doesn't work in iOS simulator

Open msimkunas opened this issue 10 years ago • 3 comments

I'm developing a Phonegap application. Push.js works (loads other pages into the .content element) in the Android emulator, in Google Chrome web browser but not in the iOS simulator.

<a class="tab-item active" href="about.html" data-transition="slide-in">
    <span class="=icon icon-home"></span>
    <span class="tab-label">About</span>
</a>

msimkunas avatar Dec 08 '14 14:12 msimkunas

Duplicate of https://github.com/twbs/ratchet/issues/665#issuecomment-57667360 ?

cvrebert avatar Dec 08 '14 19:12 cvrebert

Is about.html served up via the filesystem? Meaning it complied in your phonegap/cordova app? It could be that url are loaded using the file:// protocol inside compiled apps which isn't supported by push.js currently.

I was able to get it working by applying a modified version of the push.js code from @artemave

Just replace the "// Core PUSH functionality" section of ratchet.js with this version:

https://github.com/artemave/ratchet/commit/5ccfdd765ecd15666b83b0b9abc15e4c120b7713

joepetrini avatar Mar 03 '15 15:03 joepetrini

This would have been very nice to know before I went to cordova-httpd for http protocol so I could make push.js work...

trevor403 avatar Sep 02 '15 04:09 trevor403