Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
610 views
in Technique[技术] by (71.8m points)

iphone - Push Notifications wont work on distribution

Ok now I have a problem with the push notifications. I have set them successfully for the developing part and I was receiving them on my device. Now I have the application on app store and I cant receave notifications. This is step by step what I did:

-I have created a provisioning profile for distribution and connected it to the app id that has push notifications for distribution and development.

-I have built the app for distribution with that provisioning profile.

-I have submitted the app on app store.

-Now I have 2 certificates in keychain access Apple Production IOS Push Service:AppID and iPhone Distribution:CompanyName

-I have made .pem file from both and tested it with both. No notification has arrived

I really have no idea what to try and how to fix this.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I have had similar problems, just a few weeks ago. For me the case was that I had several provisioning profiles left in xCode. So what I needed to do was:

  • Go to Organizer -> Devices -> Provisioning Profiles
  • Select my distribution profiles for the app in question, and delete them.
  • Go to developer.apple.com/iOS
  • Go to the distribution profile, modify it.
  • Just clicked "select all" (so I could re-save it with no changes), somehow the profile needed to be re-created AFTER enabling the Push certificate
  • Download the new profile and install it to xCode
  • Clean project under Product -> Clean

Now I made a new release and tested it and it worked. Maybe this workes for you as well.

Edit The red-thread in this answer is that when Push notification in the App is enabled, the provisioning profiles need to be re-done (even though, to the eye there are no changes).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...