Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add support for watchOS #330

Merged
merged 2 commits into from
Mar 16, 2021

Conversation

daltonclaybrook
Copy link
Contributor

Summary

Resolves #247

This PR updates the SDK to include support for watchOS. The only consequential change to the SDK is the addition of a new type: AMPBackgroundNotifier. The doc comment in that file explains its purpose:

watchOS adds support for background notifications in watchOS 7.0 with WKExtension.applicationDidEnterBackgroundNotification and related notifications. But since this SDK is backward-compatible with watchOS 3.0, these notifications are not available. Instead, the user should implement the appropriate background methods on their Extension Delegate and call the AMPBackgroundNotifier from those methods.

I've also updated the Podspec to add watchOS support. Feel free to make changes to this branch as you see fit.

Checklist

  • Does your PR title have the correct title format?
  • Does your PR have a breaking change?: No

@haoliu-amp
Copy link
Contributor

@daltonclaybrook Thanks! This is great. We will review it soon.

Copy link
Contributor

@haoliu-amp haoliu-amp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@daltonclaybrook LGTM. Have you tried logEvent in your watchOS app? Any issues with that?

@daltonclaybrook
Copy link
Contributor Author

@haoliu-amp I'm planning to do some testing on this today and will let you know.

@daltonclaybrook
Copy link
Contributor Author

@haoliu-amp I did some basic testing yesterday on-device and was seeing events in the dashboard. Not a comprehensive test, but anecdotally, it seems to be working.

@haoliu-amp haoliu-amp merged commit 9db310a into amplitude:main Mar 16, 2021
@haoliu-amp
Copy link
Contributor

@daltonclaybrook Thank you spending time to do the testing! We will release it very soon!

github-actions bot pushed a commit that referenced this pull request Mar 16, 2021
# [8.1.0](v8.0.0...v8.1.0) (2021-03-16)

### Features

* Add support for watchOS ([#330](#330)) ([9db310a](9db310a))
@github-actions
Copy link

🎉 This PR is included in version 8.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

watchOS support
2 participants