Skip to content

IOS push token not valid #31

Closed
Closed

Description

@Eramirez06

when i try to use this method from React Native on IOS

 ConnectyCube.pushnotifications.subscriptions.create(
      params,
      (error, response) => {
        console.log('error', error);
      },
    );

return client_identification_sequence: ["is invalid"] but i already try the the token that i sent on firebase and it work could someone help me to know what the problem is?

Activity

  1. DaveLomber commented on Jan 17, 2020

    @DaveLomber
    Collaborator

    Please post here what is inside params
    This will help us to identify the issue quickly

  2. Eramirez06 commented on Jan 17, 2020

    @Eramirez06
    Author

    this is what is send it

    device[platform]: ios
    device[udid]: E53E3458-3205-411D-930E-545DBCFE32AB
    notification_channels: apns
    push_token[client_identification_sequence]: djmKaNIYF3A:APA91bFxhi3td6JNxyIdjsr-MhUKzrXAuKAUkS9gDUaq0eH0wHLWbT1nNA1XOaRo1kFCPT1FoBqFDZKfOneBeE_XqOpVMFGOh9g4NN-BhcGBNWWUzMv_0BwnoMiTUu1YiICZCPyPrPGR
    push_token[environment]: development
    
  3. DaveLomber commented on Jan 17, 2020

    @DaveLomber
    Collaborator

    Your client_identification_sequence value seem invalid, as it's not in iOS APNS format

    iOS device push tokens are strings with 64 hexadecimal symbols. Push token example:
    03df25c845d460bcdad7802d2vf6fc1dfde97283bf75cc993eb6dca835ea2e2f

    Please check it or provide a code how you are getting it

  4. Eramirez06 commented on Jan 17, 2020

    @Eramirez06
    Author

    this is how i getting the push token i'm using firebase
    let reponse = await firebase.messaging().getToken();
    and has i said i already test it on firebase the push token and it work fine i recive the push on my device

  5. DaveLomber commented on Jan 17, 2020

    @DaveLomber
    Collaborator

    Please send link to lib or guide

  6. DaveLomber commented on Jan 17, 2020

    @DaveLomber
    Collaborator

    @Eramirez06 the way why it can work is that it probably delivers it by Firebase channel, not by APNS channel

  7. DaveLomber commented on Jan 17, 2020

    @DaveLomber
    Collaborator
  8. Eramirez06 commented on Jan 17, 2020

    @Eramirez06
    Author

    cool let me a moment i will try it and the post if it works thanks

  9. Eramirez06 commented on Jan 17, 2020

    @Eramirez06
    Author

    It work this is what i need, just for future implementation you should Really add this to you React Native Example o add a comment with this

    for person who read this token on IOS work like this and just work in real device not in a emulator

       let response = await firebase
            .messaging()
            .ios.registerForRemoteNotifications();
          let reponse = await firebase.messaging().ios.getAPNSToken();
    
  10. DaveLomber commented on Jan 28, 2020

    @DaveLomber
    Collaborator

    In a case for further reference - we prepared a complete guide on how to integrate push notifications in React Native

    https://developers.connectycube.com/reactnative/push-notifications

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions