Jump to content
PGordon

Firebase push notifications

Recommended Posts

For android it was not very difficult, but for iOS its getting me crazy, not with the code itself, but with the compiling.

I'm getting   Error: no valid “aps-environment” entitlement string found for application.

I have the certificates valid in https://developer.apple.com/account/resources/certificates/list for push notifications, development  and distribution 

I have the provisioning profiles in https://developer.apple.com/account/resources/profiles/list  valid, with valid certificates.
The I went to ~/Library/MobileDevice/Provisioning in the Mac to delete all profiles and to Xcode Settings / Accounts / Download Manual Profiles to refresh all provisioning profiles.
After Restarted PAServer to refresh the provisioning profiles and in Delphi edit connections (right click on IOS Simulator) to refresh the provisioning profiles. No errors so far.
But when I compile, I always get Error: no valid “aps-environment” entitlement string found for application.

My Entitlement.TemplateiOS.xml is the default one, with  <%pushNotificationKey%> but my Project.entitlements file never gets the necessary <key>aps-environment</key>

I tried to include the <key>aps-environment</key> myself, but the app crashes.

What am I missing? 

 

 

Edited by PGordon
Fix spelling

Share this post


Link to post
3 hours ago, PGordon said:

What am I missing? 

The most likely answer is that the provisioning profile that the Delphi IDE is choosing does not have push notifications enabled. You can check this by opening Project Options, select Deployment > Provisioning, select iOS Device 64-bit Target, and the relevant Build Type you want to build for (e.g. Application Store).

 

Delphi will then examine what provisioning profiles you have and select the most relevant one if it exists. If it does find one, it will show the path to it on the Mac, what the Application Identifier is for it, and the associated Certificate. 

 

One thing you should make sure of is that the CFBundleIdentifier value in the Version Info section of the Project Options matches the identifier in the provisioning profile you created that has Push Notifications enabled.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×