Saturday, August 20, 2022
HomeiOS DevelopmentBother processing Airship deep hyperlinks on Xamarin.iOS

Bother processing Airship deep hyperlinks on Xamarin.iOS


I used to have deep linking engaged on Xamarin.iOS with this delegate:

[Register("MyApp.iOS.PushService")]
public class PushService : UAPushNotificationDelegate
{
    public override void ReceivedNotificationResponse(UNNotificationResponse notificationResponse, Motion completionHandler)
    {
        strive
        {
            NSString key = new NSString("^d");
            if (notificationResponse.Notification.ValueForKey(key) != null)
            {
                PushClient.HandleNotificationOpened(notificationResponse.Notification.ValueForKey(key).ToString());
            }
        }
        catch (Exception ex)
        {
        }

        completionHandler();
    }
}

I used to be receiving deep hyperlink actions to Airship when somebody tapped on a push notification… I might go this into “PushClient” to deal with the deep hyperlink. (It appeared like Airship used to go this with subject “^d” for some cause, so I simply used that and it labored for a very long time)

Just lately this now not works, so I am questioning if this Delegate/Handler is now not viable? How can I see the entire payload of the push notification now, and/or see the values I attempted to go over from a deep hyperlink?

I used to have a .apns file of JSON I would drag onto an iOS Simulator to mock a deep hyperlink push notification however I’ve misplaced it. It doesn’t matter what I put within the .apns file, this delegate perform of mine would not see any customized keys, both.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments