Skip to content

Commit

Permalink
SZ-89: updated pinterest SDK to v3
Browse files Browse the repository at this point in the history
  • Loading branch information
SPopenko committed Aug 27, 2014
1 parent 335bdd1 commit 8be962b
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Socialize.xcodeproj/project.pbxproj
Expand Up @@ -521,6 +521,9 @@
2CE9D357189094CF00CE2D75 /* socialize-cell-image-default-ios7@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 2CE9D353189094CF00CE2D75 /* socialize-cell-image-default-ios7@2x.png */; };
2CE9D358189094CF00CE2D75 /* socialize-cell-image-default-ios7@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 2CE9D353189094CF00CE2D75 /* socialize-cell-image-default-ios7@2x.png */; };
2CE9D359189094CF00CE2D75 /* socialize-cell-image-default-ios7@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 2CE9D353189094CF00CE2D75 /* socialize-cell-image-default-ios7@2x.png */; };
4804349E19AD099B006EAC7E /* PinterestSDKResources.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 84FCF450175E706B009AD5C1 /* PinterestSDKResources.bundle */; };
480434A619AD099C006EAC7E /* PinterestSDKResources.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 84FCF450175E706B009AD5C1 /* PinterestSDKResources.bundle */; };
480434A719AD099C006EAC7E /* PinterestSDKResources.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 84FCF450175E706B009AD5C1 /* PinterestSDKResources.bundle */; };
485BD8B717F192A80076FF93 /* SZTestAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = AA0085A4158D2B1100480399 /* SZTestAppDelegate.m */; };
485BD8B817F193370076FF93 /* SocializeApiInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = AA935C06158F1C2600B5B2BC /* SocializeApiInfo.plist */; };
487047C717EEFB04008D5741 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA008596158D2B1100480399 /* Foundation.framework */; };
Expand Down Expand Up @@ -4621,6 +4624,7 @@
AA935A68158F187200B5B2BC /* socialize-cell-arrow@2x.png in Resources */,
AA935A6B158F187200B5B2BC /* socialize-cell-bg.png in Resources */,
AA935A6E158F187200B5B2BC /* socialize-cell-bg@2x.png in Resources */,
4804349E19AD099B006EAC7E /* PinterestSDKResources.bundle in Resources */,
AA935A71158F187200B5B2BC /* socialize-cell-image-bg.png in Resources */,
AA935A74158F187200B5B2BC /* socialize-cell-image-bg@2x.png in Resources */,
2C6E53021884C293009C8F4F /* socialize-selectnetwork-facebook-dis-icon-ios7@2x.png in Resources */,
Expand Down Expand Up @@ -5103,6 +5107,7 @@
AA6221F81600065100262E15 /* socialize-checkmark@2x.png in Resources */,
84AEF7DC17633AFA006DB43A /* socialize-selectnetwork-pinterest-icon@2x.png in Resources */,
84AEF7E1176341D5006DB43A /* socialize-selectnetwork-pinterest-icon.png in Resources */,
480434A619AD099C006EAC7E /* PinterestSDKResources.bundle in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -5196,6 +5201,7 @@
2CE9D34518908BAD00CE2D75 /* socialize-profileimage-large-bg-ios7.png in Resources */,
AA935A55158F187200B5B2BC /* socialize-authorize-twitter-disabled-icon.png in Resources */,
AA935A58158F187200B5B2BC /* socialize-authorize-twitter-disabled-icon@2x.png in Resources */,
480434A719AD099C006EAC7E /* PinterestSDKResources.bundle in Resources */,
AA935A5B158F187200B5B2BC /* socialize-authorize-twitter-enabled-icon.png in Resources */,
AA935A5E158F187200B5B2BC /* socialize-authorize-twitter-enabled-icon@2x.png in Resources */,
AA935A61158F187200B5B2BC /* socialize-authorize-user-icon.png in Resources */,
Expand Down
Expand Up @@ -9,19 +9,91 @@
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

/** The Pin It SDK allows for the creation of Pinterest content inside of third party applications.
Currently the SDK only supports pinning images from a specified URL.
*/
@interface Pinterest : NSObject

/**---------------------------------------------------------------------------------------
* @name Initialization
* ---------------------------------------------------------------------------------------
*/

/** Initializes a Pinterest instance.
@warning An undefined clientId will raise a NSInvalidArgumentException on creating a pin.
@param clientId A Pinterest client id.
@return Pinterest instance.
*/
- (id)initWithClientId:(NSString *)clientId;

/** Initializes a Pinterest instance with a URL scheme suffix.
@warning An undefined clientId will raise a NSInvalidArgumentException on creating a pin.
@param clientId A Pinterest client id.
@param suffix URL scheme suffix that is used to futher identify an application in addition to a client id.
@return Pinterest instance.
*/
- (id)initWithClientId:(NSString *)clientId
urlSchemeSuffix:(NSString *)suffix;


/**---------------------------------------------------------------------------------------
* @name Pinning
* ---------------------------------------------------------------------------------------
*/

/** Checks if a version of the Pinterest app that supports the Pin It SDK is installed.
@return If pinning is possible via the Pin It SDK on the device.
*/
- (BOOL)canPinWithSDK;


/** Creates a pin with specified image URL.
@warning An undefined imageURL will raise a NSInvalidArgumentException.
@param imageURL URL of the image to pin.
@param sourceURL The source page of the image.
@param descriptionText The pin's description.
*/
- (void)createPinWithImageURL:(NSURL *)imageURL
sourceURL:(NSURL *)sourceURL
description:(NSString *)descriptionText;

/** Creates a Pin It button.
@return Pin It button.
*/
+ (UIButton *)pinItButton;

/**---------------------------------------------------------------------------------------
* @name Deep Linking
* ---------------------------------------------------------------------------------------
*/

/** Opens the Pinterest application to a user's profile.
@param username Username of user's profile to open.
*/
- (void)openUserWithUsername:(NSString *)username;

/** Opens the Pinterest application to a pin.
@param identifier Id of the pin to open.
*/
- (void)openPinWithIdentifier:(NSString *)identifier;

/** Opens the Pinterest application to a user's board.
The board's slug can be found from a board's URL on the web.
@param slug The board's slug from a Pinterest URL.
@param username The username of the user who owns the board.
*/
- (void)openBoardWithSlug:(NSString *)slug fromUser:(NSString *)username;

@end
Binary file not shown.
Binary file not shown.

1 comment on commit 8be962b

@davidjed
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Quick question... I noticed we have the frameowkr in ThirdParty but also have it as a CocoaPod. Do we need to update the Podfile?

pod 'Pinterest-iOS', '~> 2.3'

Please sign in to comment.