admin管理员组

文章数量:1122832

Question:
I am using Capacitor with Next.js to convert my web app into a mobile app. The integration works fine when I configure capacitor.config.ts as follows:

server: {
  url: 'http://MY_IP:PORT',
  cleartext: true,
}

This setup points to my local development server, and everything works as expected.

However, when I update the url to the deployed version of my web app, e.g.:

server: {
  url: '',
  cleartext: false,
}

...the build fails in Xcode with the error:

"Failed to resolve host network app id to config"

The mobile app also renders a 500 status code after the failure.

Has anyone encountered this issue or knows how to properly configure Capacitor for production deployment? Any suggestions on resolving this would be greatly appreciated!

P/s: Perhaps from missing config in Info.plist?

Thank you!

Question:
I am using Capacitor with Next.js to convert my web app into a mobile app. The integration works fine when I configure capacitor.config.ts as follows:

server: {
  url: 'http://MY_IP:PORT',
  cleartext: true,
}

This setup points to my local development server, and everything works as expected.

However, when I update the url to the deployed version of my web app, e.g.:

server: {
  url: 'https://mydeployedapp.com',
  cleartext: false,
}

...the build fails in Xcode with the error:

"Failed to resolve host network app id to config"

The mobile app also renders a 500 status code after the failure.

Has anyone encountered this issue or knows how to properly configure Capacitor for production deployment? Any suggestions on resolving this would be greatly appreciated!

P/s: Perhaps from missing config in Info.plist?

Thank you!

Share Improve this question edited Nov 22, 2024 at 14:41 Rob 15.1k30 gold badges48 silver badges72 bronze badges asked Nov 22, 2024 at 14:31 TaiTrienTaiTrien 1251 silver badge7 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

After 2 days, I found that the problem came from firebase config because of mismatch bundle id. It's quite annoying due to not logging correctly

本文标签: