在Parse iOS中链接用户ID和安装ID

在我的Parse仪表板的Data Browser窗格中,我看到了Installation and User类。 但是,对于特定设备上的特定用户,objectIds不匹配。 现在,用户订阅的频道只能在安装类中看到。 有没有办法将用户标识(从用户类)链接到安装标识,以便可以知道用户订阅了哪些渠道? 任何链接到教程或解决scheme,将不胜感激。

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

这将把用户放在安装表中的“user”列中,该列将是一个指向_User表的指针。

Swift 2.1变种

 let installation: PFInstallation = PFInstallation.currentInstallation() installation["user"] = PFUser.currentUser() installation.saveInBackground()