在Parse iOS中链接用户ID和安装ID [英] Linking user Id and installation Id in Parse iOS

查看:68
本文介绍了在Parse iOS中链接用户ID和安装ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在分析"仪表板的数据浏览器"窗格中,看到安装"和用户"类.但是,对于特定设备上的特定用户,objectIds不匹配.现在,用户已订阅的频道仅在安装类中可见.有什么方法可以将用户ID(来自用户类)链接到安装ID,以便可以知道用户订阅了哪些频道?任何指向教程或解决方案的链接都将受到赞赏.

In the Data Browser pane of my Parse dashboard, I see Installation and User classes. However, for a specific user on a specific device, the objectIds don't match. Now, the channels a user has subscribed to is only visible in the installation class. Is there any way of linking the user id (from user class) to the installation id so that it is possible to know which channels a user has subscribed to? Any link to a tutorial or a solution would be appreciated.

推荐答案

// Associate the device with a user
PFInstallation *installation = [PFInstallation currentInstallation];
installation[@"user"] = [PFUser currentUser];
[installation saveInBackground];

这会将用户置于Installation表的"user"列中,该列将是指向_User表的指针.

This will put the user in a column "user" in the Installation table, the column would be a pointer to the _User table.

这篇关于在Parse iOS中链接用户ID和安装ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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