Skip to content

Commit

Permalink
If running on iOS6 or newer, open StoreKit modal instead of bumping o…
Browse files Browse the repository at this point in the history
…ut to App Store app.

Add parameter to disable opening App Store/StoreKit on failed authorization.
Adjust example app nib so it renders better in iOS7.
Bump podspec.
  • Loading branch information
Brian Dorfman committed Nov 25, 2013
1 parent 9a976bc commit 4d49a20
Show file tree
Hide file tree
Showing 7 changed files with 208 additions and 645 deletions.
15 changes: 15 additions & 0 deletions FSExampleOAuth/FSExampleOAuth.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
F10698C91729B70E0053AF0B /* FSOAuth.m in Sources */ = {isa = PBXBuildFile; fileRef = F10698C81729B70E0053AF0B /* FSOAuth.m */; };
F175C8E01739BB7E007D7FF9 /* connect-blue.png in Resources */ = {isa = PBXBuildFile; fileRef = F175C8DE1739BB7E007D7FF9 /* connect-blue.png */; };
F175C8E11739BB7E007D7FF9 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = F175C8DF1739BB7E007D7FF9 /* [email protected] */; };
F189B5FD183EA2ED009FB6B0 /* StoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F189B5FC183EA2ED009FB6B0 /* StoreKit.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand All @@ -44,13 +45,15 @@
F10698C81729B70E0053AF0B /* FSOAuth.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = FSOAuth.m; path = ../../FSOAuth.m; sourceTree = "<group>"; };
F175C8DE1739BB7E007D7FF9 /* connect-blue.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "connect-blue.png"; sourceTree = "<group>"; };
F175C8DF1739BB7E007D7FF9 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
F189B5FC183EA2ED009FB6B0 /* StoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = StoreKit.framework; path = System/Library/Frameworks/StoreKit.framework; sourceTree = SDKROOT; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
F106989E1729B6F50053AF0B /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
F189B5FD183EA2ED009FB6B0 /* StoreKit.framework in Frameworks */,
F10698A51729B6F50053AF0B /* UIKit.framework in Frameworks */,
F10698A71729B6F50053AF0B /* Foundation.framework in Frameworks */,
F10698A91729B6F50053AF0B /* CoreGraphics.framework in Frameworks */,
Expand Down Expand Up @@ -80,6 +83,7 @@
F10698A31729B6F50053AF0B /* Frameworks */ = {
isa = PBXGroup;
children = (
F189B5FC183EA2ED009FB6B0 /* StoreKit.framework */,
F10698A41729B6F50053AF0B /* UIKit.framework */,
F10698A61729B6F50053AF0B /* Foundation.framework */,
F10698A81729B6F50053AF0B /* CoreGraphics.framework */,
Expand Down Expand Up @@ -147,6 +151,11 @@
CLASSPREFIX = FS;
LastUpgradeCheck = 0460;
ORGANIZATIONNAME = Foursquare;
TargetAttributes = {
F10698A01729B6F50053AF0B = {
DevelopmentTeam = ABUPJG7JQ3;
};
};
};
buildConfigurationList = F106989C1729B6F50053AF0B /* Build configuration list for PBXProject "FSExampleOAuth" */;
compatibilityVersion = "Xcode 3.2";
Expand Down Expand Up @@ -275,21 +284,27 @@
F10698C51729B6F50053AF0B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "FSExampleOAuth/FSExampleOAuth-Prefix.pch";
INFOPLIST_FILE = "FSExampleOAuth/FSExampleOAuth-Info.plist";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
WRAPPER_EXTENSION = app;
};
name = Debug;
};
F10698C61729B6F50053AF0B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "FSExampleOAuth/FSExampleOAuth-Prefix.pch";
INFOPLIST_FILE = "FSExampleOAuth/FSExampleOAuth-Info.plist";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
WRAPPER_EXTENSION = app;
};
name = Release;
Expand Down
4 changes: 3 additions & 1 deletion FSExampleOAuth/FSExampleOAuth/FSViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ - (void)connectTapped:(id)sender {

[self dismissKeyboard:nil];

FSOAuthStatusCode statusCode = [FSOAuth authorizeUserUsingClientId:self.clientIdField.text callbackURIString:self.callbackUrlField.text];
FSOAuthStatusCode statusCode = [FSOAuth authorizeUserUsingClientId:self.clientIdField.text
callbackURIString:self.callbackUrlField.text
allowShowingAppStore:YES];

NSString *resultText = nil;

Expand Down
Loading

0 comments on commit 4d49a20

Please sign in to comment.