Adding FCM support to an iOS App in Delphi 13.1
You can start with the sample application described at https://docwiki.embarcadero.com/RADStudio/Florence/en/Firebase_Android_Support.
In the code editor, the only change that you need to make is to the uses clause:
uses
{$ifdef Android}
FMX.PushNotification.Android;
{$endif}
{$ifdef iOS}
FMX.PushNotification.FCM.iOS;
{$endif}
- You need to link the FireBase SDK to the application. Delphi 13.1 and higher can use more recent FCM SDKs because it has added the ability to link to Swift libraries . This can be downloaded from Getit. Search for FireBase SDK. 13.1 comes with the FCM 12.7.
- Go to your project options and go to Building | Delphi Compiler and edit the Framework search path.

Please study the above screenshot carefully to ensure that you have added those entries as above.
3. In Delphi Compiler | Linking, Add -ObjC to the Options passed to the Linker.
4. In the Version Info section you need to add Receive Remote Notifications to the Background capabilities.
5. If this is a brand new application. It is necessary to create an App ID. This needs to have Push Notification support. For an existing application, you may need to update your app id to add this capability and then download the updated provisioning profiles for that app.
6. While in the Apple developer website, it is necessary to create an APNs key - this is used by FCM to log into Apple’s push notification service. Make a note of the Key ID and your team ID - both will be needed in the FireBase console. Note that Apple does not backup this file. You will need to download it, so keep it safe.
7. Next, go to the FireBase console and add an iOS app. Make sure that you add the APNs key. This was the last thing I discovered I had to do - the iOS app appeared to be working and said that it was waiting for notifications, but none came. As soon as I added the key, I started to receive notifications.
8. Finally, you need to download a GoogleService-Info.plist. Save this to your project directory. You then need to add it to Deployment Manage. The remote path should be .\

You should now be able to run the app. The first time you run it, it will ask for permission to receive notifications. You should agree to this.