Skip to content

Commit 3b36c00

Browse files
emawbyjkasten2
authored andcommitted
returning if iOS version is less than 8
In presentDialogWithMessageDict making sure to use an alertview instead and return. Fixing comments
1 parent 1f23455 commit 3b36c00

File tree

3 files changed

+5
-22
lines changed

3 files changed

+5
-22
lines changed

iOS_SDK/OneSignalSDK/Source/OneSignalAlertViewDelegate.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ @implementation OneSignalAlertViewDelegate
7777

7878
NSDictionary* mMessageDict;
7979

80-
81-
//delegateReference exist to keep ARC from cleaning up this object when it goes out of scope.
82-
//This is becuase UIAlertView delegate is set to weak instead of strong
83-
80+
/*
81+
delegateReference exist to keep ARC from cleaning up this object when it goes out of scope.
82+
This is becuase UIAlertView delegate is set to weak instead of strong
83+
*/
8484
static NSMutableArray* delegateReference;
8585

8686
- (id)initWithMessageDict:(NSDictionary*)messageDict {

iOS_SDK/OneSignalSDK/Source/OneSignalDialogController.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ + (instancetype _Nonnull)sharedInstance {
7979
- (void)presentDialogWithMessageDict:(NSDictionary *)messageDict {
8080
if ([OneSignalHelper isIOSVersionLessThan:@"8.0"]) {
8181
[OneSignalAlertView showInAppAlert:messageDict];
82+
return;
8283
}
8384
let payload = [OSNotificationPayload parseWithApns:messageDict];
8485
// Add action buttons to payload

iOS_SDK/OneSignalSDK/UnitTests/UnitTests.m

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1185,24 +1185,6 @@ - (void)testNotificationOpenFromButtonPressWithNewformat {
11851185
XCTAssertNil(OneSignalClientOverrider.lastHTTPRequest);
11861186
XCTAssertEqual(OneSignalClientOverrider.networkRequestCount, 3);
11871187
}
1188-
/*
1189-
[OneSignal promptForPushNotificationsWithUserResponse:nil fallbackToSettings:true];
1190-
1191-
[UnitTestCommonMethods runBackgroundThreads];
1192-
1193-
//assert that the correct dialog was presented
1194-
XCTAssertNotNil([OneSignalDialogControllerOverrider getCurrentDialog]);
1195-
XCTAssertEqualObjects(OneSignalDialogControllerOverrider.getCurrentDialog.title, @"Open Settings");
1196-
1197-
//answer 'Open Settings' on the prompt
1198-
OneSignalDialogControllerOverrider.getCurrentDialog.completion(0);
1199-
1200-
[UnitTestCommonMethods runBackgroundThreads];
1201-
1202-
//make sure the app actually tried to open settings
1203-
XCTAssertNotNil(UIApplicationOverrider.lastOpenedUrl);
1204-
XCTAssertEqualObjects(UIApplicationOverrider.lastOpenedUrl.absoluteString, UIApplicationOpenSettingsURLString);
1205-
*/
12061188

12071189
// Testing iOS 10 - 2.4.0+ button fromat - with os_data aps payload format
12081190
- (void)notificationAlertButtonsDisplayWithFormat:(NSDictionary *)userInfo {

0 commit comments

Comments
 (0)