CocoaPods trunk is moving to be read-only. Read more on the blog, there are 17 months to go.

BDGShare 0.0.11

BDGShare 0.0.11

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Apr 2016

Maintained by Bob de Graaf.



BDGShare 0.0.11

  • By
  • Bob de Graaf

Great lightweight sharing wrapper using built-in facebook, twitter, whatsapp, email, text message, activitycontroller, documentinteractioncontroller, all with 1 line and great completion blocks!

Usage

Facebook

[BDGSharing shareFacebook:@"text" urlStr:@"url string" image:nil completion:^(SharingResult sharingResult) {        
}];

Twitter

[BDGSharing shareTwitter:@"text" urlStr:@"url string" image:nil completion:^(SharingResult sharingResult) {        
}];

Whatsapp

[BDGSharing shareWhatsapp:@"Text message" urlStr:@"Optional url string"];

Email

[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) {        
}];

Additional options

@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.

Sharing results

The completion blocks return a sharingresult which is always one of the following:
SharingResultFailed
SharingResultCancelled
SharingResultSuccess