Skip to content
This repository was archived by the owner on Jul 22, 2020. It is now read-only.

Commit 606ac0f

Browse files
fix some minor bugs and docs (#63)
1. getCount was hardcoded 2. we should test on changed value 3. doc fix.
1 parent d3f671a commit 606ac0f

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Iterable-iOS-SDK/IterableAPI.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ typedef void (^OnFailureHandler)(NSString *reason, NSData *_Nullable data);
479479
480480
@abstract displays a iOS system style notification with one button
481481
482-
@param title the NSDictionary containing the dialog options
482+
@param title the title of the dialog
483483
@param body the notification message body
484484
@param button the text of the left button
485485
@param callbackBlock the callback to send after a button on the notification is clicked

Iterable-iOS-SDK/IterableAPI.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1206,7 +1206,7 @@ - (void)spawnInAppNotification:(ITEActionBlock)callbackBlock
12061206
// documented in IterableAPI.h
12071207
- (void)getInAppMessages:(NSNumber *)count
12081208
{
1209-
[self getInAppMessages:@1 onSuccess:[IterableAPI defaultOnSuccess:@"getMessages"] onFailure:[IterableAPI defaultOnFailure:@"getMessages"]];
1209+
[self getInAppMessages:count onSuccess:[IterableAPI defaultOnSuccess:@"getMessages"] onFailure:[IterableAPI defaultOnFailure:@"getMessages"]];
12101210
}
12111211

12121212
// documented in IterableAPI.h

Iterable-iOS-SDKTests/IterableInAppNotificationTests.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ - (void)testGetPaddingFull {
8787
padding.bottom = [IterableInAppManager decodePadding:[payload objectForKey:@"bottom"]];
8888
padding.right = [IterableInAppManager decodePadding:[payload objectForKey:@"right"]];
8989

90-
XCTAssertTrue(UIEdgeInsetsEqualToEdgeInsets(insets, UIEdgeInsetsZero));
90+
XCTAssertTrue(UIEdgeInsetsEqualToEdgeInsets(padding, UIEdgeInsetsZero));
9191
}
9292

9393
- (void)testGetPaddingCenter {
@@ -104,7 +104,7 @@ - (void)testGetPaddingCenter {
104104
padding.bottom = [IterableInAppManager decodePadding:[payload objectForKey:@"bottom"]];
105105
padding.right = [IterableInAppManager decodePadding:[payload objectForKey:@"right"]];
106106

107-
XCTAssertTrue(UIEdgeInsetsEqualToEdgeInsets(insets, UIEdgeInsetsMake(-1, 0, -1, 0)));
107+
XCTAssertTrue(UIEdgeInsetsEqualToEdgeInsets(padding, UIEdgeInsetsMake(-1, 0, -1, 0)));
108108
}
109109

110110
- (void)testGetPaddingTop {
@@ -121,7 +121,7 @@ - (void)testGetPaddingTop {
121121
padding.bottom = [IterableInAppManager decodePadding:[payload objectForKey:@"bottom"]];
122122
padding.right = [IterableInAppManager decodePadding:[payload objectForKey:@"right"]];
123123

124-
XCTAssertTrue(UIEdgeInsetsEqualToEdgeInsets(insets, UIEdgeInsetsMake(0, 0, -1, 0)));
124+
XCTAssertTrue(UIEdgeInsetsEqualToEdgeInsets(padding, UIEdgeInsetsMake(0, 0, -1, 0)));
125125
}
126126

127127
- (void)testGetPaddingBottom {
@@ -137,7 +137,7 @@ - (void)testGetPaddingBottom {
137137
padding.bottom = [IterableInAppManager decodePadding:[payload objectForKey:@"bottom"]];
138138
padding.right = [IterableInAppManager decodePadding:[payload objectForKey:@"right"]];
139139

140-
XCTAssertTrue(UIEdgeInsetsEqualToEdgeInsets(insets, UIEdgeInsetsMake(-1, 0, 0, 0)));
140+
XCTAssertTrue(UIEdgeInsetsEqualToEdgeInsets(padding, UIEdgeInsetsMake(-1, 0, 0, 0)));
141141
}
142142

143143
- (void)testNotificationPaddingFull {

0 commit comments

Comments
 (0)