**Use below code on rotation and after that do write code of UI update with delay of 0.5 or 1.0 **
@try {
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 160000 // Xcode 14 and iOS 16, or greater
[vc setNeedsUpdateOfSupportedInterfaceOrientations];
[vc.navigationController setNeedsUpdateOfSupportedInterfaceOrientations];
#endif
} @catch (NSException *exception) {
NSLog(@"UpdateOrientationForiOS16 catch error: %@", [exception description]);
}
**Force attempt Orientation - attemptRotationToDeviceOrientation **
// requiredMask = UIInterfaceOrientationMaskPortrait
@try {
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 160000 // Xcode 14 and iOS 16, or greater
NSArray *array = [[[UIApplication sharedApplication] connectedScenes] allObjects];
UIWindowScene *scene = (UIWindowScene *)array[0];
[vc setNeedsUpdateOfSupportedInterfaceOrientations];
[vc.navigationController setNeedsUpdateOfSupportedInterfaceOrientations];
UIWindowSceneGeometryPreferencesIOS *geometryPreferences = [[UIWindowSceneGeometryPreferencesIOS alloc] initWithInterfaceOrientations:requiredMask];
[scene requestGeometryUpdateWithPreferences:geometryPreferences errorHandler:^(NSError * _Nonnull error) {
//draw design again after orinetation changed
errorCompletion([error description]);
//NSLog(@"requestGeometryUpdateWithPreferences error: %@", [error description]);
}];
#endif
} @catch (NSException *exception) {
NSLog(@"UpdateForceAttemptOrientationForiOS16 catch error: %@", [exception description]);
}
Post
Replies
Boosts
Views
Activity
HI @dipakmishra
Can you share code for Print UIImage?
I resolved this, Verification failed domain is fixed, Apple needs many server settings proper on development environment as well.Our Technical architecture and DevOps team helped us and fixed it.Now facing other issues on website in latest Mac OS Catalina and IOS 13 device. we are not getting response from apple on registered redirect url.Please advice, Our app is in rejected state since last 20days.