QuickBlox / quickblox-flutter-sdk

quickblox-flutter-sdk
Other
8 stars 0 forks source link

Error in iOS #40

Closed prashant-277 closed 1 year ago

prashant-277 commented 2 years ago

Facing error in ios run for a push notification I uploaded the push certificates in quickblox and also uploaded APNs Authentication Key in firebase.

error: Request failed: client error (422) reasons: { errors = { "client_identification_sequence" = ( "is invalid" ); }; }

suhail-zartek commented 2 years ago

@prashant-277 Did you do the android side? if so, did you try to kill the app, and attempt a call to the app? I'm struggling to receive call afterward. It only works the first launching time for me. I want to know is it a known issue for everyone

ghost commented 2 years ago

Hello,

This is Liubov from QuickBlox support.

The parameter device.client_identification_sequence is a unique hash to identify a client device in 3rd party services such as APNS or GCM/FCM.

Initially retrieved from a 3rd service and should be sent to QuickBlox to let it consequently send push notifications to the client.Here is the link to Server API for reference: Push Notifications (quickblox.com)

Please make sure that you pass client_identification_sequence in APNS format (not FCM or other) to create a push subscription for iOS.

Please follow this guide to configure push notifications and make sure that an APNS certificate and everything else is configured for your application.

Here is a link: https://help.quickblox.com/article/357-how-do-i-configure-chat-and-video-calling-push-notifications

Also, please review our Flutter documentation: https://docs.quickblox.com/docs/flutter-push-notifications#create-push-subscription

Here is the link to the latest Flutter SDK version 0.6.2-beta: https://pub.dev/packages/quickblox_sdk/versions

prashant-277 commented 2 years ago

Hello,

This is Liubov from QuickBlox support.

The parameter device.client_identification_sequence is a unique hash to identify a client device in 3rd party services such as APNS or GCM/FCM.

Initially retrieved from a 3rd service and should be sent to QuickBlox to let it consequently send push notifications to the client.Here is the link to Server API for reference: Push Notifications (quickblox.com)

Please make sure that you pass client_identification_sequence in APNS format (not FCM or other) to create a push subscription for iOS.

Please follow this guide to configure push notifications and make sure that an APNS certificate and everything else is configured for your application.

Here is a link: https://help.quickblox.com/article/357-how-do-i-configure-chat-and-video-calling-push-notifications

Also, please review our Flutter documentation: https://docs.quickblox.com/docs/flutter-push-notifications#create-push-subscription

Here is the link to the latest Flutter SDK version 0.6.2-beta: https://pub.dev/packages/quickblox_sdk/versions


I am done this for get FCM token _firebaseMessaging.getToken().then((token) { setState(() { device_token = token; print("fcm token " + device_token); prefs.setString("fcmToken", device_token.toString()); }); });

then

Future createPushSubscription() async { try { List subscriptions = await QB.subscriptions.create(device_token, QBPushChannelNames.GCM); int length = subscriptions.length;

  if (length > 0) {
    _id = subscriptions[0].id;
  }
} on PlatformException catch (e) {
}

}

ghost commented 2 years ago

@prashant-277 Hello,

Thank you for getting back to us.

Please provide us with the following details in order to investigate the issue:

yahya-8gates commented 2 years ago

I have the same issue

ghost commented 2 years ago

@yahya-8gates Hello, please let me know if you followed the recommendations. Also, please update the SDK to the latest version: https://pub.dev/packages/quickblox_sdk/versions/0.6.7-beta If the issue persists, please provide the requested details.

yahya-8gates commented 2 years ago

Hello @QB-nikolay-zolotarov ,

I still have the same issue when subscribing to Push notifications specifically.

I have the latest version: quickblox_sdk: 0.6.7-beta firebase_messaging: ^11.2.15 firebase_core: ^1.15.0

I followed the documentation to setup the project, and it is working fine for Android, but iOS devices show this error.

Can anything help me to resolve this? Thank you

ghost commented 2 years ago

Please make sure that you pass client_identification_sequence in APNS format (not FCM or other) to create a push subscription for iOS. To get a token, you need to use the User Notifications Framework. Please check how you get the token and let me know if you have any further questions. example: d07863267e7e511b533a22ff22a57ef0fb1e4518e14a8ea983c7143b76040e06