Page 1 of 1

Push notification not receiving in iOS 10

PostPosted: Sun Jul 16, 2017 3:24 am
by Lena
Hi.
Push notification not receiving in iOS 10 for me.
On blog Marco Cantu: http://blog.marcocantu.com/blog/delphi- ... ek-47.html
Delphi Blogs of the Week/Month 47
Is there a delphi berlin fix for this issue?
http://stackoverflow.com/questions/3950 ... -in-ios-10

Push notification not receiving in iOS 10
But I can not understand how to fix it for С++ Builder Berlin (XCode8)? :(

Re: Push notification not receiving in iOS 10

PostPosted: Fri Jul 21, 2017 1:31 am
by Grigg
I've not been able to get push notifications to work either. Anyone got any ideas?

Re: Push notification not receiving in iOS 10

PostPosted: Mon Jul 24, 2017 4:42 pm
by rlebeau
Did you update your IDE to use XCode 8?

Did you update your project's Entitlements file, as described in the StackOverflow discussion?

Did you read Embarcadero's documentation about customizing the Entitlements file?

Customizing Your Entitlement List for iOS or OS X

Re: Push notification not receiving in iOS 10

PostPosted: Tue Jul 25, 2017 8:11 am
by Lena
Did you update your IDE to use XCode 8?


I have C++Builder 10.1 Berlin Version 24.0.25048.9432 and XCode8

Did you update your project's Entitlements file, as described in the StackOverflow discussion?


In this discussion, I see only java code. What to add in Entitlements file?

My file: *** \iOSDevice64\Release\Sampsony.entitlements
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
   
   <key>application-identifier</key>
   <string>Q56HFEN844.la.um.Sampsony</string>
   
   <key>get-task-allow</key>
   <true/>
   <key>com.apple.developer.team-identifier</key>
   <string>Q56HFEN844</string>
   <key>aps-environment</key>
   <string>development</string>
   <key>keychain-access-groups</key>
   <array>
      <string>Q56HFEN844.la.um.Sampsony</string>
   </array>
</dict>
</plist>


Re: Push notification not receiving in iOS 10

PostPosted: Wed Jul 26, 2017 12:48 pm
by rlebeau
Lena wrote:
Did you update your project's Entitlements file, as described in the StackOverflow discussion?


In this discussion, I see only java code. What to add in Entitlements file?


I guess you missed the following portion of one of the answers on the StackOverflow question:

But if you are building with Xcode8 and above, makes sure that you have the following entry in your entitlements. This entry will be added automatically once you enabled "Push Notifications" in "Capabilities".

Code: Select all
<key>aps-environment</key>
<string>development</string>


In release-distribution build this will be automatically changed to the following

Code: Select all
<key>aps-environment</key>
<string>production</string>


Re: Push notification not receiving in iOS 10

PostPosted: Wed Jul 26, 2017 10:27 pm
by Lena
In my file: *** \iOSDevice64\Release\Sampsony.entitlements I have already line:
Code: Select all
<key>aps-environment</key>
<string>development</string>

Obviously, we need some additional steps.

Re: Push notification not receiving in iOS 10

PostPosted: Fri Aug 18, 2017 2:15 am
by Lena
I want to try this article: Adding Firebase Cloud Messaging to your mobile apps
However, there Delphi.
How it will be in C++ Builder?
Under Delphi Compiler, select Linking, and add -ObjC to the “Options passed to the LD linker” option

Re: Push notification not receiving in iOS 10

PostPosted: Fri Aug 18, 2017 8:00 pm
by rlebeau
Lena wrote:How it will be in C++ Builder?
Under Delphi Compiler, select Linking, and add -ObjC to the “Options passed to the LD linker” option


Although C++Builder does use the LD linker for iOS apps, it does not appear that the options dialog has an equivalent C++ option to pass user-defined parameters to the LD linker. You *might* try using the Delphi option, even in a C++ project, but I can't guarantee it will work.

Re: Push notification not receiving in iOS 10

PostPosted: Tue Aug 22, 2017 2:54 am
by Lena
I wonder if the universe at least one person who was able to receive IOS remote push notifications in C++ Builder/Google Firebase? :D
The ability to receive remote notifications without Kinvey is very important and there are no articles for C++ Builder/Google Firebase. :(

Re: Push notification not receiving in iOS 10

PostPosted: Fri Sep 01, 2017 2:02 am
by Lena
Solution found:
Everything works fine from this article for both android and for iOS:
http://blog.rzaripov.kz/2017/02/firebas ... d-ios.html
http://blog.rzaripov.kz/2017/02/firebas ... ios-2.html
For IOS change in push.php line 'sandbox' => true,
https://github.com/rzaripov1990/PUSHTestFCM
Works for both Delphi and C++ Builder.