如何更新推送通知的配置文件 - IOS [英] How to update provisioning profile for Push Notification - IOS

查看:207
本文介绍了如何更新推送通知的配置文件 - IOS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在开发一个IOS应用程序,我们要实现PUSH NOTIFICATION,我已经通过苹果文档,并要求我的团队代理在iOS开发中心启用推送通知,他们似乎已经启用了。我已在我的申请中注册了推送通知,如下所示...

  [[UIApplication sharedApplication] registerForRemoteNotificationTypes:
UIRemoteNotificationTypeBertge | UIRemoteNotificationTypeAlert)];

当我运行应用程序时,didFailToRegisterForRemoteNotificationsWithError被调用,我无法预测问题,

解决方案

p>对于推送通知



您需要做的是,首先打开配置门户,然后转到应用程序ID部分。



找到您的应用程序,然后有两个选项来配置推送通知,一个用于开发,另一个用于生产。



如果您的应用程序正在测试,开发,使用开发和配置,作为回报你将获得证书。它将放置在将发送推送通知的服务器上。



接下来,您需要重新生成配置配置文件,



转到配置配置文件,然后重新下载。



不要忘记在您的项目(APP)的AppDelegate中实现此方法:

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

}

使用新的配置文件构建项目,你很好。



如需更多帮助,请查看教程



即使在您启用了推送的应用ID后,它可能需要几个小时的时间。 p>

We are working on an IOS application, we want to implement PUSH NOTIFICATION, I have gone through apple documentation, and asked my Team agent to enable the Push Notification in iOS dev center, they did it seems, its enabled now. I have registered in my application for Push notification like below...

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

When I ran the application, didFailToRegisterForRemoteNotificationsWithError got called, I was not able to predict the problem, Is there anything else I can do with certification.

thanks...

解决方案

For push Notification

What you need to do is, First open the provisioning portal and then go to App IDs section.

Find your app and then there are two options for configuring the Push Notification, one for Development and another for production.

If your app is under testing and development, use development and configure that and in return you will get the certificate. which will be placed on the server who will send push notifications.

Next, then you need to regenerate the provisioning profiles,

Go to the provisioning profiles and modify them and then re-download. You will get Push Notification Enabled Provisioning profiles.

Don't forget to implement this method in the AppDelegate of your project (APP):

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

}

Build your project with the new profile and you are good to go.

For more help check this tutorial.

Even after you've enabled your app id for push, it might take a couple of hours for it to work.

这篇关于如何更新推送通知的配置文件 - IOS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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