Skip to content

Commit e6fe4e9

Browse files
committed
Working on outcomes unittests
There are still flaky outcomes tests, and the migration test is failing because we aren't migrating on notification received from the NSE
1 parent c5ca29e commit e6fe4e9

File tree

9 files changed

+38
-36
lines changed

9 files changed

+38
-36
lines changed

iOS_SDK/OneSignalSDK/OneSignal.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@
463463
DE7D18B027038160002D3A5D /* OSOutcomeEventsRepository.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AF9867924497A4D00C36EAE /* OSOutcomeEventsRepository.m */; };
464464
DE7D18B127038164002D3A5D /* OSOutcomeEventsFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 7AF98689244A556300C36EAE /* OSOutcomeEventsFactory.h */; };
465465
DE7D18B227038168002D3A5D /* OSOutcomeEventsFactory.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AF9868B244A556F00C36EAE /* OSOutcomeEventsFactory.m */; };
466-
DE7D18B32703816C002D3A5D /* OSOutcomeEventsCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 7AF9868F244A566F00C36EAE /* OSOutcomeEventsCache.h */; };
466+
DE7D18B32703816C002D3A5D /* OSOutcomeEventsCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 7AF9868F244A566F00C36EAE /* OSOutcomeEventsCache.h */; settings = {ATTRIBUTES = (Public, ); }; };
467467
DE7D18B42703816F002D3A5D /* OSOutcomeEventsCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AF98691244A567B00C36EAE /* OSOutcomeEventsCache.m */; };
468468
DE7D18B527038172002D3A5D /* OSOutcomeEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D1BD95E2379E7A900A064F7 /* OSOutcomeEvent.h */; settings = {ATTRIBUTES = (Public, ); }; };
469469
DE7D18B627038176002D3A5D /* OSOutcomeEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D1BD95F2379E7C300A064F7 /* OSOutcomeEvent.m */; };

iOS_SDK/OneSignalSDK/OneSignalOutcomes/OneSignalOutcomes.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#import "OSInAppMessageOutcome.h"
1515
#import "OSOutcomeEvent.h"
1616
#import "OSInfluenceDataDefines.h"
17+
#import "OSOutcomeEventsCache.h"
1718
// In this header, you should import all the public headers of your framework using statements like #import <OneSignalOutcomes/PublicHeader.h>
1819

1920

iOS_SDK/OneSignalSDK/OneSignalOutcomes/Source/OutcomeEvents/OSOutcomeEventsCache.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ THE SOFTWARE.
3030

3131
@interface OSOutcomeEventsCache : NSObject
3232

33+
+ (OSOutcomeEventsCache *)sharedOutcomeEventsCache;
34+
3335
- (BOOL)isOutcomesV2ServiceEnabled;
3436
- (void)saveOutcomesV2ServiceEnabled:(BOOL)isEnabled;
3537

iOS_SDK/OneSignalSDK/OneSignalOutcomes/Source/OutcomeEvents/OSOutcomeEventsCache.m

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ of this software and associated documentation files (the "Software"), to deal
3232

3333
@implementation OSOutcomeEventsCache
3434

35+
static OSOutcomeEventsCache *_sharedOutcomeEventsCache;
36+
+ (OSOutcomeEventsCache *)sharedOutcomeEventsCache {
37+
if (!_sharedOutcomeEventsCache)
38+
_sharedOutcomeEventsCache = [OSOutcomeEventsCache new];
39+
return _sharedOutcomeEventsCache;
40+
}
3541
// Get current outcome service enabled. If V2 enabled return true otherwise false
3642
- (BOOL)isOutcomesV2ServiceEnabled {
3743
return [OneSignalUserDefaults.initShared getSavedBoolForKey:OSUD_OUTCOMES_V2 defaultValue:NO];

iOS_SDK/OneSignalSDK/Source/OSMigrationController.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,18 +66,18 @@ - (void)migrateToVersion_02_14_00_AndGreater {
6666
NSArray<OSIndirectInfluence *> * indirectInfluenceData = [[OSInfluenceDataRepository sharedInfluenceDataRepository] lastNotificationsReceivedData];
6767
if (indirectInfluenceData) {
6868
[NSKeyedArchiver setClassName:@"OSIndirectInfluence" forClass:[OSIndirectInfluence class]];
69-
[[OneSignal influenceDataRepository] saveNotifications:indirectInfluenceData];
69+
[[OSInfluenceDataRepository sharedInfluenceDataRepository] saveNotifications:indirectInfluenceData];
7070
}
7171
}
7272

7373
if (sdkVersion < uniqueCacheOutcomeVersion) {
7474
[OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:[NSString stringWithFormat:@"Migrating OSUniqueOutcomeNotification from version: %ld", sdkVersion]];
7575

7676
[NSKeyedUnarchiver setClass:[OSCachedUniqueOutcome class] forClassName:@"OSUniqueOutcomeNotification"];
77-
NSArray<OSCachedUniqueOutcome *> * attributedCacheUniqueOutcomeEvents = [[OneSignal outcomeEventsCache] getAttributedUniqueOutcomeEventSent];
77+
NSArray<OSCachedUniqueOutcome *> * attributedCacheUniqueOutcomeEvents = [[OSOutcomeEventsCache sharedOutcomeEventsCache] getAttributedUniqueOutcomeEventSent];
7878
if (attributedCacheUniqueOutcomeEvents) {
7979
[NSKeyedArchiver setClassName:@"OSCachedUniqueOutcome" forClass:[OSCachedUniqueOutcome class]];
80-
[[OneSignal outcomeEventsCache] saveAttributedUniqueOutcomeEventNotificationIds:attributedCacheUniqueOutcomeEvents];
80+
[[OSOutcomeEventsCache sharedOutcomeEventsCache] saveAttributedUniqueOutcomeEventNotificationIds:attributedCacheUniqueOutcomeEvents];
8181
}
8282
}
8383
}

iOS_SDK/OneSignalSDK/Source/OneSignal.m

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -402,13 +402,6 @@ + (void)setAppEntryState:(AppEntryAction)appEntryState {
402402
_appEntryState = appEntryState;
403403
}
404404

405-
static OSOutcomeEventsCache *_outcomeEventsCache;
406-
+ (OSOutcomeEventsCache *)outcomeEventsCache {
407-
if (!_outcomeEventsCache)
408-
_outcomeEventsCache = [[OSOutcomeEventsCache alloc] init];
409-
return _outcomeEventsCache;
410-
}
411-
412405
static OSOutcomeEventsFactory *_outcomeEventFactory;
413406
+ (OSOutcomeEventsFactory *)outcomeEventFactory {
414407
return _outcomeEventFactory;
@@ -569,7 +562,6 @@ + (void)clearStatics {
569562
pendingExternalUserId = nil;
570563
pendingExternalUserIdHashToken = nil;
571564

572-
_outcomeEventsCache = nil;
573565
_outcomeEventFactory = nil;
574566
_outcomeEventsController = nil;
575567

@@ -734,7 +726,7 @@ + (void)init {
734726
initializationTime = [NSDate date];
735727

736728
// Outcomes init
737-
_outcomeEventFactory = [[OSOutcomeEventsFactory alloc] initWithCache:OneSignal.outcomeEventsCache];
729+
_outcomeEventFactory = [[OSOutcomeEventsFactory alloc] initWithCache:[OSOutcomeEventsCache sharedOutcomeEventsCache]];
738730
_outcomeEventsController = [[OneSignalOutcomeEventsController alloc] initWithSessionManager:[OSSessionManager sharedSessionManager] outcomeEventsFactory:_outcomeEventFactory];
739731

740732
if (appId && [self isLocationShared])
@@ -976,7 +968,7 @@ + (void)downloadIOSParamsWithAppId:(NSString *)appId {
976968
[[self getRemoteParamController] saveRemoteParams:result];
977969

978970
if (result[OUTCOMES_PARAM] && result[OUTCOMES_PARAM][IOS_OUTCOMES_V2_SERVICE_ENABLE])
979-
[_outcomeEventsCache saveOutcomesV2ServiceEnabled:(BOOL)result[OUTCOMES_PARAM][IOS_OUTCOMES_V2_SERVICE_ENABLE]];
971+
[[OSOutcomeEventsCache sharedOutcomeEventsCache] saveOutcomesV2ServiceEnabled:(BOOL)result[OUTCOMES_PARAM][IOS_OUTCOMES_V2_SERVICE_ENABLE]];
980972

981973
[[OSTrackerFactory sharedTrackerFactory] saveInfluenceParams:result];
982974
[OneSignalTrackFirebaseAnalytics updateFromDownloadParams:result];

iOS_SDK/OneSignalSDK/UnitTests/InAppMessagingIntegrationTests.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1451,7 +1451,7 @@ - (void)testInAppMessageIdTracked {
14511451
XCTAssertEqual(1, OSMessagingControllerOverrider.messageDisplayQueue.count);
14521452

14531453
// Check influence id saved
1454-
lastReceivedIds = [[[OneSignal trackerFactory] iamChannelTracker] lastReceivedIds];
1454+
lastReceivedIds = [[[OSTrackerFactory sharedTrackerFactory] iamChannelTracker] lastReceivedIds];
14551455
XCTAssertEqual(lastReceivedIds.count, 1);
14561456
}
14571457

iOS_SDK/OneSignalSDK/UnitTests/MigrationTests.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ - (void)testIndirectNotificationToIndirectInfluenceMigration_NotificationService
150150
XCTAssertEqual(1, [lastNotificationReceived count]);
151151
XCTAssertEqual(0, sdkVersion);
152152

153+
// ECM TODO: This is failing because we aren't migrating from the NSE on notification received
153154
// Receive notification
154155
[UnitTestCommonMethods receiveNotification:@"test_notification_1" wasOpened:NO];
155156

iOS_SDK/OneSignalSDK/UnitTests/OutcomeIntegrationV2Tests.m

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ - (void)setUp {
7373
- (void)testSendingOutcome_inUnattributedSession {
7474
// 1. Open app
7575
[UnitTestCommonMethods initOneSignal_andThreadWaitWithForeground];
76-
[[OneSignal outcomeEventsCache] saveOutcomesV2ServiceEnabled:YES];
76+
[[OSOutcomeEventsCache sharedOutcomeEventsCache] saveOutcomesV2ServiceEnabled:YES];
7777

7878
// 2. Validate all influences are UNATTRIBUTED and send 2 outcomes
7979
let sessionInfluences = [[OSSessionManager sharedSessionManager] getInfluences];
@@ -97,7 +97,7 @@ - (void)testSendingOutcome_inUnattributedSession {
9797
- (void)testSendingOutcome_inNotificationIndirectSession {
9898
// 1. Open app
9999
[UnitTestCommonMethods initOneSignal_andThreadWaitWithForeground];
100-
[[OneSignal outcomeEventsCache] saveOutcomesV2ServiceEnabled:YES];
100+
[[OSOutcomeEventsCache sharedOutcomeEventsCache] saveOutcomesV2ServiceEnabled:YES];
101101

102102
// 2. Close the app for 31 seconds to trigger a new session
103103
[UnitTestCommonMethods backgroundApp];
@@ -149,7 +149,7 @@ - (void)testSendingOutcome_inNotificationIndirectSession {
149149
- (void)testSendingOutcome_inNotificationDirectSession {
150150
// 1. Open app
151151
[UnitTestCommonMethods initOneSignal_andThreadWaitWithForeground];
152-
[[OneSignal outcomeEventsCache] saveOutcomesV2ServiceEnabled:YES];
152+
[[OSOutcomeEventsCache sharedOutcomeEventsCache] saveOutcomesV2ServiceEnabled:YES];
153153

154154
// 2. Close the app for 31 seconds
155155
[UnitTestCommonMethods backgroundApp];
@@ -201,7 +201,7 @@ - (void)testSendingOutcome_inNotificationDirectSession {
201201
- (void)testSendingOutcomeWithValue_inUnattributedSession {
202202
// 1. Open app
203203
[UnitTestCommonMethods initOneSignal_andThreadWaitWithForeground];
204-
[[OneSignal outcomeEventsCache] saveOutcomesV2ServiceEnabled:YES];
204+
[[OSOutcomeEventsCache sharedOutcomeEventsCache] saveOutcomesV2ServiceEnabled:YES];
205205

206206
// 2. Validate all influences are UNATTRIBUTED and send 2 outcomes with values
207207
let sessionInfluences = [[OSSessionManager sharedSessionManager] getInfluences];
@@ -225,7 +225,7 @@ - (void)testSendingOutcomeWithValue_inUnattributedSession {
225225
- (void)testSendingOutcomeWithValue_inNotificationIndirectSession {
226226
// 1. Open app
227227
[UnitTestCommonMethods initOneSignal_andThreadWaitWithForeground];
228-
[[OneSignal outcomeEventsCache] saveOutcomesV2ServiceEnabled:YES];
228+
[[OSOutcomeEventsCache sharedOutcomeEventsCache] saveOutcomesV2ServiceEnabled:YES];
229229

230230
// 2. Close the app for 31 seconds to trigger a new session
231231
[UnitTestCommonMethods backgroundApp];
@@ -281,7 +281,7 @@ - (void)testSendingOutcomeWithValue_inNotificationIndirectSession {
281281
- (void)testSendingOutcomeWithValue_inNotificationDirectSession {
282282
// 1. Open app
283283
[UnitTestCommonMethods initOneSignal_andThreadWaitWithForeground];
284-
[[OneSignal outcomeEventsCache] saveOutcomesV2ServiceEnabled:YES];
284+
[[OSOutcomeEventsCache sharedOutcomeEventsCache] saveOutcomesV2ServiceEnabled:YES];
285285

286286
// 2. Close the app for 31 seconds
287287
[UnitTestCommonMethods backgroundApp];
@@ -337,7 +337,7 @@ - (void)testSendingOutcomeWithValue_inNotificationDirectSession {
337337
- (void)testUnattributedSession_cachedUniqueOutcomeCleanedOnNewSession {
338338
// 1. Open app
339339
[UnitTestCommonMethods initOneSignal_andThreadWaitWithForeground];
340-
[[OneSignal outcomeEventsCache] saveOutcomesV2ServiceEnabled:YES];
340+
[[OSOutcomeEventsCache sharedOutcomeEventsCache] saveOutcomesV2ServiceEnabled:YES];
341341

342342
// 2. Validate all influences are UNATTRIBUTED and send 2 of the same unique outcomes
343343
NSArray<OSInfluence *> *sessionInfluences = [[OSSessionManager sharedSessionManager] getInfluences];
@@ -383,7 +383,7 @@ - (void)testUnattributedSession_cachedUniqueOutcomeCleanedOnNewSession {
383383
- (void)testAttributedIndirectSession_cachedUniqueOutcomeNotificationsCleanedAfter7Days {
384384
// 1. Open app
385385
[UnitTestCommonMethods initOneSignal_andThreadWaitWithForeground];
386-
[[OneSignal outcomeEventsCache] saveOutcomesV2ServiceEnabled:YES];
386+
[[OSOutcomeEventsCache sharedOutcomeEventsCache] saveOutcomesV2ServiceEnabled:YES];
387387

388388
// 2. Close the app for 31 seconds
389389
[UnitTestCommonMethods backgroundApp];
@@ -469,7 +469,7 @@ - (void)testAttributedIndirectSession_cachedUniqueOutcomeNotificationsCleanedAft
469469
- (void)testAttributedDirectSession_cachedUniqueOutcomeNotificationsCleanedAfter7Days {
470470
// 1. Open app
471471
[UnitTestCommonMethods initOneSignal_andThreadWaitWithForeground];
472-
[[OneSignal outcomeEventsCache] saveOutcomesV2ServiceEnabled:YES];
472+
[[OSOutcomeEventsCache sharedOutcomeEventsCache] saveOutcomesV2ServiceEnabled:YES];
473473

474474
// 2. Close the app for 31 seconds
475475
[UnitTestCommonMethods backgroundApp];
@@ -557,7 +557,7 @@ - (void)testAttributedDirectSession_cachedUniqueOutcomeNotificationsCleanedAfter
557557
- (void)testAttributedIndirectSession_sendsUniqueOutcomeForNewNotifications_andNotCachedNotifications {
558558
// 1. Open app
559559
[UnitTestCommonMethods initOneSignal_andThreadWaitWithForeground];
560-
[[OneSignal outcomeEventsCache] saveOutcomesV2ServiceEnabled:YES];
560+
[[OSOutcomeEventsCache sharedOutcomeEventsCache] saveOutcomesV2ServiceEnabled:YES];
561561

562562
// 2. Close the app for 31 seconds
563563
[UnitTestCommonMethods backgroundApp];
@@ -639,7 +639,7 @@ - (void)testAttributedIndirectSession_sendsUniqueOutcomeForNewNotifications_andN
639639
- (void)testSendingOutcome_inIAMIndirectSession {
640640
// 1. Open app
641641
[UnitTestCommonMethods initOneSignal_andThreadWaitWithForeground];
642-
[[OneSignal outcomeEventsCache] saveOutcomesV2ServiceEnabled:YES];
642+
[[OSOutcomeEventsCache sharedOutcomeEventsCache] saveOutcomesV2ServiceEnabled:YES];
643643

644644
// 2. Receive 2 iam
645645
[[OSSessionManager sharedSessionManager] onInAppMessageReceived:@"test_in_app_message_1"];
@@ -687,7 +687,7 @@ - (void)testSendingOutcome_inIAMIndirectSession {
687687
- (void)testSendingOutcome_inIAMDirectSession {
688688
// 1. Open app
689689
[UnitTestCommonMethods initOneSignal_andThreadWaitWithForeground];
690-
[[OneSignal outcomeEventsCache] saveOutcomesV2ServiceEnabled:YES];
690+
[[OSOutcomeEventsCache sharedOutcomeEventsCache] saveOutcomesV2ServiceEnabled:YES];
691691

692692
// 2. Receive 1 IAM and send outcomes from action
693693
[[OSSessionManager sharedSessionManager] onDirectInfluenceFromIAMClick:@"test_in_app_message_1"];
@@ -718,7 +718,7 @@ - (void)testSendingOutcome_inIAMDirectSession {
718718
- (void)testSendingOutcomeWithValue_inIAMIndirectSession {
719719
// 1. Open app
720720
[UnitTestCommonMethods initOneSignal_andThreadWaitWithForeground];
721-
[[OneSignal outcomeEventsCache] saveOutcomesV2ServiceEnabled:YES];
721+
[[OSOutcomeEventsCache sharedOutcomeEventsCache] saveOutcomesV2ServiceEnabled:YES];
722722

723723
// 2. Receive 2 iam
724724
[[OSSessionManager sharedSessionManager] onInAppMessageReceived:@"test_in_app_message_1"];
@@ -770,7 +770,7 @@ - (void)testSendingOutcomeWithValue_inIAMIndirectSession {
770770
- (void)testSendingOutcomeWithValue_inIAMDirectSession {
771771
// 1. Open app
772772
[UnitTestCommonMethods initOneSignal_andThreadWaitWithForeground];
773-
[[OneSignal outcomeEventsCache] saveOutcomesV2ServiceEnabled:YES];
773+
[[OSOutcomeEventsCache sharedOutcomeEventsCache] saveOutcomesV2ServiceEnabled:YES];
774774

775775
// 2. Receive 1 IAM and send outcomes from action
776776
[[OSSessionManager sharedSessionManager] onDirectInfluenceFromIAMClick:@"test_in_app_message_1"];
@@ -805,7 +805,7 @@ - (void)testSendingOutcomeWithValue_inIAMDirectSession {
805805
- (void)testSendingOutcome_inIAMDirectSession_SaveIndirectSession {
806806
// 1. Open app
807807
[UnitTestCommonMethods initOneSignal_andThreadWaitWithForeground];
808-
[[OneSignal outcomeEventsCache] saveOutcomesV2ServiceEnabled:YES];
808+
[[OSOutcomeEventsCache sharedOutcomeEventsCache] saveOutcomesV2ServiceEnabled:YES];
809809

810810
// 2. Receive 1 IAM and send outcomes from action
811811
[[OSSessionManager sharedSessionManager] onInAppMessageReceived:@"test_in_app_message_1"];
@@ -858,7 +858,7 @@ - (void)testSendingOutcome_inIAMDirectSession_SaveIndirectSession {
858858
- (void)testAttributedIndirectSession_cachedUniqueOutcomeIAMsCleanedAfter7Days {
859859
// 1. Open app
860860
[UnitTestCommonMethods initOneSignal_andThreadWaitWithForeground];
861-
[[OneSignal outcomeEventsCache] saveOutcomesV2ServiceEnabled:YES];
861+
[[OSOutcomeEventsCache sharedOutcomeEventsCache] saveOutcomesV2ServiceEnabled:YES];
862862

863863
// 2. Close the app for 31 seconds
864864
[UnitTestCommonMethods backgroundApp];
@@ -944,7 +944,7 @@ - (void)testAttributedIndirectSession_cachedUniqueOutcomeIAMsCleanedAfter7Days {
944944
- (void)testAttributedDirectSession_cachedUniqueOutcomeIAMsCleanedAfter7Days {
945945
// 1. Open app
946946
[UnitTestCommonMethods initOneSignal_andThreadWaitWithForeground];
947-
[[OneSignal outcomeEventsCache] saveOutcomesV2ServiceEnabled:YES];
947+
[[OSOutcomeEventsCache sharedOutcomeEventsCache] saveOutcomesV2ServiceEnabled:YES];
948948

949949
// 2. Close the app for 31 seconds
950950
[UnitTestCommonMethods backgroundApp];
@@ -1032,7 +1032,7 @@ - (void)testAttributedDirectSession_cachedUniqueOutcomeIAMsCleanedAfter7Days {
10321032
- (void)testAttributedIndirectSession_sendsUniqueOutcomeForNewNIAMs_andNotCachedIAMs {
10331033
// 1. Open app
10341034
[UnitTestCommonMethods initOneSignal_andThreadWaitWithForeground];
1035-
[[OneSignal outcomeEventsCache] saveOutcomesV2ServiceEnabled:YES];
1035+
[[OSOutcomeEventsCache sharedOutcomeEventsCache] saveOutcomesV2ServiceEnabled:YES];
10361036

10371037
// 2. Close the app for 31 seconds
10381038
[UnitTestCommonMethods backgroundApp];
@@ -1115,7 +1115,7 @@ - (void)testAttributedIndirectSession_sendsUniqueOutcomeForNewNIAMs_andNotCached
11151115
- (void)testUnattributedSessionToDirectSessionWhileInactive {
11161116
// 1. Open app
11171117
[UnitTestCommonMethods initOneSignal_andThreadWaitWithForeground];
1118-
[[OneSignal outcomeEventsCache] saveOutcomesV2ServiceEnabled:YES];
1118+
[[OSOutcomeEventsCache sharedOutcomeEventsCache] saveOutcomesV2ServiceEnabled:YES];
11191119

11201120
// 2. Make sure IN_APP_MESSAGE influence is UNATTRIBUTED and Notifications is UNATTRIBUTED
11211121
NSArray<OSInfluence *> *sessionInfluences = [[OSSessionManager sharedSessionManager] getInfluences];
@@ -1161,7 +1161,7 @@ - (void)testUnattributedSessionToDirectSessionWhileInactive {
11611161
- (void)testDirectSessionToDirectSessionWhileInactive {
11621162
// 1. Open app
11631163
[UnitTestCommonMethods initOneSignal_andThreadWaitWithForeground];
1164-
[[OneSignal outcomeEventsCache] saveOutcomesV2ServiceEnabled:YES];
1164+
[[OSOutcomeEventsCache sharedOutcomeEventsCache] saveOutcomesV2ServiceEnabled:YES];
11651165

11661166
[UnitTestCommonMethods pullDownNotificationCenter];
11671167

@@ -1219,7 +1219,7 @@ - (void)testDirectSessionToDirectSessionWhileInactive {
12191219
- (void)testIndirectSessionToDirectSessionWhileInactive {
12201220
// 1. Open app
12211221
[UnitTestCommonMethods initOneSignal_andThreadWaitWithForeground];
1222-
[[OneSignal outcomeEventsCache] saveOutcomesV2ServiceEnabled:YES];
1222+
[[OSOutcomeEventsCache sharedOutcomeEventsCache] saveOutcomesV2ServiceEnabled:YES];
12231223

12241224
// Background app
12251225
[UnitTestCommonMethods backgroundApp];

0 commit comments

Comments
 (0)