Push notification not receiving in iOS 10

This is the forum for miscellaneous technical/programming questions.

Moderator: 2ffat

Push notification not receiving in iOS 10

Postby Lena » Sun Jul 16, 2017 3:24 am

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)? :(
Lena
BCBJ Master
BCBJ Master
 
Posts: 525
Joined: Sun Feb 06, 2011 1:28 pm

Re: Push notification not receiving in iOS 10

Postby Grigg » Fri Jul 21, 2017 1:31 am

I've not been able to get push notifications to work either. Anyone got any ideas?
Grigg
 
Posts: 1
Joined: Fri Jul 14, 2017 4:57 am

Re: Push notification not receiving in iOS 10

Postby rlebeau » Mon Jul 24, 2017 4:42 pm

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
Remy Lebeau (TeamB)
Lebeau Software
User avatar
rlebeau
BCBJ Author
BCBJ Author
 
Posts: 1457
Joined: Wed Jun 01, 2005 3:21 am
Location: California, USA

Re: Push notification not receiving in iOS 10

Postby Lena » Tue Jul 25, 2017 8:11 am

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>

Lena
BCBJ Master
BCBJ Master
 
Posts: 525
Joined: Sun Feb 06, 2011 1:28 pm

Re: Push notification not receiving in iOS 10

Postby rlebeau » Wed Jul 26, 2017 12:48 pm

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>

Remy Lebeau (TeamB)
Lebeau Software
User avatar
rlebeau
BCBJ Author
BCBJ Author
 
Posts: 1457
Joined: Wed Jun 01, 2005 3:21 am
Location: California, USA

Re: Push notification not receiving in iOS 10

Postby Lena » Wed Jul 26, 2017 10:27 pm

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.
Lena
BCBJ Master
BCBJ Master
 
Posts: 525
Joined: Sun Feb 06, 2011 1:28 pm

Re: Push notification not receiving in iOS 10

Postby Lena » Fri Aug 18, 2017 2:15 am

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
Lena
BCBJ Master
BCBJ Master
 
Posts: 525
Joined: Sun Feb 06, 2011 1:28 pm

Re: Push notification not receiving in iOS 10

Postby rlebeau » Fri Aug 18, 2017 8:00 pm

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.
Remy Lebeau (TeamB)
Lebeau Software
User avatar
rlebeau
BCBJ Author
BCBJ Author
 
Posts: 1457
Joined: Wed Jun 01, 2005 3:21 am
Location: California, USA

Re: Push notification not receiving in iOS 10

Postby Lena » Tue Aug 22, 2017 2:54 am

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. :(
Lena
BCBJ Master
BCBJ Master
 
Posts: 525
Joined: Sun Feb 06, 2011 1:28 pm

Re: Push notification not receiving in iOS 10

Postby Lena » Fri Sep 01, 2017 2:02 am

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.
Lena
BCBJ Master
BCBJ Master
 
Posts: 525
Joined: Sun Feb 06, 2011 1:28 pm


Return to Technical

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 11 guests