Getting Stores/Product in an external iOS App

Hello everybody,
Having already a website created on Wix, my project is to develop a native iOS application in Swift.
I want to retrieve the database on my app and in particular the elements of Stores / Products to display them on it.
I have read several forums, documentations, etc., but I can’t find concrete answers. I saw that there was the Wix Http-Functions solution by creating the .js file but how to use it in Swift.
Is there a Wix API for Swift?
Or more simply, is it not possible to get the data in CSV via a link and a method to read this via this link?

Can you help me ? I thank you in advance.

You will need to expose an API in your site. See the article Velo: Exposing a Site API with HTTP Functions for details on how to do that. For an example:

Expose and Access Site APIs Use MyApi and MyApiClient to expose and access external APIs.

In your iPhone app, you can call the site’s API as you would any other API from an app.

Thank you so much Yisrael!
So I wrote the get function in a file “http-functions.js” created in the code site backend, to get the store products.

But when I test the URL https://{user_name}.wixsite. com/{site_name}/_functions/ with my get function for on https://reqbin. com, I get an error 404, the URL is not supported…
It seems to me that I must retrieve a Json content with the elements of my store products no?

@breuerdylan79 Since you have _functions in the URL, I understand that you are using the production endpoints? Did you publish your site?

Did you try the MyApi and MyApiClient example? It should work and you should be able to get started with this example, and then make the changes that you need for your own purposes.

@Yisrael (Wix) Yes the site is published. When I write https://{user_name}.wixsite. com/{site_name} I have access to the site.

I looked at your example. For myAPI I published the site and when I use https: // {user_name} .wixsite. com / {site_name} / _ functions / get_recipes, I have an error 404 which is displayed

When I test this URL https: // {username} .wixsite. com / {site_name} only, the site is found, but when I add / _functions or / _functions / {function_name} nothing. 404 error.

@breuerdylan79 You will find what you need in Velo: Exposing a Site API with HTTP Functions . Also, refer to the wix-http-functions API for more information.