Skip to content

Commit 600b58b

Browse files
committed
don't use player_id to get ios params
* Motivation: Accessing `OneSignalUserManagerImpl.sharedInstance.pushSubscriptionId` at this point will init the user manager before we intend to * In addition, the user_id is not needed anyway. * Come back and confirm.
1 parent f873de2 commit 600b58b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

iOS_SDK/OneSignalSDK/Source/OneSignal.m

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,10 @@ + (void)downloadIOSParamsWithAppId:(NSString *)appId {
630630
[OneSignalLog onesignalLog:ONE_S_LL_DEBUG message:@"Downloading iOS parameters for this application"];
631631
_didCallDownloadParameters = true;
632632
// This will be nil unless we have a cached user
633-
NSString *userId = OneSignalUserManagerImpl.sharedInstance.pushSubscriptionId;
633+
// TODO: Commented out. This will init the User Manager too early, and userId is not needed anyway.
634+
// NSString *userId = OneSignalUserManagerImpl.sharedInstance.pushSubscriptionId;
635+
NSString *userId = nil;
636+
634637
[OneSignalClient.sharedClient executeRequest:[OSRequestGetIosParams withUserId:userId appId:appId] onSuccess:^(NSDictionary *result) {
635638

636639
if (result[IOS_REQUIRES_USER_ID_AUTHENTICATION]) {

0 commit comments

Comments
 (0)