New iOS Dev
New iOS Dev

Reputation: 2057

Why "add Push notification feature to your app id" warning even after push-notification showing enabled in App ID?

I am using Xcode8, swift 3, iOS 10

In Targets -> capabilities showing "add the Push notification feature to your app id".

I check my APP ID and it is showing pushnotfication enabled in both development and distribution.

With same APP IS and certificate I am getting notification in iOS9 but in iOS 10 i am getting error

Error Domain=NSCocoaErrorDomain Code=3000 "no valid 'aps-environment' entitlement string found for application" UserInfo={NSLocalizedDescription=no valid 'aps-environment' entitlement string found for application}  

and also showing red mark (issue)

Upvotes: 51

Views: 29744

Answers (11)

Naresh
Naresh

Reputation: 17932

Change your developer account in Xcode, because of APNS certificates developer account and Xcode developer account must be same.

--> Go to Target

--> Go to General Tab

--> GO to Signing

--> Select Team, Which account you used to develop APNS certificates.

Upvotes: 0

Ivan
Ivan

Reputation: 1

Check Info.plist -> Bundle identifier and establish it as YourProject -> Targets -> General -> Bundle identifier. Work for me

Upvotes: 0

DBIT
DBIT

Reputation: 182

Close Xcode -> reopen -> clean -> build -> run.

Fixed the issue for me. Xcode 9.0.

Upvotes: 14

Codeicus
Codeicus

Reputation: 581

In my case, none of the above answers worked. I had to generate new certificates. Xcode >> Preferences... >> Accounts >> select team >> Manage Certificates... >> + >> iOS Development >> repeat + >> iOS App Store.

Upvotes: 2

Gary Mansted
Gary Mansted

Reputation: 279

This happened to me. For some reason xCode signed me out. The fix: Tap Xcode (top bar) -> select Preferences -> select your Apple Id -> Sign-in. Hope this helps someone!

Upvotes: 8

Chandramani
Chandramani

Reputation: 889

IF you have enabled Push notification ,your old Provisioning profile become inactive . Edit that old Provisioning profile and download fresh one , then try to generate the build .

Upvotes: 0

ton1
ton1

Reputation: 7628

In my case it does not help restarting xcode again.

I just restart system and that problem was gone.

Upvotes: 7

sam k
sam k

Reputation: 1107

Sadly I quit xcode then installed the .mobileprovision (double clicking it) then restarted xcode and the warning was gone...Followed the other answer here by SteMa

Upvotes: 11

Joseph Astrahan
Joseph Astrahan

Reputation: 9082

In my situation I went to here enter image description here & here enter image description here

under the general tab in xCode settings and reset my bundle identifier to a different name and it fixed the certificates and everything worked!

Obviously if you need the same bundle identifier you will need to go with some of the other suggestions here, but use this if all else fails.

Upvotes: 3

Sandy Chapman
Sandy Chapman

Reputation: 11341

After I enabled push for my app, I had to regenerate my provisioning profiles and re-download them for Xcode to recognized the aps attribute.

Upvotes: 5

SteMa
SteMa

Reputation: 3022

I restarted XCode and it was gone :-)

Upvotes: 119

Related Questions