amplitude / Amplitude-Swift

Native iOS/tvOS/macOS/watchOS SDK
MIT License
32 stars 22 forks source link

fix: Don't use idfv for deviceId if invalid #183

Closed crleona closed 4 months ago

crleona commented 4 months ago

Summary

Fix for https://github.com/amplitude/Amplitude-Swift/issues/182

If we cannot retrieve a valid device id from the IDFV, fall back to using a generic uuid. This mirrors logic from the legacy SDK where the vendor id getter considers '00000000-0000-0000-0000-000000000000' as nil, but doesn't block an explicitly set id with the same value.

Note that clients who have already persisted an invalid deviceId will not be updated, and will need to either reset their amplitude instance, or set a new deviceId.

Checklist

github-actions[bot] commented 4 months ago

:tada: This PR is included in version 1.6.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket: