WordPress.org

Ready to get started?Download WordPress

Forums

Safari Push
No notification pop-up & blank page (10 posts)

  1. andrebazaglia
    Member
    Posted 8 months ago #

    Even after following all the steps from Github, I still not able to have the plugin working. Here's all I did:

    1) Created a subdomain in my server and configured a SSL server block in nginx: https://push.ipodschool.com/

    2) Checked the .htaccess and verified that the equivalent nginx rules were applied and must be working fine.

    3) All other details, including the certificates uploads, the details in the config file were checked. PHP is working (https://push.ipodschool.com/helloworld.php). MySQL is also working.

    However, I still get blank pages in index.php, desktop.php instead of viewing the main index that may show everything is working. As consequence of it, the plugin doesn't work and Safari doesn't pop up to the reader the option to accept push notifications.

    Any suggestions?

    Thanks.

    http://wordpress.org/plugins/safari-push/

  2. macgamer
    Member
    Plugin Author

    Posted 8 months ago #

    It may be you need to change something for it to work with nginx.

    I would also set

    error_reporting(E_ALL);
    ini_set('display_errors', '1');

    at the top of index.php to see the actual error.

    also i notice your site certificate is not valid.

  3. andrebazaglia
    Member
    Posted 8 months ago #

    Thank you macgamer,

    The problem was in the config file, there was a wrong character (') inserted by my text editor. I don't know how it happened, but your suggestion made it easer for me to figure out what was wrong.

    I've also regenerated my certificates correctly so that they valid not. Safari is now asking properly for enabling notifications.

  4. andrebazaglia
    Member
    Posted 8 months ago #

    Okay, I'm promped to accept the notifications. I accept and can view that it is successfully activated in the push homepage. The database is with the Apple device ID's correctly.

    Thing is, though, I just don't receive any notifications. Where the problem may be?

    P.S: I've changed the link. The old one I published in the previous post won't work anymore.

    Thanks.

  5. macgamer
    Member
    Plugin Author

    Posted 8 months ago #

    Sending a test push from within the plugin doesn't work? Are you prompted to subscribe to notifications when you visit your wordpress site (not the push service)?

    It could be something in your configuration is wrong, e.g. the website id, or one of the key files.

  6. andrebazaglia
    Member
    Posted 8 months ago #

    Thanks again for the attention, macgamer.

    Yes, I'm promped to subscribe when I visit my wordpress site. You can check yourself: ipodschool.com

    However, the notifications doesn't work when I do a new post neither when I test a notification. I tried in more than one Mavericks, asked for friends to test, and nothing.

    I'm just not certain about three things:

    • What should I fill in "Web Service Authentication Code" in the WordPress's section of the plugin? Is it the same value I write in define('AUTHORISATION_CODE', 'somethinghere') in config.php?

    • If I'm promped in the wordpress website and MySQL is recording data, that's because the certificates .pem and .p12 are okay?

    • Creating the certificates were tricky. I had to download the .cer file from my Apple Developer Account and then use Keychain app to convert to .p12 and .pem. Did I do it correctly?

  7. andrebazaglia
    Member
    Posted 8 months ago #

    Update: pushwoosh is working well for me. However, I had to implement it manually. I hadn't have success with your plugin in both versions 0.6 and 0.7, using my own https:// server or pushwood. I had to implement pushwoosh code manually.

    The problem with your plugin is the same I described in the last post: notification pop up appear but I get no push. I still prefer to run the notification system by my server side. However, I'm certain I did everything. If the devices ID's were being stored in my database, then a communication between the client Maverick's Safari and my server were working. But push's not sent. :/

  8. macgamer
    Member
    Plugin Author

    Posted 8 months ago #

    What should I fill in "Web Service Authentication Code" in the WordPress's section of the plugin? Is it the same value I write in define('AUTHORISATION_CODE', 'somethinghere') in config.php?

    Exactly.

    If I'm promped in the wordpress website and MySQL is recording data, that's because the certificates .pem and .p12 are okay?

    No, this only indicates that the p12 file is correct. The .pem file is the one used (and only used) when connecting to APNS to send a push. It's possible that this file is invalid.

    Creating the certificates were tricky. I had to download the .cer file from my Apple Developer Account and then use Keychain app to convert to .p12 and .pem. Did I do it correctly?

    I had to go through a similar process, though I used the command-line:
    openssl x509 -in website_aps_production.cer -inform der -out apns-cert.pem -nodes -clcerts. I'll update the server readme on this with more detail.
    Try openssl s_client -connect gateway.push.apple.com:2195 -CAfile apns-cert.pem from Terminal to vierfy you can connect without errors.

    pushwoosh is working well for me. However, I had to implement it manually. I hadn't have success with your plugin in both versions 0.6 and 0.7, using my own https:// server or pushwood. I had to implement pushwoosh code manually.

    Could you let me know what you have to do to issue a push via pushwoosh? I had to give up trying to work support into the plugin because I couldn't get that part of it to work without errors, and no-one from pushwoosh replied to my emails.

  9. andrebazaglia
    Member
    Posted 8 months ago #

    Hi macgamer,

    I tested my pem certificate and got "Verify return code: 0 (ok)" as the last line of the command you asked me to run. Both .p12 and .pem must be okay...

    About your question about pushwoosh, all I did was to create an account there. Then I uploaded the .p12 certificate and typed the password for it. The javascript code I have to include in my blog HTML is also generated. As simple as that. They did all the rest. There's some documentation for the API, that includes also but personally speaking, I found it a little tricky (you may, however, understand it better than me): http://www.pushwoosh.com/programming-push-notification/pushwoosh-push-notification-remote-api/

  10. macgamer
    Member
    Plugin Author

    Posted 7 months ago #

    Re. pushwoosh, are you able to actually issue a push notification? This was the bit I struggled with.

    About your issue, try browsing to https://push.yoursite.com/v1/pushPackages and inspect the file that should get downloaded.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags