Skip to content

Instantly share code, notes, and snippets.

@brod-ie
Last active December 14, 2015 08:52
Show Gist options
  • Save brod-ie/90fbddf4838d12a4fca2 to your computer and use it in GitHub Desktop.
Save brod-ie/90fbddf4838d12a4fca2 to your computer and use it in GitHub Desktop.
#import "SafariServices/SafariServices.h"
// Init SFViewController with webpage that'll use the
// app's URL scheme to send result back to app
NSURL *url = [NSURL URLWithString:@"http://api.app.com/determine-auth-state"];
SFSafariViewController *sfvc = [[SFSafariViewController alloc] initWithURL:url];
// Configure to be hidden over existing VC
sfvc.view.hidden = YES;
sfvc.modalPresentationStyle = UIModalPresentationOverCurrentContext;
// Present
[self presentViewController:sfvc animated:NO completion:^(){}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment