8
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Send notifications iPhone/iPad using Amazon SNS and Rails

Posted at

Short hand

sns = AWS::SNS.new(
  access_key_id: "key",
  secret_access_key: "key",
  region: "region")
client = sns.client
apns_payload = {aps: {alert: "hey it worked!", sound: "default"}}.to_json
message = {default: "this is the default", APNS: apns_payload }.to_json
client.publish message: message, topic_arn: "topic_arn", message_structure: "json"

References:

https://github.com/aws/aws-sdk-ruby/issues/336
http://www.jamesransom.net/?p=27

8
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?