1

Recently I've uploaded one app with push notification support successfully, and then i wanted to update other apps on the store that doesn't include push notification at all and i don't want to include this feature in it. and when i always submit it it says that :

Missing Push Notification Entitlement - Your app appears to include API used 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. See "Provisioning and Development" in the Local and Push Notification Programming Guide for more information. If your app does not use the Apple Push Notification service, no action is required. You may remove the API from future submissions to stop this warning. If you use a third-party framework, you may need to contact the developer for information on removing the API.

I've no idea whats happening with Xcode and this issue is so confusing check this : enter image description here

AaoIi
  • 8,288
  • 6
  • 45
  • 87

4 Answers4

1

If your ad-hoc provisioning profile has the aps-environment key, that it means your app is configured correctly in the Apple Provisioning Portal. All you need to do is delete the App Store distribution profile on your local machine, then re-download and install the distribution profile from the Provisioning Portal. This new one should contain the aps-environment key.

Make sure you have removed aps-environment key from your profile in portal.

Dipen Panchasara
  • 13,480
  • 5
  • 47
  • 57
  • @AaoIi good job. if you found my answer useful pls accept it. – Dipen Panchasara Sep 11 '15 at 09:52
  • which provisioning profile you meant to delete ? the one i used push notification before ? or the other app that I'm trying to submit ? or the general one X* ? every one says delete it and etc ? please provide more details and instructions i couldn't fix the issue until now !! Thanks – AaoIi Sep 11 '15 at 13:54
  • no you need to delete your provisional profile & certificate for Distribution/Ad-hoc – Dipen Panchasara Sep 11 '15 at 14:12
1

Please ensure that your code does not contain following methods:

- (void) application:(UIApplication*)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken;
- (void) application:(UIApplication*)application didFailToRegisterForRemoteNotificationsWithError:(NSError*)error;

And the method call to register for notification:

[[UIApplication sharedApplication] registerForRemoteNotificationTypes:UIRemoteNotificationTypeAlert|UIRemoteNotificationTypeBadge|UIRemoteNotificationTypeSound];

If these methods are not there then please re-create distribution provisioning profile and re-build you application with it.

Abhinav
  • 37,684
  • 43
  • 191
  • 309
  • first of all i don't have these method in my app, i tried to create provisioning profile and sign the app with it or distribution profile and sign the app with it, iTunes connect is sending me the same issue :( – AaoIi Sep 11 '15 at 10:59
0

If you want to enable push notification in an app, you need to create fixed bundleID like: "com.appname.app" and provisioning profile for the same. WildCard bundle id and provisioning profile will not work for Push notification as payload needs fixed address for delivery.

So please try with the fixed BundleID and provisioning profile.

itsji10dra
  • 4,603
  • 3
  • 39
  • 59
Suraj Sonawane
  • 2,044
  • 1
  • 14
  • 24
0

You have probably introduced a 3rd party SDK that is ready for push notifications. That doesn't necessarily mean that you need to send push notifications. That's why it's only a warning and you shouldn't care. Apple tells you about it just in case you really wanted to send push notifications.

lnjuanj
  • 1,744
  • 1
  • 12
  • 23
  • Well then which one of these libraries need to push notification, i recently updated to the latest Admob sdk 7.4.1, is it ? AFNetworking, SDWebImage, GoogleMobileAdsSdkiOS, SWRevealViewController ? – AaoIi Sep 15 '15 at 08:07