You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2020/07/29 17:47:16 UTC

[GitHub] [cordova-plugin-screen-orientation] gitlizm1981 edited a comment on issue #62: Ionic 5.x/Screen-Orientation lock does not work on iOS platform

gitlizm1981 edited a comment on issue #62:
URL: https://github.com/apache/cordova-plugin-screen-orientation/issues/62#issuecomment-665555656


   i had the same issue,  it seems the plugin is still not loaded at the time the app component already start to initialize, my current workaround solution is to add below code to delay the app component loading process:
   
   if(this.platform.is('ios'){
        const startTime = new Date().getTime() + parseInt('3000', 10);
         while(new Date().getTime() < startTime) {};
   }
   
   call the screenOrientation operations here..


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org