Unknown error when running Capacitor App on iOS emulator

Hi everyone. I’m finishing my first Capacitor Ionic App which is a simple news app. This app just makes a call to an API and shows the results. Everything works fine on browser and Android emulator, but the problem is that when I try to run it on an iOS emulator I get this error:

[error] - ERROR {“headers”:{“normalizedNames”:{},“lazyUpdate”:null,“headers”:{}},“status”:0,“statusText”:“Unknown Error”,“url”:"{{ my URL }}",“ok”:false,“name”:“HttpErrorResponse”,“message”:“Http failure response for https://www.elpespunte.es/wp-json/wp/v2/posts?page=1: 0 Unknown Error”,“error”:{“isTrusted”:true}}

I have seen that so many people have this error, but none of their solutions worked for me. Here you have some of the apps specifications:

Ionic CLI : 6.18.1 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 5.9.1
@angular-devkit/build-angular : 12.1.4
@angular-devkit/schematics : 12.2.13
@angular/cli : 12.1.4
@ionic/angular-toolkit : 4.0.0


Capacitor CLI : 3.3.2
@capacitor/android : 3.3.3
@capacitor/core : 3.3.2
@capacitor/ios : 3.3.3


cordova-res : not installed globally
native-run : 1.5.0


NodeJS : v16.13.1 (/usr/local/bin/node)
npm : 8.1.2
OS : macOS Monterey

Hope some of you could help me :smiley: