Giter Site home page Giter Site logo

[Bug]: OneSignal: This method has been deprecated. Use getIdAsync instead for getting push subscription id. about react-native-onesignal HOT 5 CLOSED

Romick2005 avatar Romick2005 commented on June 20, 2024
[Bug]: OneSignal: This method has been deprecated. Use getIdAsync instead for getting push subscription id.

from react-native-onesignal.

Comments (5)

nan-li avatar nan-li commented on June 20, 2024 2

Hi @Romick2005 good call, we will update the log to include the method name.

In Release 5.1.0, the SDK added the method await OneSignal.User.pushSubscription.getIdAsync() as a more accurate getter for the push subscription ID.

The previous getter was OneSignal.User.pushSubscription.getPushSubscriptionId(), which is still fully supported and behaves same as before.

The new async getter will return more accurate data during early app startup, compare to getPushSubscriptionId() which may return undefined.

from react-native-onesignal.

Romick2005 avatar Romick2005 commented on June 20, 2024 1

Replacements:
getPushSubscriptionId -> getIdAsync
getPushSubscriptionToken -> getTokenAsync
getOptedIn -> getOptedInAsync
hasPermission -> getPermissionAsync

from react-native-onesignal.

hexllhexll avatar hexllhexll commented on June 20, 2024

The same problem

from react-native-onesignal.

hexllhexll avatar hexllhexll commented on June 20, 2024

Thank you, problem has been resolved

from react-native-onesignal.

jennantilla avatar jennantilla commented on June 20, 2024

Thank you flagging! The warnings have been updated and will be included in our next React Native release.

from react-native-onesignal.

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.