procedure TMainDataModule.SendNotification(const ATitle, AAlertBody, AData: string); var mNotice: TNotification; begin if NotificationCenter1.Supported then begin mNotice := NotificationCenter1.CreateNotification; try mNotice.Name := kbmMWGlobal.kbmMWGenerateGUID; mNotice.Title := ATitle; mNotice.AlertBody := AAlertBody; mNotice.HasAction:=True; mNotice.AlertAction:=AData; // 通知 NotificationCenter1.PresentNotification(mNotice); finally mNotice.DisposeOf; end; end; end;