Invalid entitlements error when adding push notifications
I’m trying to add push notifications to my chat app following this tutorial: https://www.appcoda.com/firebase-push-notifications/
I’ve toggled Push Notifications to On in “Capabilities”:
My provisioning profile is set up for push notifications:
I downloaded it, and double clicked it to install.
For Code Signing, in Target -> Code Signing:
And Project -> Code Signing:
When I ran the project it succeeded, then said “The executable was signed with invalid entitlements”. Full error
The entitlements specified in your application’s Code Signing Entitlements file are invalid, not permitted, or do not match those specified in your provisioning profile. (0xE8008016).
Thanks for reading.. Any help on this will be hugely appreciated!
EDIT: Additional Information
Using Xcode 8.2.1
- In my App ID in the developers portal, Game Center, In-App Purchases, and Push Notifications are enabled. It’s my understanding that Game Center and IAP are enabled by default.
- I’ve tried turning GC and IAP On, and then Off again. Restart Xcode, clean, build. No luck
- I’ve tried turning GC and IAP On, then regenerating my provisioning profiles, installing them, cleaning and building. No luck.
- My Bundle ID matches everywhere.
- Bluetooth LE and ANCS in iOS
- Removing a notification from notification center on click
- ios 7 device token is different for same device
- Is it possible to create multiple SSL certificates for providers that send APNs to the same Application?
- Can we send push notification to APNs from iOS device?
- Long-polling vs Apple Push Notification Service & Android C2DM
4 Solutions Collect From Internet About “Invalid entitlements error when adding push notifications”
Delete any unknown entries in entitlements file, which are not added by you.
Example: you can delete keychainAccessGroup entry from your entitlements file, if that is not added by you intentionally.
Have a look at your test target, the Team identifier should be same for both Test and Main target.
As your given information your app has enabled services for Game Centre, In-App Purchase and Notification.
and according to your entitlements settings that your app in Xcode doesn’t have Game Centre as enabled.
Check you entitlements setting once and try again, after enabling Game Centre there shouldn’t be any problem.
enable in app purchase Capabilities in xcode because your app has enabled services for in app purchase
and please select the provision profile and developer at Code Signing: instead of “iOS Developer and Automatic”
From your project settings, go to
general then check the checkbox
Automatically manage signing then select your team from below field! that’s it!
You can refer the below screen shot,
- How to use YouTube API V3?
- How do I read a UITableViewCell (subclass)'s height from a NIB?
- how to cancel out of operation created with addOperationWithBlock?
- Restore already bought in-app-purchases on iPhone?
- Detect if int changes per 100
- Best practices for iOS applications security
- Getting results from arbitrary SQL statements with correct binding in SQLite.swift
- How to build a Workout app on WatchOS with audio feedback?
- Swift leave out .self to invoke a function which needs metatype?
- Remove UISegmentedControl separators completely. (iphone)
- How to display the current project version of my App to the user?
- CAGradientLayer, not resizing nicely, tearing on rotation. (video of issue attached)
- Pulling data from a CMSampleBuffer in order to create a deep copy
- Cast to a Metatype Type in Swift?
- Getting data from findObjectsInBackgroundWithBlock in swift