Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting an error from push notification

In my app, I need push notifications. I am implementing all the instructions from the push notifications docs. But I got an error from Push Notification:

Fail To Register For Remote Notifications With Error:   Error Domain=NSCocoaErrorDomain Code=3000 "no valid 'aps-environment'   entitlement string found for application" UserInfo=0x2340a0   {NSLocalizedDescription=no valid 'aps-environment' entitlement string   found for application} 

What I am doing wrong?

like image 443
arunkumar.p Avatar asked Mar 28 '11 10:03

arunkumar.p


People also ask

Why are push notifications not working?

Settings > Sounds & Vibration > Do Not Disturb: if this setting is enabled, Push Notifications will not be received. Make sure this is disabled. Settings > General > Background App Refresh: this setting allows the app to run in the background and must be turned on.

How do I fix the notification error on my iPhone?

You can fix an iPhone that's not getting notifications by restarting it or making sure notifications are turned on. You should also make sure your iPhone is connected to the internet so apps can receive notifications. If all else fails, you should try resetting the iPhone — just make sure to back it up first.

Are push notifications spam?

Firstly, push notifications used to look like a spam email but get developed into personalised, interactive notifications that provide information and value with the shortest wording possible. They can be triggered based on a user's request or the action performed by a user.

How do you reset push notifications?

If you do not have a notification open, open Chrome on Android, tap the 3-dot menu, Settings, Site settings (under Advanced), Notifications, make sure it's set to "Ask before sending (recommended)". Find your site on the list, click the entry, and click Clear and Reset.


2 Answers

Generate a new provisioning profile, after you enable Push, and it will work!

like image 77
nithinreddy Avatar answered Oct 06 '22 02:10

nithinreddy


I am using Xcode 6.1.1

You don't have to delete or recreate anything. You just have to make Xcode update your active certificates (including the new push notification certificate).

Simply go to Xcode > Preferences > Accounts > pick your Account > pick your Team > View Details

There click the refresh button in the lower left corner. (Also check your code signing in build settings)

enter image description here

like image 23
codepushr Avatar answered Oct 06 '22 04:10

codepushr