How Can I Migrate Between Beams Instances?
 let userDefaults = UserDefaults(suiteName: "PushNotifications")
    let persistedInstanceId = userDefaults?.value(forKey: "com.pusher.sdk.instanceId") as! String    if (persistedInstanceId == "OLD_INSTANCE_ID") {
      UserDefaults(suiteName: "PushNotifications").map { userDefaults in
        Array(userDefaults.dictionaryRepresentation().keys).forEach(userDefaults.removeObject)
      }
      self.pushNotifications.start(instanceId: "NEW-INSTANCE-ID")
    } else {
      self.pushNotifications.start(instanceId: "NEW-INSTANCE-ID")
    }DeviceStateStore deviceStateStore = new DeviceStateStore(applicationContext);
if (deviceStateStore.getInstanceId().equals("OLD_INSTANCE_ID")) {
Log.e("TESTING", "clearing state");
deviceStateStore.clear();
}PreviousWhat Ports Are Required To Receive Beams Notifications On My iOS Device?NextWhy Am I Receiving Error `Push notification prompting can only be done from a user gesture` In Safar
Last updated