bytepark / auto_orientation

A flutter plugin to programmatically change the orientation and rotate
MIT License
46 stars 45 forks source link

All method Not working with iOS16 #29

Closed luodongwen closed 1 year ago

luodongwen commented 1 year ago

BUG IN CLIENT OF UIKIT: Setting UIDevice.orientation is not supported. Please use UIWindowScene.requestGeometryUpdate(_:)

kingiol commented 1 year ago

@fbatschi

This is PR Request: https://github.com/bytepark/auto_orientation/pull/28

Waiting for accept to merge.

luodongwen commented 1 year ago

@fbatschi

fbatschi commented 1 year ago

The merge of the pull request had to be reverted.

@kingiol unfortunately the code breaks on ios < 16

Semantic Issue (Xcode): Use of undeclared identifier 'UIWindowSceneGeometryPreferencesIOS'
/Users/xy/flutter/.pub-cache/git/auto_orientation-d2b65a6c317937a1527db5d764591b43706dc849/ios/Classes/AutoOrientationPlugin.m:56:8

Semantic Issue (Xcode): Use of undeclared identifier 'geometryPerferencesIOS'
/Users/xy/flutter/.pub-cache/git/auto_orientation-d2b65a6c317937a1527db5d764591b43706dc849/ios/Classes/AutoOrientationPlugin.m:56:45

Semantic Issue (Xcode): Use of undeclared identifier 'UIWindowSceneGeometryPreferencesIOS'
/Users/xy/flutter/.pub-cache/git/auto_orientation-d2b65a6c317937a1527db5d764591b43706dc849/ios/Classes/AutoOrientationPlugin.m:56:72

ARC Semantic Issue (Xcode): No visible @interface for 'UIWindowScene' declares the selector 'requestGeometryUpdateWithPreferences:errorhandler:'
/Users/xy/flutter/.pub-cache/git/auto_orientation-d2b65a6c317937a1527db5d764591b43706dc849/ios/Classes/AutoOrientationPlugin.m:57:15

Semantic Issue (Xcode): Use of undeclared identifier 'geometryPerferencesIOS'
/Users/xy/flutter/.pub-cache/git/auto_orientation-d2b65a6c317937a1527db5d764591b43706dc849/ios/Classes/AutoOrientationPlugin.m:57:52
yisar commented 1 year ago

Any release?

fbatschi commented 1 year ago

This should be working now with the release of 2.3.0.

yisar commented 1 year ago

This should be working now with the release of 2.3.0.

Although ios16 works well, the new version of ios15 will directly flash back.