Slide 62
Slide 62 text
#
プッシュ通知の登録
(iOS側):
Orbiter
というiOSライブラリを使う
url
=
NSURL.URLWithString(
"http://***.herokuapp.com/push_notification"
)
orbiter
=
Orbiter.alloc.initWithBaseURL(url,
credential:nil)
orbiter.registerDeviceToken(deviceToken,
success:
lambda
{
|responseObject|
NSLog("Registration
Success")
},
failure:
lambda
{
|error|
NSLog("Error:
%@",
error)
}
)
#
REST
API
で
helios
server
にプッシュ通知を依頼
curl
-‐X
POST
-‐d
'payload={"aps"
:
{"alert":"Hello,
Helios!!"}}'
http://***.herokuapp.com/push_notification/message