Git Product home page Git Product logo

push-apns's Introduction

PushApns

Please see push-core for more information.

push-apns's People

Contributors

gwynantj avatar tilo avatar tompesman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

push-apns's Issues

Migration file changes

Hi

"Type" is a reserve word in rails 3.2, migrations need to change. All 3 tables has Type reserved field

vamshi

APN Error Code 8 : Invalid Token should log the actual invalid token

errors in the error log do not list what the invalid token was - this is pretty annoying, and
the only remedy is then to look in the database.

When surfacing the error, the device token should be included in the error message

  [ERROR] [Push::DeliveryError, Unable to deliver message 12345, received APNS error 8 (Invalid token)'

content_available accessor not available in Rails 4.

Using Rails 4.0.2 with Ruby 2.12p95. I'm trying to include the content_available attribute in my push message, Everything works fine when I don't include content_available. When I include content_available :

Error = unknown attribute: content_available

Here's a snippet :

        apns_msg = {
          app: 'FEMA',
          device: device.push_token,
          alert: headline,
          sound: 'default',
          badge: device.local_alerts.count + 1,
          content_available: 1, # use this if you want the iOS app to auto launch upon receiving this notification
          attributes_for_device: { identifier: alert.identifier }
        }
        apns_msg[ :expiry ] = time_to_live if ( time_to_live.present? )
        Push::MessageApns.create( apns_msg )

Maybe it's because of the check in message_apns.rb for ActiveModel::MassAssignmentSecurity? Didn't that go away in Rails 4?

attr_accessible :app, :device, :alert, :badge, :sound, :expiry, :attributes_for_device, :content_available if defined?(ActiveModel::MassAssignmentSecurity)

MessageApns.alert method returns nil

I had to change the first line to this in order for it to work.
string_or_json = properties[:alert]
The read_attribute(:alert) returns nothing. And thus no text in the notification that's sent.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.