iOS push notification on Heroku Rails App — how to provide the PEM file -


I am trying to send push notifications from my rail app I tried gems, and when I was on my development machine Then they do fantastic work.

To send these gems, / path / to / PEM / file (apple certificate of need) is required. However, how do I provide this file on a production server? Can not figure it out I am using Hariokok.

I tried uploading it to Amazon-S3 (non-public) and used it from there. However, this does not work because Gem is not for a local file (and a URI). How do I save a local file to Hariokk?

Mani APNS needs a path in the form of a string. It checks if the file exists or not.

  raise "The path to your spam file does not exist!" Until file.exist? (Self.pem)  

Mani Houston requires PEM as a file object However, I have the File.open ("url_to_my_pem_file" )

Can not find the local path just for Rails.root Can use var. Hosting your search files on S3 can be a bit overkill, and you're relying on your push server to S3. If downtime, you can not push. Besides, you are going to be slow down by making a web call

  DEF cert_path path = "# {Rails.root} / config / apn_credentials /" Path + = ENV [/ p]  

'APN_CERT'] == 'Production'? "Apn_gather_prod.pem": "apn_gather_dev.pem" return path termination


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -