Month: February 2018

  • Viewing local PDFs in Ionic on browser, iOS and Android 5 +

    This is a provider that allows viewing of local PDFs on iOS and Android. Tested on Android 5,6 and 7. Tested on Ionic 3.19.1. This will never work on Android if you use live reload as the above version of Ionic doesn’t see cordova. It does work without the live reload flag. So this, won’t […]

  • How to view local PDFs in Ionic on Android and iOS

    Update: I wrote a provider that uses Document Viewer on iOS and In App Browser on Android: This method has only been tested with local PDF files stored in your project src/assets/ folder. No idea if it would work with remote PDFs, probably not on Android. Also, I’m very much a beginner so I may […]

  • ionic tried calling but Cordova is not available

    Got the error “Cordova is not available. Make sure to include cordova.js or run in a device/simulator” which looks like a bug. Found the answer on stackoverflow which is to update a project file (so needs to be done for each project): From the above linked page: The livereload plugin fails to serve cordova.js file […]

  • ionic deviceready has not fired after 5 seconds

    Got the error “deviceready has not fired after 5 seconds” when trying to use: ionic cordiva run ios -l Found the answer on Github which is to add the ios and android platforms, remove them and then add them again: ionic cordova platform add ios ionic cordova platform add android ionic cordova platform rm ios […]

  • ionic please include gradle in your path or install android studio

    Got “please include gradle in your path or install android studio” when trying to build/run Android using the ionic CLI. Found the answer on stackoverflow surprise surprise. Which was: brew install gradle