質問編集履歴
1
サーバ側の処理と気になっている点を追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -40,7 +40,7 @@
|
|
40
40
|
|
41
41
|
|
42
42
|
|
43
|
-
```
|
43
|
+
```c
|
44
44
|
|
45
45
|
|
46
46
|
|
@@ -68,6 +68,66 @@
|
|
68
68
|
|
69
69
|
|
70
70
|
|
71
|
+
以下のサイトを参考に、
|
72
|
+
|
73
|
+
[【iOS7】プッシュ通知のバックグラウンド処理でハマったメモ](http://d.hatena.ne.jp/shu223/20140113/1389612563)
|
74
|
+
|
75
|
+
`[application unregisterForRemoteNotifications];`を入れております。
|
76
|
+
|
77
|
+
このサイトではiOS7なので若干違っており、`UIRemoteNotificationTypeNewsstandContentAvailability`がないのが気になっております。iOS8の場合はこれに該当するものがありませんでした。
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
サーバ側はrubyのgem「Grocer」を使っております。
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
```ruby
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
# 以下の方法と、
|
90
|
+
|
91
|
+
notification = Grocer::Notification.new(
|
92
|
+
|
93
|
+
device_token: "fe15a27d5df3c34778defb1f4f3880265cc52c0c047682223be59fb68500a9a2",
|
94
|
+
|
95
|
+
alert: "Hello from Grocer!",
|
96
|
+
|
97
|
+
badge: 42,
|
98
|
+
|
99
|
+
category: "a category", # optional; used for custom notification actions
|
100
|
+
|
101
|
+
sound: "siren.aiff", # optional
|
102
|
+
|
103
|
+
expiry: Time.now + 60*60, # optional; 0 is default, meaning the message is not stored
|
104
|
+
|
105
|
+
identifier: 1234, # optional; must be an integer
|
106
|
+
|
107
|
+
content_available: true, # optional; any truthy value will set 'content-available' to 1
|
108
|
+
|
109
|
+
mutable_content: true # optional; any truthy value will set 'mutable-content' to 1
|
110
|
+
|
111
|
+
)
|
112
|
+
|
113
|
+
pusher.push(notification)
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
# 以下の方法の両方試しましたが、結果は同じでした。
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
notification = Grocer::NewsstandNotification.new(device_token: "...")
|
122
|
+
|
123
|
+
pusher.push(notification)
|
124
|
+
|
125
|
+
```
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
71
131
|
同様の現象に出くわして解決された方はいらっしゃいませんか?
|
72
132
|
|
73
133
|
iOS (iPad) 8.4.1(12H321)
|