no message

This commit is contained in:
Giuseppe Nucifora 2016-04-29 10:40:09 +02:00
parent def9c0fd06
commit a5550fb7c2
2 changed files with 25 additions and 3 deletions

View File

@ -41,6 +41,10 @@ typedef NS_ENUM(NSInteger, PNInstallationType) {
*/
- (void) resetBadge;
- (void) setRegistered;
- (void) setUpdated;
///--------------------------------------
#pragma mark - PNInstallation Properties
///--------------------------------------
@ -80,6 +84,14 @@ typedef NS_ENUM(NSInteger, PNInstallationType) {
/**
* <#Description#>
*/
@property (nonatomic, strong, readonly, nullable) NSDate *lastUpdate;
@property (nonatomic, strong, readonly, nullable) NSDate *registeredAt;
/**
* <#Description#>
*/
@property (nonatomic, strong, readonly, nullable) NSDate *updatedAt;
/**
* <#Description#>
*/
@property (nonatomic, strong, readonly, nullable) NSDate *lastTokenUpdate;
@end

View File

@ -37,7 +37,9 @@ static bool isFirstAccess = YES;
@"oldDeviceToken":@"oldDeviceToken",
@"badge":@"badge",
@"localeIdentifier":@"localeIdentifier",
@"lastUpdate":@"lastUpdate",
@"registeredAt":@"registeredAt",
@"updatedAt":@"updatedAt",
@"lastTokenUpdate":@"lastTokenUpdate",
};
return mapping;
}
@ -95,7 +97,7 @@ static bool isFirstAccess = YES;
_oldDeviceToken = _deviceToken;
_deviceToken = ptoken;
if (response != PNInstallationTypeNone) {
_lastUpdate = [NSDate date];
_lastTokenUpdate = [NSDate date];
}
return response;
@ -113,6 +115,14 @@ static bool isFirstAccess = YES;
[[UIApplication sharedApplication] setApplicationIconBadgeNumber:0];
}
- (void) setRegistered {
_registeredAt = [NSDate date];
}
- (void) setUpdated {
_updatedAt = [NSDate date];
}
#pragma mark -
#pragma mark Private Methods