tboyko / apple_shove

Multi-Certificate APN Service Provider. More powerful than Apple Push...
MIT License
17 stars 7 forks source link

Enable .p12 file with both key & certificate #2

Closed pctj101 closed 11 years ago

pctj101 commented 11 years ago

Exported like this to .p12: https://www.evernote.com/shard/s79/sh/f616230d-1224-488e-9a0e-7e022982cdb4/249aceb26db9419d14b4722f625372bf

No errors during operation, but still having trouble having the actual message get delivered.

pctj101 commented 11 years ago

Okay messages get delivered now in both basic and enhanced APNS format. Helps to turn OFF do not disturb on my ipad. :(

tboyko commented 11 years ago

Thanks for the pull requests! I just pushed an update (1.1.0) which adds better error support for instances where a bad p12 is provided. I was unable to use your implementation due to the limitations that one of the included packages (Celluloid) requires, but I do believe that my rendition will fit your needs.

With regard to the "enhanced APNS format support" commit you provided, there are a few things that keep me from being able to merge it:

  1. It needs its own pull request since it isn't related to this one. Try creating branches on your forked repo next time so that additional work you do doesn't accidentally get tagged to this pull request, which I'm guessing was the case.
  2. puts isn't considered an acceptable means of messaging or logging for gems. The easiest thing to do would probably be to use the Logger singleton facility already in the gem, though this relegates the enhanced APNS feedback for debug purposes instead of for something potentially more useful like notification status checking from the application using the gem.
pctj101 commented 11 years ago

I guess I'm no pro at Celluloid. Can you put a quick note at what was not compatible with Celluloid so I could avoid introducing the same kind of issue in the future?

tboyko commented 11 years ago

Take a look at celluloid/celluloid#233. If we raise an exception during the initialization of a cell, we don't have a good way of knowing. Using a Supervisor seems to be the way of handling this, but a bug exists that causes the Supervisor to crash as well in this situation.