When an iOS app is using a SceneDelegate, this code does not work:
UIViewController *root = [[[[UIApplication sharedApplication] delegate] window] rootViewController];
Reference: https://stackoverflow.com/questions/74341479/unable-to-access-root-view-after-adding-scenedelegate-swift-5