Post

Replies

Boosts

Views

Activity

No FCM token found
The issue I am facing is that even when I run my app from a physical device, I get the error "No FCM token found," while push notifications are enabled in my Xcode capabilities. I don't see the FCM token generated in the users' collection on Firestore. While the code setup seems good, the same error persists. I have implemented the logic to retrieve the FCM token, hat the necessary permissions are granted in my app.Here are my Firestore rules: rules_version = '2'; service cloud.firestore { match /databases/{database}/documents { // Allow authenticated users to read and write their own user data match /users/{userId} { allow read: if request.auth != null; allow update: if request.auth != null && (request.auth.uid == userId || // Allow FCM token updates request.resource.data.diff(resource.data).affectedKeys().hasOnly(['fcmToken'])); allow create: if request.auth != null; match /followers/{followerId} { allow read: if request.auth != null; allow write: if request.auth != null && request.auth.uid == followerId; } match /following/{followingId} { allow read: if request.auth != null; allow write: if request.auth != null && request.auth.uid == userId; } match /blockedUsers/{blockedUserId} { allow read, write: if request.auth != null && request.auth.uid == userId; } } // Messages collection match /messages/{messageId} { allow create: if request.auth != null && (request.resource.data.senderId == request.auth.uid || request.resource.data.receiverId == request.auth.uid); allow read, update, delete: if request.auth != null && (resource.data.senderId == request.auth.uid || resource.data.receiverId == request.auth.uid); } // Chats collection match /chats/{chatId} { allow create: if request.auth != null && request.auth.uid in request.resource.data.participants; allow read, update, delete: if request.auth != null && request.auth.uid in resource.data.participants; } // Call-related documents match /calls/{callId} { allow create: if request.auth != null && request.auth.uid in [request.resource.data.callerId, request.resource.data.receiverId]; allow read, write: if request.auth != null && (request.auth.uid == resource.data.callerId || request.auth.uid == resource.data.receiverId); } // Posts match /posts/{postId} { allow read: if true; allow create, update: if request.auth != null; allow delete: if request.auth != null && request.auth.uid == resource.data.userId; } // Reports match /reports/{reportId} { allow create: if request.auth != null; allow read: if request.auth != null; allow update: if request.auth != null; } // ✅ New livestreams collection rule added here match /livestreams/{document} { allow read, write: if request.auth != null; } } } [my index.js](https://developer.apple.com/forums/content/attachment/bffd0276-ece5-4ce9-b08b-83e8770cb8f2) [My code of class AppDelegate](https://developer.apple.com/forums/content/attachment/abba6a58-d513-49d4-a1d4-dc7dfae56e0a) [code of class AVDelegateWrapper:](https://developer.apple.com/forums/content/attachment/acd15ac0-ba9e-415f-9503-aea88377e92f) ` [struct ContentView](https://developer.apple.com/forums/content/attachment/4f75c535-860e-488f-835b-63c76586ac50) ` [And for after Login code : ](https://developer.apple.com/forums/content/attachment/f6af060e-f2bb-417f-af08-a946dd650474) `
0
0
56
2w
App Attest Error
Hi, I'm running into an issue with App Attest in my iOS app, and I'm hoping you can help me troubleshoot. I've registered my app in App Check for both App Attest and Device Check, and I've double-checked that my bundle ID is correct. I've also enabled App Attest in Xcode capabilities and am testing on a physical device. However, when I run the app, I'm getting the following error in the console: Error getting App Check token; using placeholder token instead. Error: App attestation failed. HTTP status code: 403 "message": "App attestation failed." I've tried a few things, but I'm still stuck. Any suggestions on what might be causing this or how to resolve it would be greatly appreciated! Thanks in advance
1
0
47
2w