How do I use CLLocationManager in an OS X Today Extension? How do I use CLLocationManager in an OS X Today Extension? swift swift

How do I use CLLocationManager in an OS X Today Extension?


OS X Today Extensions use an App Sandbox by default and you need to check the right boxes to allow the Today Extension to do things like get the user's location and make network calls.

Go to your project settings in Xcode, select your OS X Today Extension target, click the Capabilities tab, expand the App Sandbox section, and check the boxes for the capabilities you want (in my case, Location and Outgoing Network Connections).