- add last update in PNInstallation object

This commit is contained in:
giuseppenuc committed 2016-04-29 10:13:10 +02:00
1 parent eafe9188c3
commit 052fa21981
3 files changed
+9 -1

No files matched your search

+4
View File
@@ -72,5 +72,9 @@ typedef NS_ENUM(NSInteger, PNInstallationType) {
* <#Description#>
*/
@property (nonatomic, assign) NSInteger badge;
/**
* <#Description#>
*/
@property (nonatomic, strong) NSDate *lastUpdate;
@end
+4
View File
@@ -37,6 +37,7 @@ static bool isFirstAccess = YES;
@"oldDeviceToken":@"oldDeviceToken",
@"badge":@"badge",
@"localeIdentifier":@"localeIdentifier",
@"lastUpdate":@"lastUpdate",
};
return mapping;
}
@@ -93,6 +94,9 @@ static bool isFirstAccess = YES;
*/
_oldDeviceToken = _deviceToken;
_deviceToken = ptoken;
if (response != PNInstallationTypeNone) {
_lastUpdate = [NSDate date];
}
return response;
}