Skip to content

urbn/URBNShareKit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CI Status Version License Platform

URBNShareKit

A subclass of UIActivityViewController which makes sharing content using the native iOS share sheet a breeze.

iOS 8.3 Facebook Change

As of iOS 8.3, you can no longer supply 'body' text to the Facebook activity. See more here. You can still supply a link and an image though.

Usage

After adding URBNShareKit to your projects Podfile, import URBNShareKit using the following import line:
#import <URBNShareKit/URBNShareKit.h>

To use URBNShareKit, create an instance of URBNActivityViewController, and init using the designated initializer initWithDefaultBody:

See the exmaple project for more setup code.

URBNShareKit supports the following activity types:

 NSString *const UIActivityTypePostToFacebook;
 NSString *const UIActivityTypePostToTwitter;
 NSString *const UIActivityTypePostToWeibo;
 NSString *const UIActivityTypeMessage;
 NSString *const UIActivityTypeMail;
 NSString *const UIActivityTypePrint;
 NSString *const UIActivityTypeCopyToPasteboard;
 NSString *const UIActivityTypeAssignToContact;
 NSString *const UIActivityTypeSaveToCameraRoll;
 NSString *const UIActivityTypeAddToReadingList;
 NSString *const UIActivityTypePostToFlickr;
 NSString *const UIActivityTypePostToVimeo;
 NSString *const UIActivityTypePostToTencentWeibo;
 NSString *const UIActivityTypeAirDrop;
 NSString *const kURBNActivityTypePinterest;

Supported UIActivityItemProvider types:

URBNBodyProvider

Pass this provider body text to share. You can set different body text for different activity types. See URBNBodyProvider.h for more info on supported body types.

URBNImageProvider

Pass this provider an image that will be shared with supported activity types.

URBNUrlProvider

Pass this provider a Url that will be shared with supported activity types.

Requirements

  • iOS 7+
  • Note: 3rd party activity types (ie Pinterest) will only work on devices with iOS 8+.

Installation

URBNShareKit is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "URBNShareKit"

Author

URBN Mobile Team, mobileteam@urbn.com

License

URBNShareKit is available under the MIT license. See the LICENSE file for more info.