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.
- It's possible to change push notification message before display on device from iOS side?
- What is difference between remote notification and silent notification in iOS?
- Google/Apple Push Notification Service (APNS/GCM)
- Can I send an image with Apple's Push Notification Service?
- ApnsPHP: Push notifications working in development but not in production
- iOS7 and iOS8: how to detect when user said No to a request for push notifications
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,
- What is the swift equivalent to _cmd?
- How to prevent load of meteor.local (when building ios app with phonegap)
- Same code base for iPhone/Desktop app
- Add/Remove or Show/Hide tab bar items from UITabbarController when using storyboards
- Cast to different C struct unsafe pointer in Swift
- iPhone notification when wifi network changes
- Cordova notification plugin failed installation (Cordova 3.6)
- IOS: draw a line with your finger
- iOS 7 Navigation Bar Hiding Content
- Can we submit xcode6 beta builds? How to prepare app for iOS8?
- iPhone iOS Generate star, sunburst or polygon UIBezierPath programmatically
- Change textColor in UISegmentedcontrol
- When to use UICollectionView instead of UITableView?
- ViewController Segue Xamarin
- app rejected because of advertisingIdentifier in Facebook SDK and Flurry SDK