- add last update in PNInstallation object

This commit is contained in:
Giuseppe Nucifora 2016-04-29 10:13:10 +02:00
parent eafe9188c3
commit 052fa21981
3 changed files with 9 additions and 1 deletions

View File

@ -8,7 +8,7 @@
Pod::Spec.new do |s| Pod::Spec.new do |s|
s.name = "PNObject" s.name = "PNObject"
s.version = "0.7.6" s.version = "0.7.7"
s.summary = "PNObject is a simple replica of the more complex ParseObject" s.summary = "PNObject is a simple replica of the more complex ParseObject"
# This description is used to generate tags and improve search results. # This description is used to generate tags and improve search results.

View File

@ -72,5 +72,9 @@ typedef NS_ENUM(NSInteger, PNInstallationType) {
* <#Description#> * <#Description#>
*/ */
@property (nonatomic, assign) NSInteger badge; @property (nonatomic, assign) NSInteger badge;
/**
* <#Description#>
*/
@property (nonatomic, strong) NSDate *lastUpdate;
@end @end

View File

@ -37,6 +37,7 @@ static bool isFirstAccess = YES;
@"oldDeviceToken":@"oldDeviceToken", @"oldDeviceToken":@"oldDeviceToken",
@"badge":@"badge", @"badge":@"badge",
@"localeIdentifier":@"localeIdentifier", @"localeIdentifier":@"localeIdentifier",
@"lastUpdate":@"lastUpdate",
}; };
return mapping; return mapping;
} }
@ -93,6 +94,9 @@ static bool isFirstAccess = YES;
*/ */
_oldDeviceToken = _deviceToken; _oldDeviceToken = _deviceToken;
_deviceToken = ptoken; _deviceToken = ptoken;
if (response != PNInstallationTypeNone) {
_lastUpdate = [NSDate date];
}
return response; return response;
} }