safari

Hi Team,

I'm facing the below issues with WKWebView & SFSafariViewController

  1. Camera interface is showing blank but functionality is working fine with SFSafariViewController but not with the wkwebview.
  2. Not able to receive Call backs after initialLoadDidRedirectToURL in the webpage internal navigation.
  3. Logs [Process] kill() returned unexpected error 1

Please help me in getting the callback so that will close the safariviewcontroller automatically.


Below are the observations


iOS VersionWebview(Deprecated)WKWebViewSFSafariViewController
13.2.3/13.3
12.4.1
12.0.1
Camera itself not loading,so blockerCamera blank & final url not loading


FYI,

- (void)openLink:(NSString *)urlString {

NSURL *url = [NSURL URLWithString:urlString];

if (url) {

if ([SFSafariViewController class] != nil) {

SFSafariViewController *safariViewController = [[SFSafariViewController alloc] initWithURL:url];

safariViewController.delegate = self;

[self presentViewController:safariViewController animated:YES completion:nil];

} else {

[[UIApplication sharedApplication] openURL:url options:@{} completionHandler:nil];

}

}

}


- (void)safariViewController:(SFSafariViewController *)controller initialLoadDidRedirectToURL:(NSURL *)URL{

NSLog(@"URL %@",URL);

}

- (void)safariViewController:(SFSafariViewController *)controller didCompleteInitialLoad:(BOOL)didLoadSuccessfully {

NSLog(@"didCompleteInitialLoad");

}

- (void)safariViewControllerDidFinish:(SFSafariViewController *)controller{

NSLog(@"safariViewControllerDidFinish");


}

- (IBAction)loadWebview:(id)sender {

[self openLink:@"xxxxx"];

}


Regards,

Mallikarjun