Macapi.Notifications
v1.0.0
Puente de notificación de macOS simplificado para Delphi #DelphiCocoaFlavored
Lily Stilson // 2020
Esta unidad está diseñada para funcionar con RAD Studio 10.4. No funcionará en versiones anteriores debido a un error en Macapi.Foundation. Si su aplicación no está firmada con el Certificado de desarrollador de Apple, a partir de macOS 10.15 esta unidad funcionará, pero no enviará ninguna notificación debido a limitaciones en el sistema operativo.
Programación de notificaciones simplificada. Activa la notificación después de una hora programada;
procedure ScheduleNotification ( const ATitle, ASubtitile, AInformation: String;
const ADeliveryDate: TDateTime;
const UseTimeZone: boolean = True);
Presentación de notificaciones simplificada. Activa la notificación inmediatamente.
procedure PresentNotification ( const ATitle, ASubtitile, AInformation: String);
// SceduleNotification // Form contains TButton.
procedure TNSNotificationsTestForm.SceduleNotificationButtonClick (Sender: TObject);
begin
SceduleNotification( ' Notification Title ' , ' Foo Bar ' , ' Very Informative. Such Notification! ' ,
Now + EncodeTime( 0 , 0 , 5 , 0 ));
end ;
// NSSavePanel // Form contains TButton and TEdit
procedure TNSNotificationsTestForm.PresentNotificationButtonClick (Sender: TObject);
begin
PresentNotification( ' Notification Title ' , ' Foo Bar ' , ' Very Informative. Such Notification! ' );
end ;