ProMotion-push 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 92d47c1b7c5832101f3e86a8d4bdf1c5a411859a
4
- data.tar.gz: 0cd531d2a261031e3bbcc2fac090ea6f296ef9e2
3
+ metadata.gz: ddf74b4ca93f8c62d6e52e0b075302b83da7b98b
4
+ data.tar.gz: 888f61229b99e186a060846a411e5b638dc65023
5
5
  SHA512:
6
- metadata.gz: 26db989c1ab260ccc514557996d32088ef6a9bfd11e5cd54f99a1300a60c2638ce11627b88220a698144a3812630f513e87cc89ba93676b082c2810fbbe77d55
7
- data.tar.gz: 41e2d24ba08d7a8cef9406dd10012ab91c2dac2160079a3422bb086cd2b4a44d05ef7696801d568618ba43d97a380ed683666c5ea43a630e627a132b46ec2957
6
+ metadata.gz: a724ff35734feec0d4fd661d22a0d78864fabd58d104db644ef24a452b378e0215d5a8afe7631cab188a37185dba6b1bff7075ee38be7d55e16ef2d2fd1ef021
7
+ data.tar.gz: 85f5b8f4424efe80f2ee2356f87f929e441c5a7d59cf584d1206265f4dcfad43ca72724d476186bfa15eb4a573be3bcb7f7e9e2c5a7489eadbf98de8a7405020
@@ -54,8 +54,12 @@ module ProMotion
54
54
  end
55
55
 
56
56
  def registered_push_notifications
57
- mask = UIApplication.sharedApplication.enabledRemoteNotificationTypes
58
57
  types = []
58
+ if UIApplication.sharedApplication.respond_to?(:currentUserNotificationSettings)
59
+ mask = UIApplication.sharedApplication.currentUserNotificationSettings.types
60
+ else
61
+ mask = UIApplication.sharedApplication.enabledRemoteNotificationTypes
62
+ end
59
63
 
60
64
  types << :badge if mask & UIRemoteNotificationTypeBadge > 0
61
65
  types << :sound if mask & UIRemoteNotificationTypeSound > 0
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ProMotion-push
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamon Holmgren