0

I have implemented MobilePush iOS SDK 7.6.0 in my xamarin forms app.

When I send an in-app message(with both App and Web urls), it is received in my iOS application, but the problem is that the delegate MarketingCloudSDKURLHandlingDelegate is not getting called.

public class UrlHandler : MarketingCloudSDKURLHandlingDelegate
{
    public override void Type(NSUrl url, string type)
    {
        Debug.WriteLine(string.Format("HandleURL: {0} {1}", type, url));

        if (UIApplication.SharedApplication.CanOpenUrl(url))
        {
            Debug.WriteLine(string.Format("Can open: " + url));
            var options = new NSDictionary();
            UIApplication.SharedApplication.OpenUrl(url, options, (success) => Debug.WriteLine("OpenURL: " + success));
        }
        else
        {
            Debug.WriteLine("Cannot open URL: " + url);
        }
    }
}

and I set the url handling delegate SetURLHandlingDelegate after the SDK was successfully configured.

var isSuccessful = MarketingCloudSDK.SharedInstance().ConfigureWithDictionary(configbuilder, out NSError configError); 
if (isSuccessful)
{
 
       MarketingCloudSDK.SharedInstance().SetURLHandlingDelegate(new UrlHandler());
       MarketingCloudSDK.SharedInstance().SetEventDelegate(new InAppMessageEventDelegate ()); 
       string sdkstate = MarketingCloudSDK.SharedInstance().GetSDKState;
}

Is there something else I need to configure or change?

Any help would be highly appreciated!

0

You must log in to answer this question.