ConnectyCube / connectycube-flutter-samples

Code samples for Flutter, based on ConnectyCube platform
https://developers.connectycube.com/flutter/
Apache License 2.0
85 stars 91 forks source link

push notification subscription ios issue #301

Closed richanshah closed 9 months ago

richanshah commented 1 year ago

if (GetPlatform.isAndroid || kIsWeb || GetPlatform.isIOS || GetPlatform.isMacOS) { parameters.channel = NotificationsChannels.GCM; parameters.platform = CubePlatform.ANDROID; }

in ur push notification subscription code why platform is going as ANDROID for all the platforms?

even in the logs of iphone i am getting platform as android. can u elaborate me for the same ?

{cb-token-expirationdate: 2023-09-12 09:21:46 UTC, connection: keep-alive, date: Tue, 12 Sep 2023 07:21:46 GMT, strict-transport-security: max-age=15768000; includeSubDomains, content-length: 566, access-control-expose-headers: CB-Token-ExpirationDate, Date, content-type: application/json; charset=utf-8, server: nginx/1.25.0} flutter: BODY flutter: [{"subscription":{"id":7558490,"_id":"6500118a1cafd8002fd8f801","user_id":10551474,"bundle_identifier":"com.bv.mainCourt","client_identification_sequence":"eENra3AMkU3LgJqc5kMTR5:APA91bGK0oGCJyFQo2emXZ_a3PoRq3VHDTF6ge5trGESBcz8D3wUXRMgfykSiGdR_W83pFRlhyfWw1SM3MmGrbEgPCvZ9pzEXpycSZQF0Vo-1gB2oJLq53v8rKvAHEvaMaakOPnKZb_2","notification_channel_id":3,"udid":"FB524DF3-3773-407F-8527-DBA54DD4B4D2","platform_id":2,"environment":"development","notification_channel":{"name":"gcm"},"device":{"udid":"FB524DF3-3773-407F-8527-DBA54DD4B4D2","platform":{"name":"android"}}}}] flutter: flutter: CB-SDK: PushNotificationsManager: [subscribe] subscription SUCCESS

TatankaConCube commented 1 year ago

We have discussed this topic earlier here https://github.com/ConnectyCube/connectycube-flutter-samples/issues/280 Let me remind you - in our chat sample we use the FCM for all platforms due to some conflicts between available flutter libs for working with APNS and FCM in the same project.

Sure, you can use the APNS for iOS/macOS and FCM for others in your project, there are no problems with it.