ratchet
ratchet copied to clipboard
Push.js doesn't work in iOS simulator
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>
Duplicate of https://github.com/twbs/ratchet/issues/665#issuecomment-57667360 ?
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
This would have been very nice to know before I went to cordova-httpd for http protocol so I could make push.js work...