getsentry / sentry-cocoa

The official Sentry SDK for iOS, tvOS, macOS, watchOS.
https://sentry.io/for/cocoa/
MIT License
812 stars 324 forks source link

Handle UUID changes in device for false positive OOM #1334

Closed aguilarpgc closed 2 years ago

aguilarpgc commented 3 years ago

As Apple mention (https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor) for UUID:

The value in this property remains the same while the app (or another app from the same vendor) is installed on the iOS device. The value changes when the user deletes all of that vendor’s apps from the device and subsequently reinstalls one or more of them. The value can also change when installing test builds using Xcode or when installing an app on a device using ad-hoc distribution. Therefore, if your app stores the value of this property anywhere, you should gracefully handle situations where the identifier changes.

That would mean adding this scenario in SentryOutOfMemoryLogic: If the UUID changed then return NO, if it hasn't changed then continues with the next validations. 
 My question is if you plan to add this scenario in SentryOutOfMemoryLogic.m?

marandaneto commented 3 years ago

looks like a fair thing to check as well

aguilarpgc commented 3 years ago

Hi, thanks for the response. Do you agree If I make the implementation? or you guys will be considering doing yourselves?

marandaneto commented 3 years ago

@aguilarpgc a PR would be awesome