【发布时间】:2016-01-15 21:56:35
【问题描述】:
我从 Embarcadero 网站 (here) 提取了以下代码以生成本地通知。
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;
它编译并运行。正如预期的那样,我确实必须在我的表单上创建 NotificationCenter1 作为 TNotificationCenter 。它可以在 Android 下找到,但在 iOS 下我得到了 butkus。没有本地通知,没有图标,甚至没有错误。
它曾经在 XE8 下工作过吗?
XE8 和 10/Seattle 之间的本地通知有什么变化吗?
我的手机运行的是 iOS 9.2。 8.x 和 9.x 之间的 iOS 中是否发生了一些改变,会破坏 Firemonkey 的本地通知?
【问题讨论】:
标签: ios firemonkey delphi-xe8 delphi-10-seattle