quickblox 为开发和生产制作了相同的标记 [英] quickblox makes the same token for development and production

查看:36
本文介绍了quickblox 为开发和生产制作了相同的标记的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的应用中添加了 quickblox,

I added quickblox to my app,

并挂出开发和生产APNS证书

And put up the development and production APNS certificates

当我在开发模式下打开应用程序时,开发标志关闭

when i open the app, in development mode, with the development flag off

[QBSettings setIsProductionEnvironmentForPushNotifications:NO]

我得到一个推送通知令牌,向这个令牌发送消息使到达

i get a push notification token, sending messages to this token makes the arrive

但是,当我想切换到生产模式时我把

, however, when I want to switch to production mode i put

[QBSettings setIsProductionEnvironmentForPushNotifications:YES]

然后在方法 application:didRegisterForRemoteNotificationWithDeviceToken:

提供完全相同的开发令牌.

我该如何生成生产令牌?如何强制创建新令牌?

How do I generate a production token instead? How to force a new token to be created?

推荐答案

其实你不需要手动管理推送区域

Actually you don't need to manage push zones manually

只需添加您在文档中可以找到的下一行 http://quickblox.com/developers/SimpleSample-messages_users-ios

just add next lines as you can find in documentation http://quickblox.com/developers/SimpleSample-messages_users-ios

#ifndef DEBUG 
   [QBSettings useProductionEnvironmentForPushNotifications:YES]; 
#endif

它们是什么意思?

这意味着在调试版本中您将使用开发环境.

it means that with debug builds you will use dev environment.

通过 AdHoc 或 AppStore 构建,您将使用生产环境.

With AdHoc or AppStore builds you will use prod environment.

因此,您可以创建 AdHoc ipa 文件,使用 AdHoc 配置文件对其进行签名,它应该可以工作

So, you can create the AdHoc ipa file, sign it with AdHoc provision profile and it should work

以上 3 行取决于下一个 Xcode 设置:

Above 3 lines depend on next Xcode settings:

这篇关于quickblox 为开发和生产制作了相同的标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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