amplitude / Amplitude-Swift

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

fix: correct behaviors around single-target watch apps vs watch extensions to avoid crashes when targeting watchOS 8 and lower #179

Closed thedavidharris closed 4 months ago

thedavidharris commented 4 months ago

Summary

Checklist

thedavidharris commented 4 months ago

Unsure why this test is failing.

crleona commented 4 months ago

@thedavidharris Thank you for the PR! I had started work on another request (https://github.com/amplitude/Amplitude-Swift/pull/180) which solves an additional issue we had with tracking sessions and uses slightly simpler logic (as both WKApplication and WKExtension notifications have the same underlying rawValues and acted the same across the watchOS versions I tested). Closing this PR, but please let me know if you have a scenario that I missed that require the isSingleTargetApplication / watchOS 9.0 checks.