Skip to content

Commit 7b60e1c

Browse files
authored
change method to properties (#374)
* change method to properties * fix nullability
1 parent a7291c5 commit 7b60e1c

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

Leanplum-SDK/Classes/LPInbox.h

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -38,50 +38,50 @@ NS_SWIFT_NAME(LeanplumInbox.Message)
3838
/**
3939
* Returns the message identifier of the inbox message.
4040
*/
41-
- (NSString *)messageId;
41+
@property (strong, nonatomic, readonly, nonnull) NSString *messageId;
4242

4343
/**
4444
* Returns the title of the inbox message.
4545
*/
46-
- (NSString *)title;
46+
@property (strong, nonatomic, readonly, nonnull) NSString *title;
4747

4848
/**
4949
* Returns the subtitle of the inbox message.
5050
*/
51-
- (NSString *)subtitle;
51+
@property (strong, nonatomic, readonly, nonnull) NSString *subtitle;
5252

5353
/**
5454
* Returns the image path of the inbox message. Can be nil.
5555
* Use with [UIImage contentsOfFile:].
5656
*/
57-
- (nullable NSString *)imageFilePath;
57+
@property (strong, nonatomic, readonly, nullable) NSString *imageFilePath;
5858

5959
/**
6060
* Returns the image URL of the inbox message.
6161
* You can safely use this with prefetching enabled.
6262
* It will return the file URL path instead if the image is in cache.
6363
*/
64-
- (nullable NSURL *)imageURL;
64+
@property (strong, nonatomic, readonly, nullable) NSURL *imageURL;
6565

6666
/**
6767
* Returns the data of the inbox message. Advanced use only.
6868
*/
69-
- (nullable NSDictionary *)data;
69+
@property (strong, nonatomic, readonly, nullable) NSDictionary *data;
7070

7171
/**
7272
* Returns the delivery timestamp of the inbox message.
7373
*/
74-
- (nullable NSDate *)deliveryTimestamp;
74+
@property (strong, nonatomic, readonly, nullable) NSDate *deliveryTimestamp;
7575

7676
/**
7777
* Return the expiration timestamp of the inbox message.
7878
*/
79-
- (nullable NSDate *)expirationTimestamp;
79+
@property (strong, nonatomic, readonly, nullable) NSDate *expirationTimestamp;
8080

8181
/**
8282
* Returns YES if the inbox message is read.
8383
*/
84-
- (BOOL)isRead;
84+
@property (assign, nonatomic, readonly) BOOL isRead;
8585

8686
/**
8787
* Read the inbox message, marking it as read and invoking its open action.
@@ -113,33 +113,33 @@ NS_SWIFT_NAME(LeanplumInbox)
113113
/**
114114
* Returns the number of all inbox messages on the device.
115115
*/
116-
- (NSUInteger)count;
116+
@property (assign, nonatomic, readonly) NSUInteger count;
117117

118118
/**
119119
* Returns the number of the unread inbox messages on the device.
120120
*/
121-
- (NSUInteger)unreadCount;
121+
@property (assign, nonatomic, readonly) NSUInteger unreadCount;
122122

123123
/**
124124
* Returns the identifiers of all inbox messages on the device sorted in ascending
125125
* chronological order, i.e. the id of the oldest message is the first one, and the most
126126
* recent one is the last one in the array.
127127
*/
128-
- (NSArray<NSString *> *)messagesIds;
128+
@property (strong, nonatomic, readonly, nonnull) NSArray<NSString *> *messagesIds;
129129

130130
/**
131131
* Returns an array containing all of the inbox messages (as LPInboxMessage objects)
132132
* on the device, sorted in ascending chronological order, i.e. the oldest message is the
133133
* first one, and the most recent one is the last one in the array.
134134
*/
135-
- (NSArray<LPInboxMessage *> *)allMessages;
135+
@property (strong, nonatomic, readonly, nonnull) NSArray<LPInboxMessage *> *allMessages;
136136

137137
/**
138138
* Returns an array containing all of the unread inbox messages on the device, sorted
139139
* in ascending chronological order, i.e. the oldest message is the first one, and the
140140
* most recent one is the last one in the array.
141141
*/
142-
- (NSArray<LPInboxMessage *> *)unreadMessages;
142+
@property (strong, nonatomic, readonly, nonnull) NSArray<LPInboxMessage *> *unreadMessages;
143143

144144
/**
145145
* Returns the inbox messages associated with the given messageId identifier.

0 commit comments

Comments
 (0)