xamarin / xamarin-macios

.NET for iOS, Mac Catalyst, macOS, and tvOS provide open-source bindings of the Apple SDKs for use with .NET managed languages such as C#
Other
2.47k stars 512 forks source link

Notification Content Extension #5102

Open hponaganti opened 5 years ago

hponaganti commented 5 years ago

Steps to Reproduce

  1. Set UNNotificationExtensionOverridesDefaultTitle = true in Info.plist
  2. Set this.Title = "Custom Title" in the notification view controller on DidReceiveNotification(UNNotification notification)
  3. The title of the NotificationContentExtension is blank

Expected Behavior

It should display custom title

Actual Behavior

Environment

Build Logs

Example Project (If Possible)

dalexsoto commented 5 years ago

Hello

Thank you for reporting this bug, I have been able to reproduce the issue you are seeing using Xamarin.iOS, the ObjC app works as expected:

Steps to repro:

  1. Open and run attached sample
  2. Click Ask permission button and accept
  3. Click Send local notification and send app to background
  4. Wait five seconds until the notification shows and drag it down
  5. Observe that OMG title shows in the ObjC app but not in the Xamarin one (see screenshots below for reference).

Test cases:

Both line by line apps using Xamarin.iOS and Objective-C:

objc

xamarin