xcode 8.0 “add the Push Notif(..) to your App ID”

2019-05-29 04:12发布

问题:

  • I have Xcode managing provisioning profiles (recommended 'automatic' setting)
  • My app id already contains the Push
  • When I launch Xcode it shows the Push capabilities with checkmarks, as if everything was fine
  • When I register device token and push a message, I get
    notRegistered response from GCM. But when I update the profiles
    Settings>Profile>View Details>Download all profiles the above
    mentioned checkbox turns into red warning sign.

This seems to be an Xcode bug. Anybody has a workaround?

回答1:

For Your develoepr account You must Enable APNS in App Ids. Check below screen shot.



回答2:

refer this link

https://forums.developer.apple.com/thread/68101

when you create distribution certificate that this you should Enable push notification feature for your app.

sorry for my english



回答3:

Try restarting Xcode. If this did not work, then do the following:

You need to download a provision profile:

1) Go to https://developer.apple.com/account/ios/profile/limited/ Select the project => edit => Certificates => Select All => Create => Download

or if you already have a profile

Go to https://developer.apple.com/account/ios/profile/limited/ Select your project => Edit => Generate => Download

2) In Xcode: Unclick Automatically manage signing.

Import provisioning profile: Project file => Signing (Debug) => Provisioning profile => Import profile => Select file with 1