Ahoj,
pokud nahraji aplikaci do iPhonu, tak se normalne vygeneruje DeviceToken pro PushNotifications a vse funguje jak ma, ale pokud ten stejny build poslu do TestFlightu, tak na callback FPushServiceConnection.OnChange se me vrati prazdny DeviceToken.
FPushService := TPushServiceManager.Instance.GetServiceByName (TPushService.TServiceNames.APS);
if FPushService <> nil then begin
FNotificationCenter := TNotificationCenter.Create (nil);
FNotificationCenter.OnReceiveLocalNotification := ReceiveLocalNotification;
FPushServiceConnection := TPushServiceConnection.Create (FPushService);
if FPushServiceConnection <> nil then begin
FPushServiceConnection.OnChange := DeviceTokenChange;
FPushServiceConnection.OnReceiveNotification := ReceiveNotification;
FPushServiceConnection.Active := True;
end;
end;
procedure TNotify.DeviceTokenChange (Sender: TObject; AChange: TPushService.TChanges);
var
DeviceToken: String;
begin
DeviceToken := FPushService.DeviceTokenValue[TPushService.TDeviceTokenNames.DeviceToken];
if DeviceToken <> '' then begin
FDeviceToken := DeviceToken;
if Assigned (FOnDeviceTokenChange) then FOnDeviceTokenChange (self);
end;
end;
Uz netusim kde hledat problem, muze nekdo pomoci ? Dekuji za kazdou radu