urbanairship/urbanairship-xamarin

Rich Notifications

JaridKG opened this issue · 6 comments

Does this component have support for the rich notifications (on iOS 10+)?

Or is their a separate component for that pod?

Yep, we support it. We have a nuget package that contains the UAMediaAttachmentExtension class that you will need to extend in your notification service extension.

Awesome thanks!

@rlepinski do you have any documentation or samples for Xamarin of that other package? I implemented it, and created a new provisioning profile for it, but its still not working. Not sure what I'm doing wrong

@JaridKG Are you able to debug inside the notification service extension? If not, could you try to grab device logs Xcode -> Window -> Devices & Simulators -> Select Device. Send a push and search for your extension name in the output. Apple will usually log something about why the extension could not be started. Here are the docs for native service extension - https://docs.urbanairship.com/platform/reference/ios-extension/

@JaridKG I was able to extend our sample app to add a working notification service extension. Here are the steps:

  1. Follow the Xamarin directions to create your service extension. Don't worry about the code yet.
  2. Make sure your service extension's bundle id is formatted as indicated in Xamarin's note on that page (basically, it must start with the app's bundle id).
  3. Make sure the service extension's deployment target is iOS 10 or later.
  4. Add the urbanairship.appextensions nuget package to your service extension.
  5. Replace the generated NotificationService.cs with the following code:
using AirshipAppExtensions;

namespace SampleServiceExtension
{
    [Register("NotificationService")]
    public class NotificationService : UAMediaAttachmentExtension
    {
    }
}

This should get your service extension working. Please let us know how it goes.

@JaridKG An example now lives in the repo. Please contact support if you continue to have issues.