科尔多瓦应用程序不使用推送通知:"缺少推送通知的权利与QUOT; [英] Cordova app that doesn't use push notifications: "Missing push notification entitlement"

查看:386
本文介绍了科尔多瓦应用程序不使用推送通知:"缺少推送通知的权利与QUOT;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们已经有了一个科尔多瓦基于iOS应用程序不使用推送通知。由于科尔多瓦3.5.0中,每次提交我们已经向应用程序商店的结果一封电子邮件,通知我们,我们的应用程序,包括使用苹果的推送通知服务注册API,但没有推送通知的权利。

该应用程序已每次接受,因为我们实际上并不使用推送通知的任何东西。不过,我想避免触发此警告的情况下,苹果决定改变他们的政策,这些API的引用是否是可以接受的。

我们没有与科尔多​​瓦的以前版本遇到问题,都做在Objective-C自己没有工作。这是一个已知的问题与科尔多瓦3.5?搜索已经取得了一些人有类似的问题,但我只找到解决方案的人想加推的权利,(而不是找出其中的推送API被引用,并删除它)。我接过一看科尔多瓦发出ML,但没有发现任何东西在那里。任何其他领导的人都知道是AP preciated!

插件使用:
org.apache.cordova.console
org.apache.cordova.device
org.apache.cordova.file
org.apache.cordova.inappbrowser
org.apache.cordova.media
org.apache.cordova.network信息
org.apache.cordova.splashscreen

相关电子邮件片段,用[]代替具体的信息:

  

来源:iTunes商店
  日期:星期三,2014年9月17日在下午3时49
  主题:iTunes Connect的:您的应用程序[的appName](苹果ID:[ID])具有一个或多个问题
  要:[开发商]

     

尊敬的开发商,

     

我们已经发现一个或更多的问题与您最近的交货[应用]。你的交货是成功的,但您可能希望纠正你的下一个传递了以下问题:

     

缺少推送通知的权利 - 您的应用程序似乎包括使用苹果推送通知服务注册API,但应用程序签名的权利不包括在APS-环境的权利。如果你的应用程序使用苹果推送通知服务,确保您的应用程序ID启用了在配置门户推送通知,并与包括APS-环境的权利一个发行配置文件签署您的应用程序后,重新提交。请参阅部署与发展在本地和推送通知编程指南以获取更多信息。如果你的应用程序不使用苹果推送通知服务,则不需要任何操作。你可以从未来的报告中删除的API来阻止这种警告。如果您使用的是第三方框架,你可能需要联系开发商的信息,去除API。

     

在已经纠正了问题,你可以使用X code或应用程序加载到一个新的二进制文件上传到iTunes连接。

     

问候,

     

应用程序商店的团队

解决方案

Krik是正确的!我发现在 /Classes/AppDelegate.m 这个API调用肯定是由科尔多瓦3.5。生成

我din't尝试过的时刻,但这些线路当然可以以x code被注释掉,以避免苹果的警告。

   - (无效)的应用程序:(*的UIApplication)的应用
   didRegisterForRemoteNotificationsWithDeviceToken:(NSData的*)deviceToken
{
    //重职(广播)
    的NSString *标记= [[[[deviceToken描述]
                         stringByReplacingOccurrencesOfString:@< withString:@]
                        stringByReplacingOccurrencesOfString:@>中withString:@]
                       stringByReplacingOccurrencesOfString:@withString:@];

    [NSNotificationCenter defaultCenter] postNotificationName:CDVRemoteNotification对象:令牌]。
}

 - (无效)的应用程序:(*的UIApplication)的应用
    didFailToRegisterForRemoteNotificationsWithError:(NSError *)错误
{
    //重职(广播)
    [NSNotificationCenter defaultCenter] postNotificationName:CDVRemoteNotificationError对象:错误]
}
 

We've got a Cordova based iOS app that does not use push notifications. As of Cordova 3.5.0, each submission we have made to the app store results in an email informing us that our app includes API used to register with Apple's Push Notification Service, but doesn't have push notification entitlement.

The app has been accepted each time, as we don't actually use push notifications for anything. However, I would like to avoid triggering this warning in case Apple decides to change their policy as to whether these API references are acceptable.

We did not experience the issue with prior versions of Cordova, and have done no work in Objective-C ourselves. Is this a known issue with Cordova 3.5? Searching has yielded some folks with similar problems but I've only found solutions for people wanting to add push entitlements, (rather than figure out where the Push API is being referenced and remove it). I took a look at the Cordova issues ML, but didn't find anything there. Any other leads that folks are aware of would be appreciated!

Plugins used:
org.apache.cordova.console
org.apache.cordova.device
org.apache.cordova.file
org.apache.cordova.inappbrowser
org.apache.cordova.media
org.apache.cordova.network-information
org.apache.cordova.splashscreen

Relevant email snippet, specific info replaced with [ ]:

From: iTunes Store
Date: Wed, Sep 17, 2014 at 3:49 PM
Subject: iTunes Connect: Your app "[appName]" (Apple ID: [id]) has one or more issues
To: [developer]

Dear developer,

We have discovered one or more issues with your recent delivery for "[app]". Your delivery was successful, but you may wish to correct the following issues in your next delivery:

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.

Regards,

The App Store team

解决方案

Krik is right ! I've found this API calls in /Classes/AppDelegate.m certainly generated by Cordova 3.5.

I din't tried it for the moment, but these lines can certainly be commented in xCode to avoid Apple's warnings.

- (void) application:(UIApplication *)application
   didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
{
    // re-post ( broadcast )
    NSString* token = [[[[deviceToken description]
                         stringByReplacingOccurrencesOfString: @"<" withString: @""]
                        stringByReplacingOccurrencesOfString: @">" withString: @""]
                       stringByReplacingOccurrencesOfString: @" " withString: @""];

    [[NSNotificationCenter defaultCenter] postNotificationName:CDVRemoteNotification object:token];
}

- (void)  application:(UIApplication *)application
    didFailToRegisterForRemoteNotificationsWithError:(NSError *)error
{
    // re-post ( broadcast )
    [[NSNotificationCenter defaultCenter] postNotificationName:CDVRemoteNotificationError object:error];
}

这篇关于科尔多瓦应用程序不使用推送通知:&QUOT;缺少推送通知的权利与QUOT;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆