ssrwpo / ssr

SSR - Router with SSR for Node & Meteor
https://ssrwpo.github.io/ssr/
MIT License
93 stars 16 forks source link

Plugin doesn't work with Cordova (ios-device) #53

Closed floydprice closed 7 years ago

floydprice commented 7 years ago

Steps to reproduce using the Demo app in the repo:

meteor add-platform ios
meteor run ios-device

Run the xCode project.

All you get is a white screen on the device and an error/notice in the xCode console:

App startup timed out, reverting to last known good version
floydprice commented 7 years ago

Same happens on a fresh app... are there any specific setup steps i need to enable Cordova support?

floydprice commented 7 years ago

This relates to #43 I will spend some time investigating over the next couples of days.

floydprice commented 7 years ago

When the app starts on a device we get a number of client side errors in createRouter.jsx...

window.__PRELOADED_STATE__  // This comes out as undefined

and

 var div = document.getElementById('react');  // returns null

the body of the document is empty which suggests we need to do some Cordova specific startup to get the document ready to receive our React components

floydprice commented 7 years ago

I suggest we close this issue as it represents a tactical fix (PR #54) a new issue has been raised to capture a more strategic fix ( #55)