0

I have a SFSafariViewController opening at the push notification received. It has been working fine and is still working fine on all the versions of iOS except iOS 11. Am using the code in my ViewController class.

 NSURL *URL = [NSURL URLWithString:[NSString stringWithFormat:@"http://google.com"]];
SFSafariViewController *sfvc = [[SFSafariViewController alloc] initWithURL:URL];
UIWindow *alertWindow = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
alertWindow.rootViewController = [[UIViewController alloc] init];
[alertWindow makeKeyAndVisible];
[alertWindow.rootViewController presentViewController:sfvc animated:YES completion:nil];
AlKhalid
  • 1
  • 1
  • Is it not loading, or just showing an empty screen? – koen May 17 '18 at 14:14
  • it's navigating to the page, displaying white screen. – AlKhalid May 17 '18 at 14:16
  • Why do you create a new window, I would present `sfvc` from your current vc. – koen May 17 '18 at 15:24
  • Where is this code running from? Which function is it? Try setting the background color of your window like `alertWindow.rootViewController.view.backgroundColor = [UIColor redValue];`, remove the line with "presentViewController" and see if you have your window shown at all. Try using Xcode views debugger to see if you window is on top or is covered by something else, and if the size is correct. – battlmonstr May 17 '18 at 17:34

0 Answers0