Skip to content

Commit

Permalink
Add guard to unsupported features of iOS 8 extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
Damien Rambout committed Mar 29, 2015
1 parent a923a0a commit 112ecf8
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
20 changes: 15 additions & 5 deletions OAuth2Client.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
3E3000541DC3FD5BCDC62EBC /* Pods-OAuth2ClientTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OAuth2ClientTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-OAuth2ClientTests/Pods-OAuth2ClientTests.release.xcconfig"; sourceTree = "<group>"; };
824D5A6D123F68A8001177D5 /* NXOAuth2ClientDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NXOAuth2ClientDelegate.h; sourceTree = "<group>"; };
83DD991B6049465CB61E135B /* Pods-OAuth2ClientTests.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OAuth2ClientTests.xcconfig"; path = "Pods/Pods-OAuth2ClientTests.xcconfig"; sourceTree = "<group>"; };
9404FAC1123E3A6900397DD1 /* NXOAuth2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NXOAuth2.h; sourceTree = "<group>"; };
9429B3A812267A3100D31807 /* NXOAuth2Client.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NXOAuth2Client.h; sourceTree = "<group>"; };
9429B3A912267A3100D31807 /* NXOAuth2Client.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NXOAuth2Client.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -117,6 +117,7 @@
99F08DE9138BE8CE002A5401 /* NXOAuth2TrustDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NXOAuth2TrustDelegate.h; sourceTree = "<group>"; };
AA747D9E0F9514B9006C5449 /* OAuth2Client_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OAuth2Client_Prefix.pch; sourceTree = "<group>"; };
AACBBE490F95108600F1A2B1 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
B41D0679A4B0343F646C29DC /* Pods-OAuth2ClientTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OAuth2ClientTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-OAuth2ClientTests/Pods-OAuth2ClientTests.debug.xcconfig"; sourceTree = "<group>"; };
B9E2089E9E7941B7AF3D27AA /* libPods-OAuth2ClientTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-OAuth2ClientTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
D2AAC07E0554694100DB518D /* libOAuth2Client.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libOAuth2Client.a; sourceTree = BUILT_PRODUCTS_DIR; };
F6525B4313D593C900ACAE8F /* NXOAuth2Account+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NXOAuth2Account+Private.h"; sourceTree = SOURCE_ROOT; };
Expand Down Expand Up @@ -181,7 +182,7 @@
0867D69AFE84028FC02AAC07 /* Frameworks */,
034768DFFF38A50411DB9C8B /* Products */,
942FFCDE12315E2E00E6C65E /* Resources */,
83DD991B6049465CB61E135B /* Pods-OAuth2ClientTests.xcconfig */,
B8D5E78C3AD14156E0A3E07C /* Pods */,
);
name = OAuth2Client;
sourceTree = "<group>";
Expand Down Expand Up @@ -275,6 +276,15 @@
path = Tests;
sourceTree = "<group>";
};
B8D5E78C3AD14156E0A3E07C /* Pods */ = {
isa = PBXGroup;
children = (
B41D0679A4B0343F646C29DC /* Pods-OAuth2ClientTests.debug.xcconfig */,
3E3000541DC3FD5BCDC62EBC /* Pods-OAuth2ClientTests.release.xcconfig */,
);
name = Pods;
sourceTree = "<group>";
};
F6E1A11313D7128100B6DAC3 /* Private */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -488,7 +498,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Pods-OAuth2ClientTests-resources.sh\"\n";
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-OAuth2ClientTests/Pods-OAuth2ClientTests-resources.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
Expand Down Expand Up @@ -674,7 +684,7 @@
};
94B6CE6C19C1D0A300AA859B /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 83DD991B6049465CB61E135B /* Pods-OAuth2ClientTests.xcconfig */;
baseConfigurationReference = B41D0679A4B0343F646C29DC /* Pods-OAuth2ClientTests.debug.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
Expand Down Expand Up @@ -720,7 +730,7 @@
};
94B6CE6D19C1D0A300AA859B /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 83DD991B6049465CB61E135B /* Pods-OAuth2ClientTests.xcconfig */;
baseConfigurationReference = 3E3000541DC3FD5BCDC62EBC /* Pods-OAuth2ClientTests.release.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
Expand Down
4 changes: 2 additions & 2 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ PODS:
- Expecta (0.3.1)
- OCMock (3.1.1)
- OHHTTPStubs (3.1.5):
- OHHTTPStubs/Core
- OHHTTPStubs/Core (= 3.1.5)
- OHHTTPStubs/Core (3.1.5)
- Specta (0.2.1)

Expand All @@ -18,4 +18,4 @@ SPEC CHECKSUMS:
OHHTTPStubs: c1e362552b71b81e1deb7a80f44c51585b946c43
Specta: 9141310f46b1f68b676650ff2854e1ed0b74163a

COCOAPODS: 0.33.1
COCOAPODS: 0.36.1
2 changes: 2 additions & 0 deletions Sources/OAuth2Client/NXOAuth2AccountStore.m
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,7 @@ - (NSString *)accountTypeOfPendingOAuthClient:(NXOAuth2Client *)oauthClient;

- (void)oauthClientNeedsAuthentication:(NXOAuth2Client *)client;
{
#if !defined(NX_APP_EXTENSIONS)
NSString *accountType = [self accountTypeOfPendingOAuthClient:client];

NSDictionary *configuration;
Expand All @@ -476,6 +477,7 @@ - (void)oauthClientNeedsAuthentication:(NXOAuth2Client *)client;
#else
[[NSWorkspace sharedWorkspace] openURL:preparedURL];
#endif
#endif
}

- (void)oauthClientDidGetAccessToken:(NXOAuth2Client *)client;
Expand Down

0 comments on commit 112ecf8

Please sign in to comment.