Skip to content

Commit 4a4bc54

Browse files
committed
Merge pull request #327 from ParsePlatform/nlutsenko.watch.installation
Exclude PFInstallation from watchOS target.
2 parents 9e866f0 + bf64869 commit 4a4bc54

File tree

10 files changed

+27
-34
lines changed

10 files changed

+27
-34
lines changed

Parse.xcodeproj/project.pbxproj

Lines changed: 0 additions & 24 deletions
Large diffs are not rendered by default.

Parse/Internal/Installation/Controller/PFInstallationController.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
NS_ASSUME_NONNULL_BEGIN
1616

17-
@interface PFInstallationController : NSObject <PFObjectControlling>
17+
PF_WATCH_UNAVAILABLE @interface PFInstallationController : NSObject <PFObjectControlling>
1818

1919
@property (nonatomic, weak, readonly) id<PFObjectControllerProvider, PFCurrentInstallationControllerProvider> dataSource;
2020

Parse/Internal/Installation/CurrentInstallationController/PFCurrentInstallationController.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ extern NSString *const PFCurrentInstallationPinName;
2222
@class BFTask PF_GENERIC(__covariant BFGenericType);
2323
@class PFInstallation;
2424

25-
@interface PFCurrentInstallationController : NSObject <PFCurrentObjectControlling>
25+
PF_WATCH_UNAVAILABLE @interface PFCurrentInstallationController : NSObject <PFCurrentObjectControlling>
2626

2727
@property (nonatomic, weak, readonly) id<PFFileManagerProvider, PFInstallationIdentifierStoreProvider> commonDataSource;
2828
@property (nonatomic, weak, readonly) id<PFObjectFilePersistenceControllerProvider> coreDataSource;

Parse/Internal/PFCoreManager.m

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,8 @@ - (void)setSessionController:(PFSessionController *)sessionController {
339339
});
340340
}
341341

342+
#if !TARGET_OS_WATCH
343+
342344
///--------------------------------------
343345
#pragma mark - Current Installation Controller
344346
///--------------------------------------
@@ -366,6 +368,8 @@ - (void)setCurrentInstallationController:(PFCurrentInstallationController *)cont
366368
});
367369
}
368370

371+
#endif
372+
369373
///--------------------------------------
370374
#pragma mark - Current User Controller
371375
///--------------------------------------
@@ -393,6 +397,8 @@ - (void)setCurrentUserController:(PFCurrentUserController *)currentUserControlle
393397
});
394398
}
395399

400+
#if !TARGET_OS_WATCH
401+
396402
///--------------------------------------
397403
#pragma mark - Installation Controller
398404
///--------------------------------------
@@ -414,6 +420,8 @@ - (void)setInstallationController:(PFInstallationController *)installationContro
414420
});
415421
}
416422

423+
#endif
424+
417425
///--------------------------------------
418426
#pragma mark - User Controller
419427
///--------------------------------------

Parse/Internal/ParseManager.m

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,8 @@ - (void)unloadCoreManager {
293293
});
294294
}
295295

296+
#if !TARGET_OS_WATCH
297+
296298
#pragma mark PushManager
297299

298300
- (PFPushManager *)pushManager {
@@ -312,6 +314,8 @@ - (void)setPushManager:(PFPushManager *)pushManager {
312314
});
313315
}
314316

317+
#endif
318+
315319
#pragma mark AnalyticsController
316320

317321
- (PFAnalyticsController *)analyticsController {
@@ -368,8 +372,10 @@ - (BFTask *)preloadDiskObjectsToMemoryAsync {
368372
@strongify(self);
369373
[PFUser currentUser];
370374
[PFConfig currentConfig];
375+
#if !TARGET_OS_WATCH
371376
[PFInstallation currentInstallation];
372-
377+
#endif
378+
373379
[self eventuallyQueue];
374380

375381
return nil;

Parse/Internal/Push/ChannelsController/PFPushChannelsController.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
NS_ASSUME_NONNULL_BEGIN
1919

20-
@interface PFPushChannelsController : NSObject
20+
PF_WATCH_UNAVAILABLE @interface PFPushChannelsController : NSObject
2121

2222
@property (nonatomic, weak, readonly) id<PFCurrentInstallationControllerProvider> dataSource;
2323

Parse/Internal/Push/Manager/PFPushManager.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
#import <Foundation/Foundation.h>
1111

12+
#import <Parse/PFConstants.h>
13+
1214
#import "PFCoreDataProvider.h"
1315
#import "PFDataProvider.h"
1416

@@ -17,7 +19,7 @@
1719

1820
NS_ASSUME_NONNULL_BEGIN
1921

20-
@interface PFPushManager : NSObject
22+
PF_WATCH_UNAVAILABLE @interface PFPushManager : NSObject
2123

2224
@property (nonatomic, weak, readonly) id<PFCommandRunnerProvider> commonDataSource;
2325
@property (nonatomic, weak, readonly) id<PFCurrentInstallationControllerProvider> coreDataSource;

Parse/PFInstallation.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ PF_ASSUME_NONNULL_BEGIN
3333
the Parse cloud can be used to target push notifications.
3434
*/
3535

36-
@interface PFInstallation : PFObject<PFSubclassing>
36+
PF_WATCH_UNAVAILABLE @interface PFInstallation : PFObject<PFSubclassing>
3737

3838
///--------------------------------------
3939
/// @name Accessing the Current Installation

Parse/PFQuery.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -607,8 +607,7 @@ typedef void (^PFQueryArrayResultBlock)(NSArray PF_GENERIC(PFGenericObject) * PF
607607
@param error Pointer to an NSError that will be set if necessary.
608608
@result The PFUser if found. Returns nil if the object isn't found, or if there was an error.
609609
*/
610-
+ (PF_NULLABLE PFUser *)getUserObjectWithId:(NSString *)objectId
611-
error:(NSError **)error;
610+
+ (PF_NULLABLE PFUser *)getUserObjectWithId:(NSString *)objectId error:(NSError **)error;
612611

613612
/*!
614613
@deprecated Please use [PFUser query] instead.

Parse/Parse.m

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,15 @@ + (void)setApplicationId:(NSString *)applicationId clientKey:(NSString *)clientK
7272
// We're forced to register subclasses directly this way, in order to prevent a deadlock.
7373
// If we ever switch to bundle scanning, this code can go away.
7474
[subclassingController registerSubclass:[PFUser class]];
75-
[subclassingController registerSubclass:[PFInstallation class]];
7675
[subclassingController registerSubclass:[PFSession class]];
7776
[subclassingController registerSubclass:[PFRole class]];
7877
[subclassingController registerSubclass:[PFPin class]];
7978
[subclassingController registerSubclass:[PFEventuallyPin class]];
80-
#if TARGET_OS_IPHONE
79+
#if !TARGET_OS_WATCH
80+
[subclassingController registerSubclass:[PFInstallation class]];
81+
#if TARGET_OS_IOS
8182
[subclassingController registerSubclass:[PFProduct class]];
83+
#endif
8284
#endif
8385

8486
[currentParseManager_ preloadDiskObjectsToMemoryAsync];

0 commit comments

Comments
 (0)