amplitude / Amplitude-Swift

Native iOS/tvOS/macOS/watchOS SDK
MIT License
26 stars 20 forks source link

Is TrackingOptions.forCoppaControl supposed to be a static function? #166

Closed danielmatzke closed 3 months ago

danielmatzke commented 3 months ago

The function TrackingOptions.forCoppaControl does not access the self object. It might be misleading since it looks like the function returns a COPPA-compliant version of the options it is being called on. I suggest either using the object the function is called on, or turning it into a static function.

https://github.com/amplitude/Amplitude-Swift/blob/f6efc4bda75c3c3092dc00d48c64b0096e076163/Sources/Amplitude/TrackingOptions.swift#L163-L170

crleona commented 3 months ago

Hi @danielmatzke, I agree this works better as a static function and is updated in #168, but please note this is not a public function and will be controlled through Configuration.enableCoppaControl