Mobile app does not execute server iron route


#1

I created iOS and android mobile app using meteor build . The app runs fine except that it does not execute the server side route created using iron router. When accessed from a web browser on mobile it works fine.

Any reason why a mobile app will not execute routes (where server) ?


#2

The workaround is to use Meteor.absoluteUrl or Router.url to the paths which are server side route.

That means if there is a path in the app that is expected to be routed from server side (where:server routes) then prepend the path with absolute url or use Router.url to generate the path/link. Then the server side route gets invoked.
If we don’t do this the http://meteor.local/ is prepended to the path and the server route is never reached.