Hi.
I have created a test application for HomeKit on iPad Mini (5th generation) with iOS 14.4 on Xcode 12.4.
The app is only for iPad, the supported orientation is landscape only and it's very basically : one view controller with one button when tapped execute the following code.
When the button is tapped the app crash with the following reason :
Is there a way to avoid the crash or is there a bug in HomeKit framework ?
I have created a test application for HomeKit on iPad Mini (5th generation) with iOS 14.4 on Xcode 12.4.
The app is only for iPad, the supported orientation is landscape only and it's very basically : one view controller with one button when tapped execute the following code.
Code Block HomeStore.shared.homeManager.primaryHome?.addAndSetupAccessories(completionHandler: { (error) in if error != nil { // DO SOMETHING } else { // DO SOMETHING ELSE } })
When the button is tapped the app crash with the following reason :
I wan't to support the portrait orientation also, because I want the locked in landscape.
** Terminating app due to uncaught exception 'UIApplicationInvalidInterfaceOrientation', reason: 'Supported orientations has no common orientation with the application, and [HMSetupViewController shouldAutorotate] is returning YES'
Is there a way to avoid the crash or is there a bug in HomeKit framework ?