+ Start a Discussion

About SFPushNotificationManager Error "The requested resource does not exist"

I want to achieve the message push function of salesforce on iOS,
I have done as Mobile SDK Guide said
- (void)application:(UIApplication*)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken
    [[SFPushNotificationManager sharedInstance] didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];
    if ([SFUserAccountManager sharedInstance].currentUser.credentials.accessToken != nil) {
        [[SFPushNotificationManager sharedInstance]  registerForSalesforceNotifications];
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
   [[SFPushNotificationManager sharedInstance] registerForRemoteNotifications];

but the console print
 ERROR|SFPushNotificationManager|Registration for notifications with Salesforce failed with status 404
        errorCode = "NOT_FOUND";
        message = "The requested resource does not exist";

how to solve this problem?
Who can help me!
Kahlil DozierKahlil Dozier
Potential things to look out for:

Does your organization have the right permissions set up to accept push notifications?  And does the user who is trying to access the push notifications API have the permissions set up to be able to register for and receive push notifications?  Either of these things could result in the aforementioned error. 
Nathan PattersonNathan Patterson
denny2, were you able to sort this issue out.  We're getting the same problem.
We're encountering this problem as well now. Did anyone encounter a solution?
Nathan PattersonNathan Patterson
The good news is that our problem was resolved.  The bad news is that we didn't get a solution.  One weekend, the problem just went away.  It was during a Salesforce change period (Summer 17), so I'm not sure if one of their releases triggered the fix or whether it was something else.  Sorry I can't be more helpful...
Thanks for replying, Nathan! It turns out the mobile developer had used the wrong Consumer Key (was using the Android key instead of the iOS key), so it ended up being an issue on our side.
Soma Chakraborty 10Soma Chakraborty 10
We are also facing the  same problem and getting the same error as mentioned above in console. 
The consumer key is already updated , kindly let me know if any althernate solution found. Thanks! 
Soma Chakraborty 10Soma Chakraborty 10
Hi All,
Any help regarding this please... It seems the error is coming while registering with SalesforceSDK Manager...Did you guys found any solution?
Kindly help. Thanks! 

Soma C 
Adam Tyler 10Adam Tyler 10
I was running into this issue and the problem ended up being I was using the wrong connected app ID/consumer key with the SDK. I was using the production ID while trying to test in a sandbox. Once I changed keys, I had to log out of Salesforce in the app then log in again and this time the registration succeeded.