I've pulled the following code from Embarcadero site (here) to generate a local notification.
procedure TForm1.SetNumberClick(Sender: TObject);
var
MyNotification: TNotification;
begin
// Create an instance of TNotification
MyNotification := NotificationCenter1.CreateNotification;
try
MyNotification.Number :=18;
MyNotification.AlertBody := 'Delphi for your mobile device is here!';
NotificationCenter1.PresentNotification(MyNotification);
finally
MyNotification.DisposeOf;
end;
end;
It compiles and runs. As expected, I did have to create NotificationCenter1 as a TNotificationCenter on my form. It works find under Android, but under iOS I get butkus. No local notification, no count on the icon, not even an error.
Did it ever work under XE8?
Has something changed with respect to local notification between XE8 and 10/Seattle?
My phone is running iOS 9.2. Did something change in iOS between 8.x and 9.x that breaks local notifications for Firemonkey?
The ultimate solution was two fold:
FMLocalNotificationPermission
set to true (Project
-> Options -> Version Info)