Skip to content

Commit c8013d5

Browse files
authored
Merge pull request #135 from tumblr/paulrehkugler/fix-build
Flag UIKit Things Out of macOS Version
2 parents 57d0922 + 47321a1 commit c8013d5

File tree

4 files changed

+20
-0
lines changed

4 files changed

+20
-0
lines changed

TMTumblrSDK/Authentication/TMTumblrAuthenticator.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88

99
@import Foundation;
1010

11+
#ifdef __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__
12+
#import <UIKit/UIKit.h>
13+
#endif
14+
1115
typedef void (^TMAuthenticationCallback)(NSString *token, NSString *secret, NSError *error);
1216

1317
/**

TMTumblrSDK/Authentication/TMTumblrAuthenticator.m

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@
2323
typedef void (^NSURLConnectionCompletionHandler)(NSURLResponse *, NSData *, NSError *);
2424
typedef void (^TMHandleAuthenticationURLCallback)(NSURL *authURL);
2525

26+
#if __IPHONE_OS_VERSION_MIN_REQUIRED
2627
@interface TMTumblrAuthenticator() <TMWebViewControllerDelegate>
28+
#else
29+
@interface TMTumblrAuthenticator()
30+
#endif
2731

2832
@property (nonatomic, copy) TMAuthenticationCallback threeLeggedOAuthCallback;
2933
@property (nonatomic, copy) NSString *threeLeggedOAuthTokenSecret;
@@ -238,6 +242,8 @@ - (void)xAuth:(NSString *)emailAddress password:(NSString *)password callback:(T
238242
[NSURLConnection sendAsynchronousRequest:request queue:[NSOperationQueue mainQueue] completionHandler:handler];
239243
}
240244

245+
#if __IPHONE_OS_VERSION_MIN_REQUIRED
246+
241247
#pragma mark - SFSafariViewControllerDelegate
242248

243249
- (void)safariViewControllerDidFinish:(UIViewController *)controller {
@@ -266,6 +272,8 @@ - (void)webViewControllerDidFinish:(TMWebViewController *)controller {
266272
}];
267273
}
268274

275+
#endif
276+
269277
#pragma mark - Helpers
270278

271279
+ (void)signRequest:(NSMutableURLRequest *)request

TMTumblrSDK/Authentication/TMWebViewController.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
// Copyright (c) 2016 Tumblr. All rights reserved.
77
//
88

9+
#if __IPHONE_OS_VERSION_MIN_REQUIRED
10+
911
#import <UIKit/UIKit.h>
1012

1113
@protocol TMWebViewControllerDelegate;
@@ -28,3 +30,5 @@
2830
- (void)webViewControllerDidFinish:(TMWebViewController *)controller;
2931

3032
@end
33+
34+
#endif

TMTumblrSDK/Authentication/TMWebViewController.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
#import "TMWebViewController.h"
1010

11+
#if __IPHONE_OS_VERSION_MIN_REQUIRED
12+
1113
@interface TMWebViewController ()
1214

1315
@property (nonatomic) UIWebView *webView;
@@ -56,3 +58,5 @@ - (void)dismissAction {
5658
}
5759

5860
@end
61+
62+
#endif

0 commit comments

Comments
 (0)