Git Product home page Git Product logo

Comments (7)

erizzo avatar erizzo commented on June 18, 2024

Is there any advice or best practice for dealing with the problem of invalid device tokens? What even constitutes an "invalid" token?
All I can think of is using an Always reconnect policy, but that doesn't seem to be a good choice for a production environment.

from java-apns.

notnoop avatar notnoop commented on June 18, 2024

With the new support for enhanced push notification protocol, your ApnsDelegate will be notified if a connection gets closed due to an invalid device token. ApnsDelegate#connectionClosed() will be called with DeliveryError. MISSING_DEVICE_TOKEN argument.

from java-apns.

erizzo avatar erizzo commented on June 18, 2024

Great! Is that available in the 0.1.5 download, or do I have to build from source myself?

from java-apns.

notnoop avatar notnoop commented on June 18, 2024

It's available in the 0.1.5 download (I recommend using maven or Ivy though). Don't recall if you need to enable the enhanced service in ApnsServiceBuilder.

from java-apns.

erizzo avatar erizzo commented on June 18, 2024

For those who see this thread later:
In the 0.1.5 download, the default mode for ApnsServiceBuilder is to use "enhanced error-checking" mode. I did notice that the version of ApnsServiceBuilder in 0.1.5 has a bug that prevents you from disabling "enhanced error checking" mode; it was apparently fixed later (see 8002bb5)

from java-apns.

notnoop avatar notnoop commented on June 18, 2024

Thanks for bringing this up. Disabling enhanced error-checking mode will be available again in 0.1.6. I'll make a release soon. However, I'm considering breaking backward compatibility to fix some issues with the API in light of the new functionality.

from java-apns.

erizzo avatar erizzo commented on June 18, 2024

Now that I've updated our production environment to use 0.1.5 and put in an ApnsDelegate that just logs on connectionClosed(), I'm seeing a few closes due to INVALID_TOKEN. I understand that this can be caused by a development token being sent to the production pns server; is there any other potential cause of INVALID_TOKEN?

from java-apns.

Related Issues (20)

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.