Konuyu Oyla:
  • Derecelendirme: 0/5 - 0 oy
  • 1
  • 2
  • 3
  • 4
  • 5
IOS Push Notification yapılandırması- ÇÖZÜLDÜ
#41
Ios Notification işlemleri için uğraşıyorum:
Ios tarafınnda p8 belgesini oluşturdum.Bu belge FireBase console yükledim.
CFBundleIdentifier gerekli FireBase console daki değeri yazdım.
Kullandığım kode örneği:
unit uMain;

interface

uses
  System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
  FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.Memo.Types,
  FMX.Controls.Presentation, FMX.ScrollBox, FMX.Memo , System.IOUtils, System.PushNotification
  {$IFDEF ANDROID},
    FMX.PushNotification.Android
  {$ENDIF}
  {$IFDEF IOS}
   ,FMX.PushNotification.IOS
   ,FMX.PushNotification.FCM.iOS
  {$ENDIF} ;
type
  TfrmMain = class(TForm)
    edt: TMemo;
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
    FDeviceId : String;
    FDevicetoken : String;
    FPushService: TPushService;
    FPushServiceConnection: TPushServiceConnection;
    procedure OnServiceConnectionChange(Sender: TObject; PushChanges: TPushService.TChanges);
    procedure OnReceiveNotificationEvent(Sender: TObject; const ServiceNotification: TPushServiceNotification);
  public
    { Public declarations }

  end;

var
  frmMain: TfrmMain;

implementation

{$R *.fmx}

procedure TfrmMain.FormCreate(Sender: TObject);
 var
   PushService: TPushService;
   ServiceConnection: TPushServiceConnection;
   Notifications: TArray<TPushServiceNotification>;
 begin
   PushService := TPushServiceManager.Instance.GetServiceByName(TPushService.TServiceNames.FCM);
   ServiceConnection := TPushServiceConnection.Create(PushService);
   ServiceConnection.OnChange := OnServiceConnectionChange;
   ServiceConnection.OnReceiveNotification := OnReceiveNotificationEvent;
   ServiceConnection.Active := True;
   FDeviceId :=PushService.DeviceIDValue[TPushService.TDeviceIDNames.DeviceId];

   edt.Lines.Add('DeviceID: ' + FDeviceId);
   edt.Lines.Add('Ready to receive!');

   Notifications := PushService.StartupNotifications;
   if Length(Notifications) > 0 then
   begin
       edt.Lines.Add('-----------------------------------------');
       edt.Lines.Add('DataKey = ' + Notifications[0].DataKey);
       edt.Lines.Add('Json = ' + Notifications[0].Json.ToString);
       edt.Lines.Add('DataObject = ' +
       Notifications[0].DataObject.ToString);
       edt.Lines.Add('-----------------------------------------');
   end;
end;
ama bir türlü true olmuyor.
Yardım edebilir misiniz ?
Cevapla


Konu ile Alakalı Benzer Konular
Konular Yazar Yorumlar Okunma Son Yorum
  Google Play Billing Versiyon Sorunu[ÇÖZÜLDÜ] codder71 12 1.160 01-08-2026, Saat: 22:45
Son Yorum: codder71
  Android 16 Uygulama Ekran Taşma Sorunu[ÇÖZÜLDÜ] codder71 5 673 31-07-2026, Saat: 23:38
Son Yorum: mcuyan
  PHPickerDelegate Derleme Sorunu [ÇÖZÜLDÜ] codder71 13 1.344 18-07-2026, Saat: 22:54
Son Yorum: emailx45
  ios için uygulama derleme [ÇÖZÜLDÜ] codder71 29 3.903 01-07-2026, Saat: 14:39
Son Yorum: codder71
  Delphi FMX - Modern Android Bileşen ve Tema Yapılandırması | Rehber Mr.X 0 328 29-06-2026, Saat: 13:44
Son Yorum: Mr.X



Konuyu Okuyanlar: 1 Ziyaretçi