The PW_DeviceRegistered event triggers only when a device first registers with the Pushwoosh server. This prevents duplicate registration logs during the lifecycle of a device.
When you delete and reinstall an app, the SDK often still resolves the original Hardware ID (HWID), so the server sees a device that is already on file and does not send the registration event again.
- iOS: the HWID is based on the vendor identifier (IDFV). It does not change as long as at least one app from the same vendor remains installed on the device; it changes only after all of that vendor's apps have been removed.
- Android: the HWID is a random identifier shared by all apps on the device that contain the Pushwoosh SDK. A new HWID is generated only after all Pushwoosh-SDK apps are removed; system backup/restore can also carry the stored value over into a reinstalled app.
- Debug/TestFlight builds with the optional PushwooshKeychain module: this module (iOS SDK 7.0.16+) deliberately persists the HWID in the Keychain across reinstalls for QA purposes. It is automatically disabled in App Store builds, so it never affects production users.
How to test new-user flows
- Use a simulator or emulator and erase the instance data, or factory-reset a physical device, to clear the stored identifier.
- On iOS, if your build links PushwooshKeychain, clear the persisted identifier explicitly:
Pushwoosh.Keychain.clearPersistentHWID()(Swift) orPushwooshKeychainImplementation.clearPersistentHWID(). - Alternatively, switch the trigger to PW_ApplicationOpen during the testing phase and revert it to PW_DeviceRegistered before going live.
Comments
0 comments
Please sign in to leave a comment.