Great lightweight sharing wrapper using built-in facebook, twitter, whatsapp, email, text message, activitycontroller, documentinteractioncontroller, all with 1 line and great completion blocks!
pod 'BDGShare'
[BDGSharing shareFacebook:@"text" urlStr:@"url string" image:nil completion:^(SharingResult sharingResult) {
}];
[BDGSharing shareTwitter:@"text" urlStr:@"url string" image:nil completion:^(SharingResult sharingResult) {
}];
[BDGSharing shareWhatsapp:@"Text message" urlStr:@"Optional url string"];
[BDGSharing shareEmail:@"Subject" mailBody:@"Body" recipients:nil isHTML:FALSE completion:^(SharingResult sharingResult) {
}];
Text message/SMS
[BDGSharing shareSMS:@"Text message" recipient:nil completion:^(SharingResult sharingResult) {
}];
Activity Controller (including optional whatsapp as an activity, also just updated to support iOS8 iPad new presentation popover)
[BDGSharing shareUsingActivityController:@"Text" urlStr:@"Url str" image:nil whatsapp:TRUE];
Document Interaction Controller)
[BDGSharing shareImageUsingDocumentController:image fileName:@"ImageToShareName" completion:^(UIDocumentInteractionController *documentInteractionController) {
}];
@property: presentingViewController. If not set, it uses the [UIApplication sharedApplication] keyWindow's rootViewController
@property: excludedActivities. You can use this property to define activities the activityController should exclude. By default some rarely used activities are excluded.
The completion blocks return a sharingresult which is always one of the following:
SharingResultFailed
SharingResultCancelled
SharingResultSuccess