I created a key in https://developer.apple.com/account/resources/authkeys/list
This key got me a file, I uploaded this file into firebase:
I also setup in general the team id and app store id
Firebase?? So you created a firebase messaging provider in Appwrite?
Yes
Right?
got the service key in there too
So where is Appwrite saying this error?
In messages
That target id looks a little odd...did you put the Appwrite target id when sending the message?
I tried following this, not entirely sure where the target id is coming from cause i cannot find it back: https://appwrite.io/docs/products/messaging/send-push-notifications
(converted it to react lol)
How are you sending the message?
From the console
and the console also shows my target correctly:
.. i think
Ah okay
Any logs in firebase?
Where do i find these logs?
🤷♂️ lol
I also did a campaign in firebase directly with a random message, that just says completed
doesn't look like firebase has any logging :2HAhaa:
This is my code for the push targets:
export const updatePushTargetWithAppwrite = async (fcmToken: string) => {
const targetId = await AsyncStorage.getItem('targetId')
try {
// Assuming `account` is your Appwrite Account instance
const session = await account.get()
if (!session) return // User is not logged in
if (!targetId) {
// Create a new push target
const target = await account.createPushTarget(ID.unique(), fcmToken)
await AsyncStorage.setItem('targetId', target.$id)
} else {
// Update the existing push target
await account.updatePushTarget(targetId, fcmToken)
}
} catch (error) {
console.error('Failed to update push target in Appwrite:', error)
Sentry.captureException(error)
}
}
But I think that seems to work fine, as it registered my iphone as a target
Recommended threads
- Failed to build function: Incorrect prox...
I have a function which I updated. Previously built and deployed just fine. I made some small edits and pushed to github, and now it's failing on the build wit...
- Appwrite Function typescript types
Hello, I don't suppose anyone has any resources for some types for writing typescript functions? I know there are some available in the SDK, but stuff like the...
- How to protect file url
I generate the url to file in NextJS server action. In client component, i use that url as src image. It works fine when I give Any permission! I want to protec...