Jun 19, 2022 10:55 PM
So I have a custom app I am using, written in swift. I am trying to add records to one of my tables. But after doing some debugging I found I was getting the error: “Access-Control-Allow-Origin” = “*”. I did some research and found out it was a CORS error. And some light research and I am not sure really how to go about fixing this.
Jun 20, 2022 08:18 PM
hi,
using remotefetch instead of fetch helped me
Jun 20, 2022 10:01 PM
What platform are you using to create your custom app?
Are you using the REST API to access Airtable?
Custom apps written using the custom apps/blocks sdk are written in JavaScript/React, and scripts within Airtable are written in JavaScript, so it sounds like you are using a different platform.
Jun 22, 2022 05:38 AM
I am using Xcode to write the app in Swift. I am using the REST API to access Airtable. I never had this issue till just recently.
Jun 22, 2022 07:32 AM
New issues rarely crop up without some sort of change. Has anything changed in your code or platform? Are you running the code in the same environment? What errors are you seeing?
Since you are using the REST API, I am surprised that it would be a CORS issue.
Jun 22, 2022 08:26 AM
I was running the script on a different computer. But then I ran my script on the normal computer I still get that issue. When I run the code from the app it doesn’t work. The only thing that doesn’t work is adding records to the Database. It pulls and updates records. But it won’t add records. I am assuming its a CORS issue. The title is all the response I get back says.