I'm trying to include the Apple Push Notifications
inside my iOS
application following this example.
After some debugging I was able to find out that APushService
is empty when running on iOS
, but not on Android
.
procedure TFormLogin.Button1Click(Sender: TObject);
var
APushService : TPushService;
begin
APushService := TPushServiceManager.Instance.GetServiceByName(TPushService.TServiceNames.APS);
end;
Am I doing something wrong? How can we enable Push Notifications for iOS on Delphi?
Any ideas would be highly appreciated.
The solution was comically simple for the amount of effort we took to solve.
FMX.PushNotification.iOS
import was missing in the code.
Funny thing is: if we remove the PushNotifications
imports, Delphi Seattle
won't show any warnings.