tgios 0.0.36 → 0.0.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/Gemfile.lock +1 -1
- data/lib/tgios/beacon_manager.rb +15 -3
- data/lib/tgios/ui_picker_view_list_binding.rb +0 -1
- data/lib/tgios/ui_table_view_list_binding.rb +1 -0
- data/lib/tgios/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
OTgwNWZlYjdjMDRiMjUxMzcxZTkxZDhjYzA5NjNkMDVkZTZhMDNhMw==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
MGRkYjE1Mzg0YTg5NTNkYzkwOGVlYzgzNzk3NGVkZDA5ODhhNzRhNg==
|
|
7
7
|
SHA512:
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
OWE1NGZhMzc4OGJlYWRkMjBiOWU0NDU5ZjRjMjc5ZDUxNjAwY2VjNDRkYWQ2
|
|
10
|
+
MTU1YTg3YWQxYTcwZTI0MTQ3Njg0Y2MzM2U2MDgyMjljY2U1NTI1ZmZhODZm
|
|
11
|
+
ZGI3MmZjYTRhYWRmMTkyYjkxZjc3ZjY3ZmQ0NTZjMDdlYmZjZTc=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
NzNjYjhhMDIxOGVmOWExNzM4YWJmOGEwMDc3ZDE2MWI5Mzk4N2Q1ZWE0NDEw
|
|
14
|
+
ZWMzNTU2ZGMyZGEwMThhZThmMTUxY2Y4NzQ4ZTRkYTFiYzJiNTYyN2NjMjA3
|
|
15
|
+
YzZlYmI2NDBlNWNhNmRhZjI0NDQxZTJjNGRhMjM1ZWE3NGVlODc=
|
data/Gemfile.lock
CHANGED
data/lib/tgios/beacon_manager.rb
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
# Localize authorization request alert in your Localizable.strings
|
|
2
|
+
# "Tgios::BeaconManager.request_alert.title.denied" = "Location services are off";
|
|
3
|
+
# "Tgios::BeaconManager.request_alert.title.disabled" = "Background location is not enabled";
|
|
4
|
+
# "Tgios::BeaconManager.request_alert.message" = "To use background location you must turn on 'Always' in the Location Services Settings";
|
|
5
|
+
|
|
1
6
|
module Tgios
|
|
2
7
|
class FakeBeacon
|
|
3
8
|
attr_accessor :proximityUUID, :major, :minor
|
|
@@ -115,10 +120,17 @@ module Tgios
|
|
|
115
120
|
def request_authorization(manager)
|
|
116
121
|
if manager.respond_to?(:requestAlwaysAuthorization)
|
|
117
122
|
status = CLLocationManager.authorizationStatus
|
|
118
|
-
if status
|
|
119
|
-
|
|
120
|
-
|
|
123
|
+
if status == KCLAuthorizationStatusAuthorizedWhenInUse || status == KCLAuthorizationStatusDenied
|
|
124
|
+
denied_title = 'Tgios::BeaconManager.request_alert.title.denied'._
|
|
125
|
+
denied_title = 'Location services are off' if denied_title == 'Tgios::BeaconManager.request_alert.title.denied'
|
|
126
|
+
|
|
127
|
+
disabled_title = 'Tgios::BeaconManager.request_alert.title.disabled'._
|
|
128
|
+
disabled_title = 'Background location is not enabled' if disabled_title == 'Tgios::BeaconManager.request_alert.title.disabled'
|
|
129
|
+
|
|
130
|
+
message = 'Tgios::BeaconManager.request_alert.message'._
|
|
131
|
+
message = "To use background location you must turn on 'Always' in the Location Services Settings" if message == 'Tgios::BeaconManager.request_alert.message'
|
|
121
132
|
|
|
133
|
+
title = (status == KCLAuthorizationStatusDenied) ? denied_title : disabled_title
|
|
122
134
|
UIAlertView.alert(title, message: message)
|
|
123
135
|
else
|
|
124
136
|
manager.requestAlwaysAuthorization
|
data/lib/tgios/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tgios
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.37
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- April Tsang
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2015-
|
|
12
|
+
date: 2015-07-23 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: sugarcube
|