codenameone / CodenameOne

Cross-platform framework for building truly native mobile apps with Java or Kotlin. Write Once Run Anywhere support for iOS, Android, Desktop & Web.

Home Page:https://www.codenameone.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

iOS local notifications are incorrectly shown with an empty space between title and body text

ThomasH99 opened this issue · comments

Describe the bug
I first thought this was an issue in my code but as the test example and screenshot below show, it seems to be a CN1 issue. iOS local notifications send from a CN1 app are displayed with an empty line between the notification title and body. This is particularly visible and frustrating since no other apps show their notifications in this way.

NB. I haven't tested on Android.

To Reproduce
Run this code: Notice that the iOS reminder is Steps to reproduce the behavior:

Form hi = new Form("Empty line in iOS notification", BoxLayout.y());
LocalNotification n = new LocalNotification();
n.setId("123456");
n.setAlertTitle("Notification title");
n.setAlertBody("Body text - incorrectly shown with empty line between it and the alert title");
Display.getInstance().scheduleLocalNotification(n, new Date().getTime() + 10000, LocalNotification.REPEAT_NONE); //schedule in 10s
hi.add(new Button("XXXXXXX"));
hi.show();

Expected behavior
There shouldn't be any empty line (white space) between title and body.

Screenshots
If applicable, add screenshots to help explain your problem.

Sm
image
artphone (please complete the following information):

  • Device: iPhone Xr, iOS 15.4.1

I hadn't noticed this was fixed, thanks!