CMHeadphoneActivityManager
An object that starts and manages headphone activity services.
Declaration
class CMHeadphoneActivityManagerOverview
This class delivers headphone activity updates to your app. Use an instance of the manager to determine if the device supports headphone activity updates, and to start and stop updates. Before using this class, check isActivityAvailable and isStatusAvailable to make sure the features are available.
This class provides similar information to CMMotionActivityManager, except the activity information comes from headphone motion, rather than from device motion.
Topics
Checking Availability
Starting and Stopping Updates
startActivityUpdates(to:withHandler:)stopActivityUpdates()startStatusUpdates(to:withHandler:)stopStatusUpdates()