Meteor-Community-Packages / raix-push

DEPRECATED: Push notifications for cordova (ios, android) browser (Chrome, Safari, Firefox)
https://atmospherejs.com/raix/push
MIT License
514 stars 197 forks source link

No token registered in iOS app when installed from App Store #339

Closed artpolikarpov closed 5 years ago

artpolikarpov commented 5 years ago

Hi!

Just run into a strange problem. When testing a build via xCode, tokens are registered as usual, but when you download the same app through the App Store, tokens are not registered. I use this package for more than a 2 years without any problems in Chatra. The production app as usual asks permission to send notifications on first run, but no token is saved to DB after that. Certificates are ok.

I'm using version 3.3.0. Android is fine both in dev and in prod.

Any ideas please?

artpolikarpov commented 5 years ago

Oh.. I've fixed it. It was "no valid “aps-environment” entitlement string found for application" error. Strange that Push Notifications option was enabled in the project editor's Capabilities pane. But aps-environmentwas added only to Entitlements-Debug.plist. So I just manually edited Entitlements-Release.plist like so:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <dict>
        <key>aps-environment</key>
        <string>production</string>
    </dict>
</plist>

...and everything started to work. Looks like Cordova or xCode bug, never mind.

raix commented 5 years ago

@artpolikarpov do we need to add any notes to the documentation?