Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 229115

Ionic native Screen Orientation plugin not working

$
0
0

I was able to get it working! It looks like despite the fact that I tried updating / removing and reinstalling the cordova plugin it was not pulling the latest version in (2.0.1). Once I was able to actually get it installed the error seemed to be resolved.

A quick side note. The current version of the cordova-plugin-screen-orientation plugin is broken due to the fact that its relying on a dependency that cannot be accessed ( for whatever reason ). There is a pull-request for a fix out though currently but it has not yet been merged into master. The way I was able to get this working is I just installed the plugin directly from the fixed fork branch instead of the main.

TLDR: If you are having problems with the cordova-plugin-screen-orientation plugin try below

  1. ionic cordova plugin remove cordova-plugin-screen-orientation.
  2. ionic cordova plugin add cordova-plugin-screen-orientation@latest
  3. If the above fails with this error Error: Failed to fetch plugin https://github.com/vstirbu/PromisesPlugin.git via registry. Contine below, otherwise you should be good :+1:
  4. ionic cordova plugin remove cordova-plugin-screen-orientation.
  5. cordova plugin add https://github.com/Exilz/cordova-plugin-screen-orientation.git --save
  6. Now you should be good :thumbsup:

Hopefully this helps someone!

P.S. Ensure after the above steps that you have installed the latest ionic/native screen-orientation plugin using..

  1. npm rm @ionic-native/screen-orientation
  2. npm install --save @ionic-native/screen-orientation@latest

Viewing all articles
Browse latest Browse all 229115

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>