View Controller-Based Status Bar Appearance

PSPDFKit requires the modern UIViewControllerBasedStatusBarAppearance mode introduced in iOS 7 to be set to YES in your Info.plist file. This is the default setting and uses the modern view controller-based API for status bar manipulation. The older UIApplication-based API was deprecated in iOS 9 and is unavailable when compiling extensions.

If your application uses the legacy API, you need to migrate your code to the new view controller-based one, otherwise PSPDFKit will not be able to manage the status bar for you. We detect this issue and show a warning dialog for debug builds.

In older versions, we tried supporting both modes, but they are too different and Apple clearly explained that view controller-based status bar management is the future and that using global state to manage the status bar is a “Bad Idea,” so we fully focus on the new API to deliver a superior product.

You can learn more about this in Apple’s Transitioning Guide.

If everything works as intended and all you want to do is disable the warning, set the following:

PSPDFKitGlobal.sharedInstance.setValue(true, forKey: "com.pspdfkit.development.suppress-warning-alerts")
PSPDFKitGlobal.sharedInstance[@"com.pspdfkit.development.suppress-warning-alerts"] = @YES;

Note that we only present the warning during development, so this actually doesn’t change anything in production builds.