Back

Error trying to call .createPush() - does not show in Xcode autofill as an option either.

  • 0
  • Messaging
  • Apple
  • Cloud
killerkowalski7100
10 May, 2024, 14:32

I have been following the docs: (https://appwrite.io/docs/products/messaging/send-push-notifications) and (https://appwrite.io/docs/references/1.5.x/server-swift/messaging), getting started trying to implement a simple push notification system for my iOS App but am running into an error when I try to call '.createPush()'. I am using Appwrite package version 5.0.0 and Cloud hosting. When I look at the Xcode autofill recommendations it only shows '.createSubscriber()' and '.deleteSubscriber()'. I was able to successfully create a push target and I am probably just missing something really dumb here, can you please point me in the right direction? let messaging = Messaging(client)

TypeScript
        messageId: "",
        title: "",
        body: "",
        targets: notificationData.target,
        badge: ""
    )```
Xcode error:
```Value of type 'Messaging' has no member 'createPush'```
TL;DR
Developers are unable to call '.createPush()' and it is not showing in Xcode autofill. The error states "Value of type 'Messaging' has no member 'createPush'". This might be due to using Appwrite package version 5.0.0. The solution would be to ensure the package version is correct or check for any updates that might include the 'createPush()' method.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more