diff --git a/Source/ARTBaseMessage.h b/Source/ARTBaseMessage.h index e8a485e68..94b4dc481 100644 --- a/Source/ARTBaseMessage.h +++ b/Source/ARTBaseMessage.h @@ -22,7 +22,7 @@ NS_ASSUME_NONNULL_BEGIN @property (strong, nonatomic, nullable) id data; -@property (nullable, nonatomic) id extras; +@property (strong, nullable, nonatomic) id extras; - (NSString *)description; diff --git a/Source/ARTDeviceDetails.h b/Source/ARTDeviceDetails.h index e772ecef4..623ba62ff 100644 --- a/Source/ARTDeviceDetails.h +++ b/Source/ARTDeviceDetails.h @@ -7,12 +7,12 @@ NS_ASSUME_NONNULL_BEGIN @interface ARTDeviceDetails : NSObject -@property (nonatomic) ARTDeviceId *id; -@property (nullable, nonatomic) NSString *clientId; -@property (nonatomic) NSString *platform; -@property (nonatomic) NSString *formFactor; -@property (nonatomic) NSMutableDictionary *metadata; -@property (nonatomic) ARTDevicePushDetails *push; +@property (strong, nonatomic) ARTDeviceId *id; +@property (strong, nullable, nonatomic) NSString *clientId; +@property (strong, nonatomic) NSString *platform; +@property (strong, nonatomic) NSString *formFactor; +@property (strong, nonatomic) NSDictionary *metadata; +@property (strong, nonatomic) ARTDevicePushDetails *push; - (instancetype)init; - (instancetype)initWithId:(ARTDeviceId *)deviceId; diff --git a/Source/ARTDeviceDetails.m b/Source/ARTDeviceDetails.m index 132c2cc57..03e640bb3 100644 --- a/Source/ARTDeviceDetails.m +++ b/Source/ARTDeviceDetails.m @@ -6,7 +6,7 @@ @implementation ARTDeviceDetails - (instancetype)init { if (self = [super init]) { _push = [[ARTDevicePushDetails alloc] init]; - _metadata = [[NSMutableDictionary alloc] init]; + _metadata = [[NSDictionary alloc] init]; } return self; } @@ -21,10 +21,10 @@ - (instancetype)initWithId:(ARTDeviceId *)deviceId { - (id)copyWithZone:(NSZone *)zone { ARTDeviceDetails *device = [[[self class] allocWithZone:zone] init]; - device.id = self.id; - device.clientId = self.clientId; - device.platform = self.platform; - device.formFactor = self.formFactor; + device.id = [self.id copy]; + device.clientId = [self.clientId copy]; + device.platform = [self.platform copy]; + device.formFactor = [self.formFactor copy]; device.metadata = [self.metadata copy]; device.push = [self.push copy]; diff --git a/Source/ARTDevicePushDetails.h b/Source/ARTDevicePushDetails.h index 18de18e92..66556fc17 100644 --- a/Source/ARTDevicePushDetails.h +++ b/Source/ARTDevicePushDetails.h @@ -6,9 +6,9 @@ NS_ASSUME_NONNULL_BEGIN @interface ARTDevicePushDetails : NSObject -@property (nonatomic) NSMutableDictionary *recipient; -@property (nullable, nonatomic) NSString *state; -@property (nullable, nonatomic) ARTErrorInfo *errorReason; +@property (strong, nonatomic) NSMutableDictionary *recipient; +@property (strong, nullable, nonatomic) NSString *state; +@property (strong, nullable, nonatomic) ARTErrorInfo *errorReason; - (instancetype)init; diff --git a/Source/ARTLocalDevice.h b/Source/ARTLocalDevice.h index 1c7e4a726..866bf1240 100644 --- a/Source/ARTLocalDevice.h +++ b/Source/ARTLocalDevice.h @@ -12,7 +12,7 @@ NS_ASSUME_NONNULL_BEGIN /** Device secret generated using random data with sufficient entropy. It's a sha256 digest encoded with base64. */ -@property (nullable, nonatomic) ARTDeviceSecret *secret; +@property (strong, nullable, nonatomic) ARTDeviceSecret *secret; - (instancetype)init NS_UNAVAILABLE; diff --git a/Source/ARTPresenceMap.h b/Source/ARTPresenceMap.h index 3f8c1c416..6b358035b 100644 --- a/Source/ARTPresenceMap.h +++ b/Source/ARTPresenceMap.h @@ -29,7 +29,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nullable, weak) id delegate; // weak because delegates outlive their counterpart @property (readwrite, nonatomic, assign) int64_t syncMsgSerial; -@property (readwrite, nonatomic, nullable) NSString *syncChannelSerial; +@property (strong, readwrite, nonatomic, nullable) NSString *syncChannelSerial; @property (readonly, nonatomic, assign) NSUInteger syncSessionId; @property (readonly, nonatomic, getter=syncComplete) BOOL syncComplete; @property (readonly, nonatomic, getter=syncInProgress) BOOL syncInProgress; diff --git a/Source/ARTProtocolMessage.h b/Source/ARTProtocolMessage.h index 31c6fe651..8ae70d440 100644 --- a/Source/ARTProtocolMessage.h +++ b/Source/ARTProtocolMessage.h @@ -55,8 +55,8 @@ NS_ASSUME_NONNULL_BEGIN @property (nullable, readwrite, strong, nonatomic) NSArray *messages; @property (nullable, readwrite, strong, nonatomic) NSArray *presence; @property (readwrite, assign, nonatomic) int64_t flags; -@property (nullable, readwrite, nonatomic) ARTConnectionDetails *connectionDetails; -@property (nullable, nonatomic) ARTAuthDetails *auth; +@property (strong, nullable, readwrite, nonatomic) ARTConnectionDetails *connectionDetails; +@property (strong, nullable, nonatomic) ARTAuthDetails *auth; @property (nonatomic, strong, nullable) NSStringDictionary *params; @end diff --git a/Spec/Tests/PushAdminTests.swift b/Spec/Tests/PushAdminTests.swift index 5c2545efb..22a6e7c4f 100644 --- a/Spec/Tests/PushAdminTests.swift +++ b/Spec/Tests/PushAdminTests.swift @@ -26,7 +26,7 @@ class PushAdminTests: XCTestCase { let deviceDetails = ARTDeviceDetails(id: "testDeviceDetails") deviceDetails.platform = "ios" deviceDetails.formFactor = "phone" - deviceDetails.metadata = NSMutableDictionary() + deviceDetails.metadata = [String : String]() deviceDetails.push.recipient = [ "transportType": "apns", "deviceToken": "foo", @@ -39,7 +39,7 @@ class PushAdminTests: XCTestCase { deviceDetails.platform = "android" deviceDetails.formFactor = "tablet" deviceDetails.clientId = "clientA" - deviceDetails.metadata = NSMutableDictionary() + deviceDetails.metadata = [String : String]() deviceDetails.push.recipient = [ "transportType": "gcm", "registrationToken": "qux", @@ -52,7 +52,7 @@ class PushAdminTests: XCTestCase { deviceDetails.platform = "android" deviceDetails.formFactor = "tablet" deviceDetails.clientId = "clientA" - deviceDetails.metadata = NSMutableDictionary() + deviceDetails.metadata = [String : String]() deviceDetails.push.recipient = [ "transportType": "gcm", "registrationToken": "qux", @@ -65,7 +65,7 @@ class PushAdminTests: XCTestCase { deviceDetails.platform = "android" deviceDetails.formFactor = "tablet" deviceDetails.clientId = "clientB" - deviceDetails.metadata = NSMutableDictionary() + deviceDetails.metadata = [String : String]() deviceDetails.push.recipient = [ "transportType": "gcm", "registrationToken": "qux",