Comments (5)
@Hamza-Hasan-Almass you don't use the FCMToken with ApnSettings because the ApnToken and the FcmToken are different.
Check this link
The device token in APNs is a 64-byte hex string, and the Device ID in FCM is a 183-byte string, containing [a-zA-Z0-9_-] (all numbers, lowercase, and uppercase alphabets, and symbols like , _ and –).
Examples:
FCM Token: aaa12Om83EL9r57in1cJpy:APA91bFv1ydna_52WPl34jNYAFCs-_MHcgrTjjYlg2NetJRPI71111jf4449md-WsSDHcKLWS_n6mGpTGtOZZZhQQQO7NiI65LZMmxqpFUbAivn_YRYR-cIceQH4AhFmg0muUGdlAQYt
APNs Token: 2f3035b209d30980e462a0921f4853021d7ee030e200bc0000487b9008a80005
If you use FCM token with ApnSender then you'll receive BadDeviceToken. Use APNs Token with ApnSender or FCM Token with FCMSender
from net-core-push-notifications.
Hi , are you fix it this issue? Or you still get BadDeviceToken ?
because i am received the same error @andrei-m-code
thanks
from net-core-push-notifications.
Guys, I need some more details on that issue... would you possibly be able to test it with the source code of the lib and create a PR?
from net-core-push-notifications.
The problem is when i am using the fcm token from client side and send the push notification from firebase console directly it was send successfully but when i am using the same fcm which i received from the client side i got BadDeviceToken.
my code is below
var apnSettings = new ApnSettings();
apnSettings.ServerType = ApnServerType.Production;
apnSettings.AppBundleIdentifier = _notificationSettings.AppBundleIdentifier;
apnSettings.P8PrivateKey = _notificationSettings.P8PrivateKey;
apnSettings.P8PrivateKeyId = _notificationSettings.P8PrivateKeyId;
apnSettings.TeamId = _notificationSettings.TeamId;
is the P8PrivateKey => must i received from file or i can copy the file content directly between start and end and using it
@andrei-m-code
from net-core-push-notifications.
@andrei-m-code Please can you tell us how can we solve this issue?
everything i set it correctly as you mentioned in the readme file but only on the iOS device i got BadDeviceToken thanks advance
from net-core-push-notifications.
Related Issues (20)
- Push icon HOT 3
- Additional functionality HOT 1
- Non-hardcoded FCM Url HOT 3
- How can distinguish between fem tokens
- Distinguish between fcm tokens HOT 1
- Only HTTP/1.0 and HTTP/1.1 version requests are currently supported HOT 1
- Version 3.1.1 & 3.1.0 - ApnSender Fails With Serialization Error (.Net Core 6.0.7) HOT 3
- ApnsResponse from ApnSender.Send has IsSuccess = true, but I never receive notification? HOT 1
- Cancel a notification HOT 1
- Support for System.Text.JSON HOT 5
- Migrate from legacy HTTP to HTTP v1 HOT 1
- ApnSender.Send throws an Exception when Bad DeviceId is provided. HOT 4
- Firebase Error Throws Exception HOT 2
- Usage clarification HOT 2
- For Anyone Who Has Issues with Azure Service & Firebase (Cryptography) - See this... HOT 1
- message.data serialization convention HOT 3
- Exception when sending notifications to iOS devices HOT 1
- work with apple wallet passbook HOT 1
- FirebaseSettings are a record thus not allowing binding to appsettings.json HOT 1
- Firebase CryptographicException when deployed to production server (NOT Azure)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from net-core-push-notifications.