简体   繁体   English

如何将推送通知集成到现有应用程序?

[英]How to integrate Push Notification to an already existing app?

I already have an app in AppStore, now I need to integrate Push Notification to it in the next version. 我已经在AppStore中拥有一个应用程序,现在我需要在下一版本中将Push Notification集成到该应用程序中。 Do I need to generate new certificates for it or can modify the existing certificates used for code signing? 我需要为其生成新证书还是可以修改用于代码签名的现有证书?

If you would like to add push-notification in your application then you need enable push-notification, also need to generate certificate at Apple Developer portal and install it. 如果您想在应用程序中添加推送通知,则需要启用推送通知,还需要在Apple Developer Portal上生成证书并安装它。 (which will not affect on current live app). (这不会影响当前的实时应用)。

Then add code to register push notification, (Also can use delegates as required) 然后添加代码以注册推送通知,(也可以根据需要使用委托)

 -(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
      [[UIApplication sharedApplication]registerForRemoteNotificationTypes:(UIRemoteNotificationTypeAlert|UIRemoteNotificationTypeBadge|UIRemoteNotificationTypeSound);
}

And finally you need to upload new version of application. 最后,您需要上传新版本的应用程序。

you need to change the application certificate and therefore also the distribution certificate. 您需要更改应用程序证书,因此还需要更改分发证书。 An update of both is OK 两者的更新都可以

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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