I am trying to collect the OneSignalIDs of the users. The following code adds one playerID for each user. When the same user logs in with a different device, the playerID is updated.
let status : OSPermissionSubscriptionState = OneSignal.getPermissionSubscriptionState()
let oneSignalUser = status.subscriptionStatus.userId
if oneSignalUser != nil {
let aUser = Auth.auth().currentUser!
let post = ["playerID": oneSignalUser!] as [String: Any]
Database.database().reference().child("usersToOneSignal").child(aUser.uid).setValue(post)
}
I want every user to be added to every device. So I want more than one playerID under the key "kwvZPH......" (this is FireBase UserKey). How can I do this?
