Hello,
I have a mobile app that works on Android. I want to make it work on iOS too.
I already have experience with Android development, but not with iOS.
On my Mac I installed:
Node.js, VS Code, Xcode, Ionic.
I successfully started my project in VS Code using npm start.
Then I added the iOS platform using: ionic capacitor add ios
After that I ran these commands in order:
ionic build, ionic capacitor sync ios, ionic capacitor open ios.
This opened Xcode.
In Xcode, under Signing & Capabilities, I selected my team.
On my iPhone, I enabled Developer Mode and restarted the phone.
Then I connected my iPhone to my Mac via USB, selected it in Xcode, and clicked Run. After a few minutes, the build succeeded and the app appeared on my iPhone.
My problem is that none of the APIs work on the iPhone.
For example, the login API does not work, and I cannot log in.
In the console I see this error: ERR_CONNECTION_REFUSED.
In the Network tab I can see that the correct API endpoint is being called and the correct data is being sent.
What is the problem? How can I make my app work on iOS, so I can test it?