jansgescheit commented on PR #102:
URL: 
https://github.com/apache/cordova-plugin-screen-orientation/pull/102#issuecomment-1255464666

   
   Xcode 14
   Iphone X Simulator **iOS 12.4**
   Called only `ScreenOrientation.lock(portrait | landscape)` from JS
   
   ### last release of the plugin:
   #### Simulator in Portrait
   ✅ Lock to Portrait
   ✅ Lock to Landscape; screen rotates to landscape
   ✅ Lock to Portrait; screen rotates to portrait
   
   #### Simulator in Landscape
   ✅ Lock to Portrait
   ✅ Lock to Landscape; screen rotates to landscape
   ✅ Lock to Portrait; screen rotates to portrait
   
   ### last release of the plugin: 
   used the changes from @jaydrogers and the mention from @msmtamburro:
   
   ```objectivec
    _isLocked = true;
   if (@available(iOS 16.0, *)) {
       #if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_15_5 // Xcode 14 and iOS 
16, or greater
           [self.viewController setNeedsUpdateOfSupportedInterfaceOrientations];
       #endif
   } else {
       [[UIDevice currentDevice] setValue:value forKey:@"orientation"];
   }
   
   ```
   
   #### Simulator in Portrait
   ✅ Lock to Portrait
   ✅ Lock to Landscape; screen rotates to landscape
   ✅ Lock to Portrait; screen rotates to portrait
   
   #### Simulator in Landscape
   ✅ Lock to Portrait
   🔴  Lock to Landscape; **the state remains in the original (portrait) 
orientation**
   ✅ Lock to Portrait; screen rotates to portrait
   
   Maybe this Line needs also be changed 
https://github.com/apache/cordova-plugin-screen-orientation/blob/master/src/ios/CDVOrientation.m#L76
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to