Skip to content

Commit 038010d

Browse files
committed
Merge pull request #554 from ParsePlatform/nlutsenko.osx.unavailable
Mark unavailable classes on OS X as such with macros.
2 parents d17795d + da7c391 commit 038010d

File tree

6 files changed

+18
-6
lines changed

6 files changed

+18
-6
lines changed

Parse/Internal/PFAlertView.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,14 @@
1010
#import <Foundation/Foundation.h>
1111
#import <UIKit/UIKit.h>
1212

13+
#import <Parse/PFConstants.h>
14+
15+
PF_OSX_UNAVAILABLE_WARNING
16+
PF_WATCH_UNAVAILABLE_WARNING
17+
1318
typedef void(^PFAlertViewCompletion)(NSUInteger selectedOtherButtonIndex);
1419

15-
@interface PFAlertView : NSObject
20+
PF_OSX_UNAVAILABLE PF_WATCH_UNAVAILABLE @interface PFAlertView : NSObject
1621

1722
+ (void)showAlertWithTitle:(NSString *)title
1823
message:(NSString *)message

Parse/Internal/Product/ProductsRequestHandler/PFProductsRequestHandler.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@
1212

1313
#import <Parse/PFConstants.h>
1414

15+
PF_OSX_UNAVAILABLE_WARNING
1516
PF_WATCH_UNAVAILABLE_WARNING
1617

1718
@class BFTask PF_GENERIC(__covariant BFGenericType);
1819

19-
PF_WATCH_UNAVAILABLE @interface PFProductsRequestResult : NSObject
20+
PF_OSX_UNAVAILABLE PF_WATCH_UNAVAILABLE @interface PFProductsRequestResult : NSObject
2021

2122
@property (nonatomic, copy, readonly) NSSet *validProducts;
2223
@property (nonatomic, copy, readonly) NSSet *invalidProductIdentifiers;

Parse/Internal/Purchase/Controller/PFPurchaseController.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
#import "PFDataProvider.h"
1515

16+
PF_OSX_UNAVAILABLE_WARNING
1617
PF_WATCH_UNAVAILABLE_WARNING
1718

1819
@class BFTask PF_GENERIC(__covariant BFGenericType);
@@ -24,7 +25,7 @@ PF_WATCH_UNAVAILABLE_WARNING
2425
@class SKPaymentQueue;
2526
@class SKPaymentTransaction;
2627

27-
PF_WATCH_UNAVAILABLE @interface PFPurchaseController : NSObject
28+
PF_OSX_UNAVAILABLE PF_WATCH_UNAVAILABLE @interface PFPurchaseController : NSObject
2829

2930
@property (nonatomic, weak, readonly) id<PFCommandRunnerProvider, PFFileManagerProvider> dataSource;
3031
@property (nonatomic, strong, readonly) NSBundle *bundle;

Parse/Internal/Purchase/PaymentTransactionObserver/PFPaymentTransactionObserver.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
#import <Parse/PFConstants.h>
1414

15+
PF_OSX_UNAVAILABLE_WARNING
1516
PF_WATCH_UNAVAILABLE_WARNING
1617

1718
/*!
@@ -23,7 +24,7 @@ PF_WATCH_UNAVAILABLE_WARNING
2324
* 4) when the business logic finishes, the observer completes the transaction. If the business logic does not finish, the transaction is not completed, which means the user does not get charged,
2425
* 5) after the transaction finishes, custom UI logic is run.
2526
*/
26-
PF_WATCH_UNAVAILABLE @interface PFPaymentTransactionObserver : NSObject <SKPaymentTransactionObserver>
27+
PF_OSX_UNAVAILABLE PF_WATCH_UNAVAILABLE @interface PFPaymentTransactionObserver : NSObject <SKPaymentTransactionObserver>
2728

2829
- (void)handle:(NSString *)productIdentifier block:(void (^)(SKPaymentTransaction *))block;
2930
- (void)handle:(NSString *)productIdentifier runOnceBlock:(void (^)(NSError *))block;

Parse/PFProduct.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#import <Parse/PFObject.h>
1414
#import <Parse/PFSubclassing.h>
1515

16+
PF_OSX_UNAVAILABLE_WARNING
1617
PF_WATCH_UNAVAILABLE_WARNING
1718

1819
NS_ASSUME_NONNULL_BEGIN
@@ -24,7 +25,7 @@ NS_ASSUME_NONNULL_BEGIN
2425
2526
This class is currently for iOS only.
2627
*/
27-
PF_WATCH_UNAVAILABLE @interface PFProduct : PFObject<PFSubclassing>
28+
PF_OSX_UNAVAILABLE PF_WATCH_UNAVAILABLE @interface PFProduct : PFObject<PFSubclassing>
2829

2930
///--------------------------------------
3031
/// @name Product-specific Properties

Parse/PFPurchase.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212

1313
#import <Parse/PFConstants.h>
1414

15+
PF_OSX_UNAVAILABLE_WARNING
16+
PF_WATCH_UNAVAILABLE_WARNING
17+
1518
@class PFProduct;
1619

1720
NS_ASSUME_NONNULL_BEGIN
@@ -25,7 +28,7 @@ typedef void (^PFPurchaseDownloadAssetResultBlock)(NSString *__nullable filePath
2528
2629
This class is currently for iOS only.
2730
*/
28-
@interface PFPurchase : NSObject
31+
PF_OSX_UNAVAILABLE PF_WATCH_UNAVAILABLE @interface PFPurchase : NSObject
2932

3033
/*!
3134
@abstract Add application logic block which is run when buying a product.

0 commit comments

Comments
 (0)