So I've been dealing with an issue when my app where a bug happens only when the app has been downloaded from App Store or TestFlight, when compiled/run directly to the device from Xcode the function works exactly as it should. Could this be some sort of iOS bug?
The problem code is as follows:
extension UIApplication {
public var isSplitOrSlideOver: Bool {
guard let w = self.delegate?.window, let window = w else { return false }
return !window.frame.equalTo(window.screen.bounds)
}
}
The issue is it always returns false on a TestFlight or App Store build, but returns appropriately directly through Xcode to the device.
Any ideas?