Sha256: 81c13df7a77976a2d6fd821f2f888c5af27bc5cd1eae102985d01672b745906b

Contents?: true

Size: 746 Bytes

Versions: 8

Compression:

Stored size: 746 Bytes

Contents

module BW
  # New additions to CLAuthorizationStatus in ios8
  # see: https://developer.apple.com/library/prerelease/ios/documentation/CoreLocation/Reference/CLLocationManager_Class/index.html#//apple_ref/c/tdef/CLAuthorizationStatus
  Constants.register(
    KCLAuthorizationStatusAuthorized,
    KCLAuthorizationStatusAuthorizedWhenInUse,
    KCLAuthorizationStatusAuthorizedAlways
  )

  module Location
    module_function

    def authorized?
      [
        BW::Constants.get("KCLAuthorizationStatus", :authorized),
        BW::Constants.get("KCLAuthorizationStatus", :authorized_always),
        BW::Constants.get("KCLAuthorizationStatus", :authorized_when_in_use)
      ].include?(CLLocationManager.authorizationStatus)
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
bubble-wrap-1.9.7 motion/ios/8/location_constants.rb
bubble-wrap-1.9.6 motion/ios/8/location_constants.rb
bubble-wrap-1.9.5 motion/ios/8/location_constants.rb
bubble-wrap-1.9.4 motion/ios/8/location_constants.rb
bubble-wrap-1.9.3 motion/ios/8/location_constants.rb
bubble-wrap-1.9.2 motion/ios/8/location_constants.rb
bubble-wrap-1.9.1 motion/ios/8/location_constants.rb
bubble-wrap-1.9.0 motion/ios/8/location_constants.rb