Home/Code tips, General tips, Using APIs/Adding Firebase Cloud Messaging to your mobile apps – part 2

Adding Firebase Cloud Messaging to your mobile apps – part 2

Views:
604

This is Part 2 of a 2-part article on incorporating support for FCM in your Delphi apps for Android and iOS, and this part covers implementation on iOS.

FireDAC SQLite issue: Thanks to Steven Chesser who found this issue, and to Dmitry Arefiev for coming up with a solution:

If you’re using FireDAC with SQLite in your app, you’ll likely find that the app crashes on startup. It appears that FireDAC binds to SQLite static libraries that are incompatible with FCM. To alleviate this issue, please follow these steps:

  1. Make a copy of FireDAC.inc from the C:\Program Files (x86)\Embarcadero\Studio\xx.0\source\data\FireDAC folder, and put it in your project folder (where xx is the number for your Delphi install e.g. 18 for Delphi 10.1 Berlin)
  2. Modify FireDAC.inc to change the line:
    {.$UNDEF FireDAC_SQLITE_STATIC}
    Remove the “.” after the “{” so that it becomes:
    {$UNDEF FireDAC_SQLITE_STATIC}
  3. In Project Options, select: All configurations – iOS Device- 64 bit platform, and add the following to the search path:
    $(BDS)\source\data\FireDAC
  4. Clean and Build the project (as opposed to Compile), run it, and all should be OK

If you haven’t done so already, please read at least step 1 of Part 1, because it has important information about how to retrieve the .plist file that’s required for your iOS app, and about the starter project.

This article assumes that you have a certificate, app id and provisioning profile set up already, and added to your Mac. If you do not, please refer to this article.

Let’s start!

1. Download the Firebase SDK from the Firebase site

Go to the Firebase iOS setup page, navigate to the “Integrate Without Cocoa Pods” section (since we’re not using Cocoa Pods) and click the link in step 1 to download the SDK. Extract it somewhere appropriate that’s common to your applications. Inside, you’ll notice a a bunch of folders, and inside each folder is one or more “framework” folders (they have an extension of “.framework”). Inside each of those, in the root, is a file with the same name, with no extension. These are the binaries that your app needs in order to use the Firebase SDK.

2. Add paths to the framework files in your Delphi project

The easiest way to make it so that the compiler can find the files is to add a path for each of the necessary frameworks. In the Project Options for your Delphi project, select Delphi Compiler in the tree, and select All configurations – iOS Device – 64 bit platform in the Target combo. In the Search Path option, you’ll need to add a path for each of the following (where <firebase> is the root of the Firebase SDK that you extracted):

<firebase>\AdMob\GoogleMobileAds.framework\
<firebase>\Analytics\FirebaseAnalytics.framework\
<firebase>\Analytics\FirebaseCore.framework\
<firebase>\Analytics\FirebaseInstanceID.framework\
<firebase>\Analytics\FirebaseNanoPB.framework\
<firebase>\Analytics\GoogleToolboxForMac.framework\
<firebase>\Analytics\nanoPB.framework\
<firebase>\Messaging\FirebaseMessaging.framework\
<firebase>\Messaging\Protobuf.framework\
<firebase>\RemoteConfig\FirebaseRemoteConfig.framework\

While we’re in the Project Options, you’ll also need to add a parameter to the Linker options. Under Delphi Compiler, select Linking, and add -ObjC to the “Options passed to the LD linker” option (as per part 3 of the SDK requirements for apps not using Cocoa Pods on the Firebase iOS setup page):

You’ll need to repeat the above for iOS Device – 32 bit platform when you’re ready to deploy to the App Store or Test Flight, unless Apple has removed the 32-bit requirement by then.

Go to the Version Info section of the Project Options and modify the CFBundleIdentifier field so that it matches the identifier for your App ID on the Apple Developer site:

Then go to the Provisioning section, just to make sure the certificate and provisioning profiles have been found, and click OK.

3. Add the required frameworks from the iOS SDK to the Delphi SDK Manager

If you’re not already familiar with how to add other frameworks to the iOS SDK, you can refer to this article. You’ll need to add each of the following frameworks:

AdSupport
AudioToolbox
AVKit
CoreAudio
CoreMIDI
MediaToolbox
Metal
SystemConfiguration
UserNotifications

Note that the case of the name is very important! (eg it’s CoreMIDI, not CoreMidi). Remember to click Update Local File Cache when you are done adding those, and remember to click OK.

4. Add GoogleService-info.plist to the deployment

In Delphi, click Project, Deployment and select All configurations – iOS Device – 64 bit platform in the combo. Click the button with the white rectangle and green “+” on it to add, then select your GoogleService-info.plist file and click Open, e.g:

Now: would you believe that is it? Other than compiling and running your project, that is. While Monitor is good for watching log messages on Android, on iOS I find iOSConsole to be a decent equivalent on iOS, and it doesn’t require you to start Xcode. If you download that (onto your Mac), install and run it, you’ll be able to see the log messages for the starter project. Put the text “FCMStarter” (without the quotes) in the filter box of iOSConsole.

Run the app, and the first time you do, you’ll be prompted as to whether you would like the app to receive notifications. Be sure to tap “Allow”! You should also see the token appear in the upper memo. The token will also appear in the iOSConsole window:

Just like in Android’s Monitor app, you can copy the lines in iOSConsole, and extract the token from the copied text.

For iOS, FCM messages need to be of the notification format, e.g:

{
  "to": "(yourtoken)"
    "notification" : {
    "body" : "Congratulations, you received a message",
    "title" : "Firebase Cloud Messaging rules!",
    "badge": "0"
    }
}

Where (yourtoken) is the one you retrieved from the log.

Please refer to the last step of the previous article where I mention how to use Hurl to send test messages. If you’re using the starter project, you should check that notifications appear in the memo on the main form when the app is running, and for all apps using this framework, notifications will appear in the notification center when the app is in the background, or not running at all.

That’s all on this subject for the moment. There may be follow-up articles as to how to go about using the SubscribeToTopic and UnsubscribeFromTopic methods, and further developments going forward.

By | 2017-08-31T08:29:27+00:00 May 10, 2017 10:22 pm|Code tips, General tips, Using APIs|43 Comments

About the Author:

43 Comments

  1. Vsevolod May 19, 2017 at 3:48 pm - Reply

    Hi. What are the differences in the settings if the project is for С++ Builder? Thanks.

    • admin May 21, 2017 at 8:08 am - Reply

      I don’t use C++Builder, so I’m unaware of what the differences might be. Are you having a particular issue?

  2. Marco June 17, 2017 at 10:35 am - Reply

    Hello Dave!

    Congratulations for this post. I’ve been waiting a long time for this solution. Thank you very mutch!

    I have no issue on Android deployment, its everything ok.

    For IOS, I downloaded Firebase SDK exactly is specified in step 1 (Firebase iOS setup page-Integrate Without Cocoa Pods). After unzip it, I realized that folder “\Messaging\Protobuf.framework\” and it framework doesn’t exist. So, do you have, please, another url to download the same version of Firebase SDK you used in this project?
    I got a second error message too: “[DCC Error] E2597 ld: framework not found AdSupport for architecture arm64”, I don’t know if this one is related to the Firebase SDK version

    Your help is appreciated

    Best regards,

    Marco

    • Dave June 17, 2017 at 11:01 am - Reply

      Hi Marco,

      It looks like I’m going to need to update the code and the article, as there doesn’t appear to be a way of downloading earlier versions of the SDK, and it’s probably a good idea to update it anyway.

      Stay tuned

    • Dave June 17, 2017 at 12:05 pm - Reply

      I’ve now updated the article, and one of the units to support Firebase SDK 4 (and above)

  3. Marcelo June 22, 2017 at 3:26 pm - Reply

    Hello Dave,

    First of all, congratulations on the great work!

    After following all the steps and trying to compile, I get the same error message as Marco: ld: framework not found AdSupport for architecture arm64

    I can’t find the error. Any help is very much appreciated.

    Thank you!

  4. Marcelo June 22, 2017 at 4:00 pm - Reply

    Hello Dave,

    Thank you for this great piece of work!

    At first I had some trouble to get it running, but now I can receive remote notifications from Firebase perfectly!

    Here’s what I had to do:

    1. Add frameworks “AdSupport” and “AVKit”, and Update Local File Cache
    2. Edit DW.iOSapi.Firebase, add “procedure setDelegate(delegate: Pointer); cdecl;” on line 126. It seems that setRemoteMessageDelegate is deprecated and causes a crash if used.
    3. Edit DW.Firebase.Messaging.iOS, commenting line 179 (“TFIRMessaging.Wrap(TFIRMessaging.OCClass.messaging).setRemoteMessageDelegate(FFIRMessagingDelegate.GetObjectID);”)
    4. Edit DW.Firebase.Messaging.iOS, adding line “TFIRMessaging.Wrap(TFIRMessaging.OCClass.messaging).setDelegate(FFIRMessagingDelegate.GetObjectID);”

    After that, remote notifications are received.

    Thank you very much and keep up the great work!

  5. Joana August 23, 2017 at 4:58 pm - Reply

    Hello Dave.
    Thank you for useful post.

    I am using android version very well.
    and now I’m trying to apply Ios version.

    After following all the steps and trying to compile, I get the error message “[DCC Error] E2597 Undefined symbols for architecture arm64”.

    When I add-ObjC in Linking – Options passed to the LDlinker, I get the error message.
    Any help is very much appreciated.

    Thank you

    • Dave August 24, 2017 at 6:56 am - Reply

      Please check step 2. Have you added the path for \Analytics\FirebaseNanoPB.framework\ to the project compiler path? If so, please post the details of the error: there should be a “+” symbol that you can expand that will show what symbols the compiler could not find.

      • Joana August 24, 2017 at 12:02 pm - Reply

        I added all path in step 2.
        – I added these path to the Project Options – Delphi Compliler – Search path
        : D:\Component\Firebase\AdMob\GoogleMobileAds.framework\;
        D:\Component\Firebase\Analytics\FirebaseCore.framework\;
        D:\Component\Firebase\Analytics\FirebaseAnalytics.framework\;
        D:\Component\Firebase\Analytics\FirebaseInstanceID.framework\;
        D:\Component\Firebase\Analytics\GoogleToolboxForMac.framework\;
        D:\Component\Firebase\Messaging\FirebaseMessaging.framework\;
        D:\Component\Firebase\Analytics\FirebaseNanoPB.framework;
        D:\Component\Firebase\RemoteConfig\FirebaseRemoteConfig.framework\;
        D:\Component\Firebase\Messaging\Protobuf.framework

        and I got these error message
        :
        Error: “_pb_encode_string”, referenced from: _nano_encode_string in D:\Component\Firebase\Analytics\FirebaseNanoPB.framework\FirebaseNanoPB(encoder_common_8039ece0c83ac7b8d23f0821feb0bc6b.o);
        Error: “_pb_read”, referenced from: _firapb_decode_repeated_audience in D:\Component\Firebase\Analytics\FirebaseAnalytics.framework\FirebaseAnalytics(firapb_audience_decoder_8f2b7f20b40a4bf280eef0193d412fed.o); _firapb_decode_repeated_audience_leaf_filter_result in D:\Component\Firebase\Analytics\FirebaseAnalytics.framework\FirebaseAnalytics(firapb_audience_leaf_filter_result_decoder_18719ebed44aede4ae1b5366ad8ab378.o); _firapb_decode_repeated_event in D:\Component\Firebase\Analytics\FirebaseAnalytics.framework\FirebaseAnalytics(firapb_event_decoder_b12f86d34ef07b7785c71e30f0f2bdec.o); _firapb_decode_repeated_event_config in D:\Component\Firebase\Analytics\FirebaseAnalytics.framework\FirebaseAnalytics(firapb_event_config_decoder_cde32d44905cc0603c340053f5acc2cc.o); _firapb_decode_repeated_event_filter in D:\Component\Firebase\Analytics\FirebaseAnalytics.framework\FirebaseAnalytics(firapb_event_filter_decoder_ec6b4dfae7767911eff6ccffc13f7296.o); _firapb_decode_repeated_event_param in D:\Component\Firebase\Analytics\FirebaseAnalytics.framework\FirebaseAnalytics(firapb_event_param_decoder_44c77717d048228f22bd72a81dca7cf5.o); _firapb_decode_repeated_filter in D:\Component\Firebase\Analytics\FirebaseAnalytics.framework\FirebaseAnalytics(firapb_filter_decoder_8f86ab1b6526e1718ca4d06d5548ff97.o); …
        Error: “_pb_decode”, referenced from: _firapb_decode_audience in D:\Component\Firebase\Analytics\FirebaseAnalytics.framework\FirebaseAnalytics(firapb_audience_decoder_8f2b7f20b40a4bf280eef0193d412fed.o); _firapb_decode_audience_leaf_filter_result in D:\Component\Firebase\Analytics\FirebaseAnalytics.framework\FirebaseAnalytics(firapb_audience_leaf_filter_result_decoder_18719ebed44aede4ae1b5366ad8ab378.o); _firapb_decode_event in D:\Component\Firebase\Analytics\FirebaseAnalytics.framework\FirebaseAnalytics(firapb_event_decoder_b12f86d34ef07b7785c71e30f0f2bdec.o); _firapb_decode_event_config in D:\Component\Firebase\Analytics\FirebaseAnalytics.framework\FirebaseAnalytics(firapb_event_config_decoder_cde32d44905cc0603c340053f5acc2cc.o); _firapb_decode_event_filter in D:\Component\Firebase\Analytics\FirebaseAnalytics.framework\FirebaseAnalytics(firapb_event_filter_decoder_ec6b4dfae7767911eff6ccffc13f7296.o); _firapb_decode_event_param in D:\Component\Firebase\Analytics\FirebaseAnalytics.framework\FirebaseAnalytics(firapb_event_param_decoder_44c77717d048228f22bd72a81dca7cf5.o); _firapb_decode_filter in D:\Component\Firebase\Analytics\FirebaseAnalytics.framework\FirebaseAnalytics(firapb_filter_decoder_8f86ab1b6526e1718ca4d06d5548ff97.o); …
        Error: “_pb_istream_from_buffer”, referenced from: _firapb_decode_audience in D:\Component\Firebase\Analytics\FirebaseAnalytics.framework\FirebaseAnalytics(firapb_audience_decoder_8f2b7f20b40a4bf280eef0193d412fed.o); _firapb_decode_audience_leaf_filter_result in D:\Component\Firebase\Analytics\FirebaseAnalytics.framework\FirebaseAnalytics(firapb_audience_leaf_filter_result_decoder_18719ebed44aede4ae1b5366ad8ab378.o); _firapb_decode_event in D:\Component\Firebase\Analytics\FirebaseAnalytics.framework\FirebaseAnalytics(firapb_event_decoder_b12f86d34ef07b7785c71e30f0f2bdec.o); _firapb_decode_event_config in D:\Component\Firebase\Analytics\FirebaseAnalytics.framework\FirebaseAnalytics(firapb_event_config_decoder_cde32d44905cc0603c340053f5acc2cc.o); _firapb_decode_event_filter in D:\Component\Firebase\Analytics\FirebaseAnalytics.framework\FirebaseAnalytics(firapb_event_filter_decoder_ec6b4dfae7767911eff6ccffc13f7296.o); _firapb_decode_event_param in D:\Component\Firebase\Analytics\FirebaseAnalytics.framework\FirebaseAnalytics(firapb_event_param_decoder_44c77717d048228f22bd72a81dca7cf5.o); _firapb_decode_filter in D:\Component\Firebase\Analytics\FirebaseAnalytics.framework\FirebaseAnalytics(firapb_filter_decoder_8f86ab1b6526e1718ca4d06d5548ff97.o); …
        Error: “_pb_encode_submessage”, referenced from: _firapb_encode_repeated_audience in D:\Component\Firebase\Analytics\FirebaseAnalytics.framework\FirebaseAnalytics(firapb_audience_encoder_72c4ae8dbc6687ec3f3995499df06f95.o); _firapb_encode_repeated_audience_leaf_filter_result in D:\Component\Firebase\Analytics\FirebaseAnalytics.framework\FirebaseAnalytics(firapb_audience_leaf_filter_result_encoder_6cbefb9d90fdddfe6d231875ed5b6a81.o); _firapb_encode_repeated_event in D:\Component\Firebase\Analytics\FirebaseAnalytics.framework\FirebaseAnalytics(firapb_event_encoder_0c153acc04fdbe51594c94848d0368b0.o); _firapb_encode_repeated_event_config in D:\Component\Firebase\Analytics\FirebaseAnalytics.framework\FirebaseAnalytics(firapb_event_config_encoder_b76c27c645bff35f43c88abf3308a055.o); _firapb_encode_repeated_event_filter in D:\Component\Firebase\Analytics\FirebaseAnalytics.framework\FirebaseAnalytics(firapb_event_filter_encoder_622d09830d24d1c5bf26be1b23f22eb3.o); _firapb_encode_repeated_event_param in D:\Component\Firebase\Analytics\FirebaseAnalytics.framework\FirebaseAnalytics(firapb_event_param_encoder_fb98584a84d6fa363809bc8f957886cc.o); _firapb_encode_repeated_filter in D:\Component\Firebase\Analytics\FirebaseAnalytics.framework\FirebaseAnalytics(firapb_filter_encoder_d28bfc4dffa3c4e05d93004539cd7c73.o); …
        Error: “_pb_encode_tag_for_field”, referenced from: _firapb_encode_repeated_audience in D:\Component\Firebase\Analytics\FirebaseAnalytics.framework\FirebaseAnalytics(firapb_audience_encoder_72c4ae8dbc6687ec3f3995499df06f95.o); _firapb_encode_repeated_audience_leaf_filter_result in D:\Component\Firebase\Analytics\FirebaseAnalytics.framework\FirebaseAnalytics(firapb_audience_leaf_filter_result_encoder_6cbefb9d90fdddfe6d231875ed5b6a81.o); _firapb_encode_repeated_event in D:\Component\Firebase\Analytics\FirebaseAnalytics.framework\FirebaseAnalytics(firapb_event_encoder_0c153acc04fdbe51594c94848d0368b0.o); _firapb_encode_repeated_event_config in D:\Component\Firebase\Analytics\FirebaseAnalytics.framework\FirebaseAnalytics(firapb_event_config_encoder_b76c27c645bff35f43c88abf3308a055.o); _firapb_encode_repeated_event_filter in D:\Component\Firebase\Analytics\FirebaseAnalytics.framework\FirebaseAnalytics(firapb_event_filter_encoder_622d09830d24d1c5bf26be1b23f22eb3.o); _firapb_encode_repeated_event_param in D:\Component\Firebase\Analytics\FirebaseAnalytics.framework\FirebaseAnalytics(firapb_event_param_encoder_fb98584a84d6fa363809bc8f957886cc.o); _firapb_encode_repeated_filter in D:\Component\Firebase\Analytics\FirebaseAnalytics.framework\FirebaseAnalytics(firapb_filter_encoder_d28bfc4dffa3c4e05d93004539cd7c73.o); …
        Error: “_pb_decode_varint”, referenced from: _nano_decode_repeated_uint64 in D:\Component\Firebase\Analytics\FirebaseNanoPB.framework\FirebaseNanoPB(decoder_common_c0739af9e66f99653329d62a5a0fe57b.o);
        Error: “_pb_encode_varint”, referenced from: _nano_encode_repeated_uint64 in D:\Component\Firebase\Analytics\FirebaseNanoPB.framework\FirebaseNanoPB(encoder_common_8039ece0c83ac7b8d23f0821feb0bc6b.o);
        Error: “_pb_encode”, referenced from: _nano_two_pass_encoding in D:\Component\Firebase\Analytics\FirebaseNanoPB.framework\FirebaseNanoPB(encoder_common_8039ece0c83ac7b8d23f0821feb0bc6b.o);
        Error: “_pb_ostream_from_buffer”, referenced from: _nano_two_pass_encoding in D:\Component\Firebase\Analytics\FirebaseNanoPB.framework\FirebaseNanoPB(encoder_common_8039ece0c83ac7b8d23f0821feb0bc6b.o);
        ld: symbol(s) not found for architecture arm64

        Thank you.

        • Dave August 24, 2017 at 1:29 pm - Reply

          I’m having a similar problem with the latest version of the Firebase SDK (4.1.0), it compiles OK with version 4.0.2.

          I’ll take a look into what the problem is.

        • Dave August 24, 2017 at 1:54 pm - Reply

          I think I have found the issue. Firebase SDK version 4.1.0 relies on another framework, namely nanoPB. Please add the following path to the compiler path in project options:

          [Firebase]\Analytics\nanoPB.framework

          Where [Firebase] is your Firebase SDK folder. Also, please update this file:

          https://github.com/DelphiWorlds/KastriFree/blob/master/API/DW.iOSapi.Firebase.pas

          That should have it compiling without errors. Note that I am yet to test this, which I will do in a few hours if no-one else has by then.

          • Joana August 25, 2017 at 1:24 pm

            I ‘ve tested with modified DW.iOSapi.Firebase.pas.
            It works very well!! Thank you so much.

            and I have another questions.

            In android, I modified jar file to use sqlite when received notification at running background.

            I want to use sqlite when received notification at running background.
            Can I customize it like android in ios fcm service ?

          • Joana August 25, 2017 at 8:22 pm

            Hi Dave.

            When app is in foreground, it could receive push message. but no alert, sound..
            And app is in background, it’s not response when send message.

            I registered APN certifications in Firebase console.

            If it received in background, should I do something additional?

            Thank you.

          • Dave August 25, 2017 at 8:25 pm

            Are you sending the message via the Firebase Console? If so, they will not work properly in iOS. Use HURL, as I’ve described in the articles.

  6. Joana August 25, 2017 at 9:14 pm - Reply

    Yes I used Hurl. But It works only in foreground..

    • Dave August 25, 2017 at 9:20 pm - Reply

      Are you sending “notification” messages as per the iOS article? Data messages will not work on iOS

  7. Joana August 30, 2017 at 11:57 pm - Reply

    I sended “notification” message via Hurl. But It only works in foreground.

    My App is developer version, so I’ll check registered certification IDs at Apple developer web again.

    And, Could you answer it to this question?
    //
    In android, I modified jar file to use sqlite when received notification at running background.

    I want to use sqlite when received notification at running background.
    Can I customize it like android in ios fcm service ?
    //

    Thank you so much for help.

  8. Dave August 31, 2017 at 8:28 am - Reply

    I don’t know why it wouldn’t be working in the background; it should.

    As far as the SQLite question goes: there’s no such thing as a “service” in iOS. You might be able to access a SQLite database when the notification is received when the app is running in the background. I may have a look at this myself later.

    • Joana September 1, 2017 at 4:27 pm - Reply

      Thank you!!
      Now It works very well in background.
      I think certification settings was configured incorrectly.

      I’m looking forward to answering about to access a SQLite database in background.

      Thank you.

  9. veli September 17, 2017 at 6:18 pm - Reply

    [DCC Error] DW.Firebase.Messaging.iOS.pas(110): E2003 Undeclared identifier: ‘NSDictionaryToJSON’

  10. veli September 17, 2017 at 9:51 pm - Reply

    Everything is perfect but a crash happens when the application asks for notification permission at the first startup. When I checked, FMessaging := TFirebaseMessaging.Create; this line causes the problem. Why do you think does this happen? PS: I removed all firedac units.

    • veli September 17, 2017 at 10:17 pm - Reply

      paserver error message: Error: Command Args. Validation failed. Mandatory args not found: name

      • veli September 18, 2017 at 4:40 am - Reply

        project … “raised exception class 6”

    • Dave September 18, 2017 at 7:16 am - Reply

      Can you provide a call stack of when the app crashes, please? When the crash occurs and the debugger stops, click the Break button and it should a window with the call stack

        • Dave September 18, 2017 at 6:22 pm - Reply

          I need to be able to see the complete call stack. The 2nd image you’ve provided only has a small portion of it (in the top left, where it says “Call Stack”).

          Some other things to check for: Please ensure you’re creating one (and only one) instance of TFirebaseInstanceId, *before* you create an instance of TFirebaseMessaging and attempt to use it.

  11. veli September 18, 2017 at 6:37 pm - Reply
    • Dave September 18, 2017 at 6:42 pm - Reply

      Unfortunately the complete call stack is not of any help. Have you checked the other concerns I mentioned? Does the original starter project work for you?

      • veli September 18, 2017 at 6:52 pm - Reply

        I tried all but unfortunately none of them worked. Many thanks for your help.

        • veli September 18, 2017 at 7:53 pm - Reply

          delphi tokyo?

  12. veli September 18, 2017 at 8:21 pm - Reply

    it worked out like this

    procedure TPlatformFirebaseMessaging.RegisterRemoteNotificationsIOS10OrLater(const AOptions: UNAuthorizationOptions);
    begin
    FUserNotificationCenterDelegate := TUserNotificationCenterDelegate.Create(self);
    TUNUserNotificationCenter.OCClass.currentNotificationCenter.setdelegate(FUserNotificationCenterDelegate.GetObjectID);
    UserNotificationCenter.requestAuthorizationWithOptions(AOptions, RequestAuthorizationWithOptionsCompletionHandler);
    FFIRMessagingDelegate := TFIRMessagingDelegate.Create(self);
    // TFIRMessaging.Wrap(TFIRMessaging.OCClass.messaging).setDelegate(FFIRMessagingDelegate.GetObjectID);
    TiOSHelper.SharedApplication.registerForRemoteNotifications;
    end;

  13. Joana September 21, 2017 at 3:48 pm - Reply

    Hello Dave.
    Have you looked at that access a SQLite database when app is running in the background?

    If not, could you tell me way to do this?
    I am also looking into it, but I have no idea how to approach.

    I need to do this as soon as possible because of work..

    Any help is very appreciated.
    Thank you.

    • Dave September 21, 2017 at 4:02 pm - Reply

      Could you describe exactly the problem you’re having? Is it on iOS?

      • Joana September 21, 2017 at 4:15 pm - Reply

        Yes, It’s on iOS.

        In android, I modified Java file and remake jar file to access a SQLite database when received notifications app is in the background.

        Now I need to do this in iOS.

        What should I modify, how to approach .. I don’t know.

  14. veli October 6, 2017 at 11:10 pm - Reply

    paserver error sending delphi tokyo with ipa
    [PAClient Error] Error: E0776 error: exportArchive: “EkolKBB.app” requires a provisioning profile with the Push Notifications feature.

Leave a Reply

Show Buttons
Hide Buttons