I am trying to get the user\'s current location using the following code, but it doesn\'t work. I have added both NSLocationWhenInUseUsageDescription key and
for some reason requestAlwaysAuthorization() is not available.
requestAlwaysAuthorization() isn't available because you're working in macOS, and the documentation shows that that method is only available in iOS and watchOS. See the list of SDK's on the right side of the page, near the top: