Álvaro Ramírez
Sharing on iOS
- UIActivityViewController.
- Use completionWithItemsHandler on iOS 8.
- Sample:
NSString *title = @"Sharing on iOS bookmarks."; NSURL *url = [NSURL URLWithString:@"http://xenodium.com/#sharing-on-ios"]; UIImage *image = [UIImage imageNamed:@"beautiful-image"]; UIActivityViewController *controller = [[UIActivityViewController alloc] initWithActivityItems:@[title, url, image] applicationActivities:nil]; // self being a UIViewController. [self presentViewController:controller animated:YES completion:nil];
- Sharing through Mail app on simulator isn't supported.
viewServiceDidTerminateWithError: Error Domain=_UIViewServiceInterfaceErrorDomain Code=3 "The operation couldn’t be completed. (_UIViewServiceInterfaceErrorDomain error 3.)" UserInfo=… {Message=Service Connection Interrupted}
- Sharing through Mail app on device is OK.
- WWDC 2014 Creating Extensions for iOS and OSX, Part 1.
- Share Extensions talk by Guy Fullerton.
- Usually view controllers in addition to plist.
- CFBundleDisplayName.
- NSExtendion.
- NSExtensionAttributes.
- NSExtensionActivationRule.
- NSExtensionAttributes.
- SLComposeServiceViewController.
- UIActivityViewController.
- Share Extensions talk by Guy Fullerton.
- WWDC 2014 Creating Extensions for iOS and OSX, Part 2.
- Want to a share URL to App Store? See Technical Q&A 1633.