简体   繁体   中英

IOS Missing Push notification entitlement

The Apple Store messages are very confusing.

In my Corodova App, I was using Third Party Push Notification Service and API from GITHUB, instead of Apple Push Notification Service.

While setting certificates, APP IDentfiers and provisioning profile, for building the App with XCODE, I did not select "Push Notification".

Built and Uploaded to store and HELD UP at:


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. After you've corrected the issues, you can use Xcode or Application Loader to upload a new binary to iTunes Connect.


Now I am confused....

It says, "If your app does not use the Apple Push Notification service, no action is required."

Alright.... Then "You may remove the API from future submissions to stop this warning." Why should I remove the API of third party from my application??? This message is not leading me to any solution.

Now this time, I chose the "Push Notification" in Certificates, App Identifiers and Provisioning Profile and rebuilt the APP and Submitted again.

Did I do right, Am I doing Right?

Yes. You're doing it wrong.
From the App Store Review Guidelines :

5.1 Apps that provide Push Notifications without using the Apple Push Notification (APN) API will be rejected

If you haven't read this document, i encourage you to read it.

I suggest you looking for the following two methods in your app:

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

and

- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error

If you don't want to use APNs, then remove these two methods and perhaps everything related to RemoteNotifications.

I have never encountered this issue, but I hope it works for you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM