Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚀 Feature: Add WhatsApp with Vonage for Swift #209

Closed
6 tasks
gewenyu99 opened this issue Oct 1, 2023 · 21 comments
Closed
6 tasks

🚀 Feature: Add WhatsApp with Vonage for Swift #209

gewenyu99 opened this issue Oct 1, 2023 · 21 comments
Assignees
Labels
hacktoberfest Issues for Hacktoberfest 2023

Comments

@gewenyu99
Copy link

gewenyu99 commented Oct 1, 2023

Appwrite Functions allow you to extend and customize your Appwrite server functionality by executing your custom code. 🤩 You can learn more at our official Appwrite Functions docs.

Your task is to implement the WhatsApp with Vonage function in Swift. You can look at the existing Appwrite Functions Templates in another coding language.

Your function should behave and be implemented similarly to existing WhatsApp with Vonage Node.js template.

Tasks summary:

  • Fork & clone Appwrite's templates repository
  • Create a branch feat-implement-whatsapp-with-vonage-swift
  • Write code for the function in folder swift/whatsapp-with-vonage/.
  • Test the function using Appwrite, provide a video.
  • Write a README.md explaining what the function does, how to use it, and customize it. Here is an example.
  • Submit a pull request to our templates repository

If you need any help, contact us on our Discord server.

Are you ready to work on this issue? 🤔 Let us know, and we will assign it to you 😊

Happy coding!

@gewenyu99 gewenyu99 added the hacktoberfest Issues for Hacktoberfest 2023 label Oct 1, 2023
@RV784
Copy link

RV784 commented Oct 1, 2023

I'd like to work on this issue, please assign!

@Haimantika
Copy link

I'd like to work on this issue, please assign!

Hi @RV784 have assigned the issue to you! Thank you for showing interest in contributing to Appwrite! Happy Hacktoberfest 🎃

Notes:

  1. Please update us with your progress every 3 days, so that we know that you are working on it.
  2. Join us on Discord - https://appwrite.io/discord to chat about Hacktoberfest and Appwrite!

@RV784
Copy link

RV784 commented Oct 3, 2023

I've started working on this feature today. Will keep this thread updated about the progress and ask here whenever I'll need help. @Haimantika

@sdroyc
Copy link

sdroyc commented Oct 3, 2023

Hey I would also love to work on this

@Haimantika
Copy link

Hey I would also love to work on this

Hi, we are assigning issues on a first-come, first-serve basis, if the other user decides to drop off, we will assign it to you.

@RV784
Copy link

RV784 commented Oct 4, 2023

Hi, as I was going through understanding templates and Appwrite functions, I noticed a couple of things in the starter function that is already Implemented

  • I was getting the following build error at my end
Screenshot 2023-10-04 at 8 18 04 PM
  • This went away after changing the location of index.swift like mentioned in the below screenShot.
Screenshot 2023-10-04 at 8 15 30 PM

Do let me know if I'm not building it correctly in this case. I'm on Xcode-15.
@Haimantika @gewenyu99

@gewenyu99
Copy link
Author

Hi, as I was going through understanding templates and Appwrite functions, I noticed a couple of things in the starter function that is already Implemented

  • I was getting the following build error at my end
Screenshot 2023-10-04 at 8 18 04 PM * This went away after changing the location of index.swift like mentioned in the below screenShot. Screenshot 2023-10-04 at 8 15 30 PM Do let me know if I'm not building it correctly in this case. I'm on Xcode-15. @Haimantika @gewenyu99

I don't think you can build Appwrite functions locally :) They're a file depended upon by the Appwrite Functions runtimes

@RV784
Copy link

RV784 commented Oct 7, 2023

Hey, just wanted to ask that between these two approaches of saving the variables (vonage secret keys, whatsApp number etc).
Should I go with .env file or .plist file for storing them?

First I'll go with .env file but wanted to clear this doubt.

@RV784
Copy link

RV784 commented Oct 8, 2023

Hi, I’m done with the Implementation of this function

Here is the progress of what I’ve done

  • Created a Swift Package named ”whatsApp-with-vonage”
  • Completed the implementation of all the things that I understood in the Node’s implementation of the function
  • Used Swift-JWT package.
  • The code is pushed in my forked repository

Things remaining

  • Testing at my end

Also it would be very helpful if you could checkout the code I pushed and tell me things that can be improved.

@Haimantika @gewenyu99

@RV784
Copy link

RV784 commented Oct 10, 2023

Hi, I saw that Swift-runtime is not available in cloud.
Can you please guide me how to test it? Testing is somewhere that I got stuck.

If it goes well then I may've completed this feature implementation.

@gewenyu99
Copy link
Author

gewenyu99 commented Oct 10, 2023

Hi, I saw that Swift-runtime is not available in cloud. Can you please guide me how to test it? Testing is somewhere that I got stuck.

If it goes well then I may've completed this feature implementation.

You can self-host and add deploy manually to test:
https://appwrite.io/docs/advanced/self-hosting
https://appwrite.io/docs/products/functions/deployment#manual

@RV784
Copy link

RV784 commented Oct 14, 2023

Hi, I've successfully self-hosted Appwrite locally. Will update how the functions goes after I deploy it.

@RV784
Copy link

RV784 commented Oct 18, 2023

I’m having a little trouble with Add deploy procedure.

  • So first I’ve to package the whole swift WhatsApp with voyage function in a tar GZ file
  • Then I’ve to go to my Appwrite console that is locally hosted and upload this archived file
    I’m not sure where I’ve to upload my archived function file in the console.
  • Also can I use CLI or is it only for cloud functions?

Edit -> Found this article (https://dev.to/appwrite/clean-your-storage-using-appwrites-swift-cloud-functions-1h4f). First will go through this then get back here if still stuck

@Haimantika
Copy link

I’m having a little trouble with Add deploy procedure.

  • So first I’ve to package the whole swift WhatsApp with voyage function in a tar GZ file
  • Then I’ve to go to my Appwrite console that is locally hosted and upload this archived file
    I’m not sure where I’ve to upload my archived function file in the console.
  • Also can I use CLI or is it only for cloud functions?

Edit -> Found this article (https://dev.to/appwrite/clean-your-storage-using-appwrites-swift-cloud-functions-1h4f). First will go through this then get back here if still stuck

Thanks for the update. Even after the documentation if you have any questions, you can ask us on Discord

@gewenyu99
Copy link
Author

Hey, just wanted to ask that between these two approaches of saving the variables (vonage secret keys, whatsApp number etc). Should I go with .env file or .plist file for storing them?

First I'll go with .env file but wanted to clear this doubt.

So they are passed in as environment variables through the function :)

@gewenyu99
Copy link
Author

I’m having a little trouble with Add deploy procedure.

  • So first I’ve to package the whole swift WhatsApp with voyage function in a tar GZ file
  • Then I’ve to go to my Appwrite console that is locally hosted and upload this archived file
    I’m not sure where I’ve to upload my archived function file in the console.
  • Also can I use CLI or is it only for cloud functions?

Edit -> Found this article (https://dev.to/appwrite/clean-your-storage-using-appwrites-swift-cloud-functions-1h4f). First will go through this then get back here if still stuck

You should be using the CLI, but it would be even better if you setup GitHub integration instead :P

@RV784
Copy link

RV784 commented Oct 21, 2023

Hi, so I manually deployed my function on self hosted Appwrite but I faced errors like shown in screenshot attached

Now most of them are syntactical but I want to ask
Screenshot 2023-10-21 at 11 11 10 PM
that since Xcode cannot infer the RuntimeContext/RuntimeOutput types that are mentioned in this function-Development guide -> https://appwrite.io/docs/products/functions/development#response

So can you tell in which environment should I like code the function in? Or like how do I set up this environment?

I also faced some JWT Authorisation errors but first I want to solve the above facing issues.

@RV784
Copy link

RV784 commented Oct 23, 2023

Hi, I'm facing this error while Building a function with runtime Swift-5.8. This is according to this documentation regarding development for Swift Runtime -> https://appwrite.io/docs/products/functions/development#request
Screenshot 2023-10-23 at 12 20 31 PM

@RV784
Copy link

RV784 commented Oct 23, 2023

So I was able to deploy the function. and I got this error no matter what I execute regardless of request method -> "An internal curl error has occurred within the executor! Error Msg: Connection reset by peer\nError Code: 500"
Currently debugging this but if you know then do help here.

@RV784
Copy link

RV784 commented Oct 29, 2023

Currently I'm trying my router's ip instead of localhost to see if it works or not.

@tessamero
Copy link

Closing issue due to inactivity and hacktoberfest being over, thank you for taking the time to be part of hacktoberfest this year :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest Issues for Hacktoberfest 2023
Projects
None yet
Development

No branches or pull requests

5 participants