ConnectyCube / connectycube-reactnative-samples

Chat and Video Chat code samples for React Native, ConnectyCube
https://connectycube.com
Apache License 2.0
125 stars 111 forks source link

Error code 422 client_identification_sequence is invalid #89

Closed abdallahasswad closed 4 years ago

abdallahasswad commented 4 years ago

Hi,

I'm using firebase push notification for both platform iOS and Android, on Android it's work fine but on iOS not.

   const params = {
        // for iOS VoIP it should be 'apns_voip'
        notification_channel: Platform.OS === 'ios' ? 'apns' : 'gcm',
        device: {
            platform: Platform.OS,
            udid: Helper.getDeviceId()
        },
        push_token: {
            environment: __DEV__ ? 'development' : 'production',
            client_identification_sequence: fcmToken,
            bundle_identifier: "com.ConnectyCubeDemo"
        }
    }

    ConnectyCube.pushnotifications.subscriptions.create(params)
    .then(result => {
        console.log("token subscribed")
    })
    .catch(error => {
        console.log("token subscription failed")
    });

ConnectyCube push notification subscription return error code 422 client_identification_sequence is invalid. can anyone help me solving this issue ?

Thank you.

DaveLomber commented 4 years ago

@abdallahasswad please let us know which RN lib you use for push notifications

The guide is based around react-native-push-notification https://developers.connectycube.com/reactnative/push-notifications

If you use a react-native-firebase-lib, then please read this section https://developers.connectycube.com/reactnative/push-notifications?id=react-native-firebase-lib

abdallahasswad commented 4 years ago

Hi @DaveLomber,

I'm using react-native-push-notification as the documentation said, word by word. i have no idea why i'm getting this error.

DaveLomber commented 4 years ago

please share an example of your client_identification_sequence value for iOS

ccvlad commented 4 years ago

Since there is no activity I’m going to close the issue. Please raise a separate issue in case of any other questions.