Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do I need to enable push notifications for my app id if I only use local notifications?

Currently my app schedules a local notification for one week after the last time the app was run. Everything works fine in testing, but now that I've submitted the app I got this message from Apple:

"Missing Push Notification Entitlement - Your app appears to register with the Apple Push Notification service, but the app signature's entitlements do not include the "aps-environment" entitlement. If your app uses the Apple Push Notification service, make sure your App ID is enabled for Push Notification in the Provisioning Portal, and resubmit after signing your app with a Distribution provisioning profile that includes the "aps-environment" entitlement. "

I'm not actually interested in push notifications, I only want to use local notifications. Do I still need to enable Push Notifications for my App ID and recreate the provisioning profile?

Edit: The specific answer to my question is, no. You do not need to enable push notification for an app id in order to use local notifications.

like image 640
Ryan Lancaster Avatar asked Feb 06 '13 06:02

Ryan Lancaster


People also ask

What is difference between push notification and local notification?

The essential difference between local notifications and push notifications is simple: Local notifications are scheduled by an app locally and are delivered by the same device. Push notifications are sent by a remote server (its provider) which sends these notifications to devices on which the app is installed.

What does enable push notifications mean?

Push notifications look like SMS text messages and mobile alerts, but they only reach users who have installed your app. All the mobile platforms – iOS, Android, Fire OS, Windows and BlackBerry – have their own services for supporting push.

When should you use push notifications?

Use push notifications to message your users when they might need a reminder about something. People find value in receiving push notifications that alert them of updates or changes to their upcoming travel plans, reservations, deliveries, and other time-sensitive topics.

Does an app need to be open for push notifications?

Push notifications are small, pop-up messages sent to a user's device by a mobile app that appear even when the app isn't open. These notifications are designed to grab attention and can convey reminders, updates, promotions, and more. Push notifications can consist of a title, a message, an image, and a URL.


1 Answers

If you are not interested in Push Notifications then please remove the following function from App Delegate of your project and everything will be smooth :

- (void)application:(UIApplication*)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken
{

}

and remove this code from applicationDidFinishLaunchingWithOptions Function:

[[UIApplication sharedApplication] registerForRemoteNotificationTypes:
     (UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)];
like image 182
Rajan Balana Avatar answered Sep 21 '22 23:09

Rajan Balana