1414#import " PFQueryState.h"
1515#import " PFAssert.h"
1616
17+ NS_ASSUME_NONNULL_BEGIN
18+
1719@implementation PFPushState
1820
1921// /--------------------------------------
2022#pragma mark - PFBaseStateSubclass
2123// /--------------------------------------
2224
2325+ (NSDictionary *)propertyAttributes {
24- return @{ @" channels" : [PFPropertyAttributes attributesWithAssociationType: PFPropertyInfoAssociationTypeCopy],
25- @" queryState" : [PFPropertyAttributes attributesWithAssociationType: PFPropertyInfoAssociationTypeCopy],
26- @" expirationDate" : [PFPropertyAttributes attributesWithAssociationType: PFPropertyInfoAssociationTypeStrong],
27- @" expirationTimeInterval" : [PFPropertyAttributes attributesWithAssociationType: PFPropertyInfoAssociationTypeStrong],
28- @" pushDate" : [PFPropertyAttributes attributesWithAssociationType: PFPropertyInfoAssociationTypeStrong],
29- @" payload" : [PFPropertyAttributes attributesWithAssociationType: PFPropertyInfoAssociationTypeCopy] };
26+ return @{ PFPushStatePropertyName ( channels) : [PFPropertyAttributes attributesWithAssociationType: PFPropertyInfoAssociationTypeCopy],
27+ PFPushStatePropertyName ( queryState) : [PFPropertyAttributes attributesWithAssociationType: PFPropertyInfoAssociationTypeCopy],
28+ PFPushStatePropertyName ( expirationDate) : [PFPropertyAttributes attributesWithAssociationType: PFPropertyInfoAssociationTypeStrong],
29+ PFPushStatePropertyName ( expirationTimeInterval) : [PFPropertyAttributes attributesWithAssociationType: PFPropertyInfoAssociationTypeStrong],
30+ PFPushStatePropertyName ( pushDate) : [PFPropertyAttributes attributesWithAssociationType: PFPropertyInfoAssociationTypeStrong],
31+ PFPushStatePropertyName ( payload) : [PFPropertyAttributes attributesWithAssociationType: PFPropertyInfoAssociationTypeCopy] };
3032}
3133
3234// /--------------------------------------
3335#pragma mark - Init
3436// /--------------------------------------
3537
36- - (instancetype )initWithState : (PFPushState *)state {
38+ - (instancetype )initWithState : (nullable PFPushState *)state {
3739 return [super initWithState: state];
3840}
3941
40- + (instancetype )stateWithState : (PFPushState *)state {
42+ + (instancetype )stateWithState : (nullable PFPushState *)state {
4143 return [super stateWithState: state];
4244}
4345
4446// /--------------------------------------
4547#pragma mark - NSCopying
4648// /--------------------------------------
4749
48- - (void )setPushDate : (NSDate *)pushDate {
50+ - (void )setPushDate : (nullable NSDate *)pushDate {
4951 if (self.pushDate != pushDate) {
5052 NSTimeInterval interval = pushDate.timeIntervalSinceNow ;
5153 PFParameterAssert (interval > 0 , @" Can't set the scheduled push time in the past." );
@@ -58,16 +60,18 @@ - (void)setPushDate:(NSDate *)pushDate {
5860#pragma mark - NSCopying
5961// /--------------------------------------
6062
61- - (id )copyWithZone : (NSZone *)zone {
63+ - (id )copyWithZone : (nullable NSZone *)zone {
6264 return [[PFPushState allocWithZone: zone] initWithState: self ];
6365}
6466
6567// /--------------------------------------
6668#pragma mark - NSMutableCopying
6769// /--------------------------------------
6870
69- - (id )mutableCopyWithZone : (NSZone *)zone {
71+ - (id )mutableCopyWithZone : (nullable NSZone *)zone {
7072 return [[PFMutablePushState allocWithZone: zone] initWithState: self ];
7173}
7274
7375@end
76+
77+ NS_ASSUME_NONNULL_END
0 commit comments