Why does my app appear as a blank white screen in

2020-07-27 06:00发布

问题:

I'm trying to understand where iOS gets the image from for App Switcher and when. What do I need to change to get control of what appears on App Switcher?

Right now, I can set a breakpoint on the first line of didFinishLaunchingWithOptions, my launch screen is visible, but App Switcher shows just a blank white screen with just the green battery rectangle. The App Switcher doesn't seem to pick up any image later in my app either.

I'm doing this in didFinishLaunchingWithOptions:

self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];

and later in a called method (after setting up appropriate views) this:

MMDrawerController * drawerController = [[MMDrawerController alloc]
                                         initWithCenterViewController:centerView
                                         leftDrawerViewController:leftDrawer];

drawerController.maximumLeftDrawerWidth = LeftDrawerWidth;
drawerController.closeDrawerGestureModeMask = MMCloseDrawerGestureModeTapCenterView;

[imageView addSubview:[self staticToolbar]];
[imageView addSubview:[self dsaToolbar]];

self.window.rootViewController = drawerController;



[self.window makeKeyAndVisible];

[[UIApplication sharedApplication] setStatusBarHidden:NO];
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];

回答1:

I discovered that my issue was due a feature in the Salesforce SDK I am using. useSnapshotView in SFAuthenticationManager.h can be used to toggle this security option.