Skip to content

[question]: Stuck at app login at Xamarin IOS #387

@enkaradag

Description

@enkaradag

How can we help?

Hi,

I'm still using Xamarin (not moved to maui yet)
Using OnesignalSDK.Xamarin 4.3.5

Here is what i do at App.xaml.cs initially

            OneSignal.Default.RequiresPrivacyConsent = true;
            OneSignal.Default.NotificationOpened += HandleNotificationOpened;
            OneSignal.Default.Initialize(settings.ONESIGNAL_APPID);
            OneSignal.Default.PrivacyConsent = false;

Here is AppDelegate.cs

           OneSignal.Default.NotificationOpened += HandleNotificationOpened;
           OneSignal.Default.Initialize(settings.ONESIGNAL_APPID);
           OneSignal.Default.PromptForPushNotificationsWithUserResponse();

And just after user is authenticated at login page

            await OneSignal.Default.PromptForPushNotificationsWithUserResponse(true);
            await OneSignal.Default.SetExternalUserId(settings.ONESIGNAL_EXTERNALUSERID);

            ////////////code never reaches here

            OneSignal.Default.PrivacyConsent = true;

This was working before for both android and ios (for this app we published last year). But now it stucks for ios.

If i comment out PromptForPushNotificationWithUserResponse, app opens but onesignal mentions "Missing Push Capability"

What am i doing wrong here? Or do you have any advice?

This took my whole day, any help would be appreciated.

Regards

Ender

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions