-
Notifications
You must be signed in to change notification settings - Fork 987
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IOS report "Failed to resolve host network app id" error, Android is working properly #1440
Comments
This doesn't really sound like an error that cordova throws really. Is this error being shown in XCode console or the web console? Also can you share your |
this error is shown in XCode console. <?xml version='1.0' encoding='utf-8'?>
<widget id="com.helloworld.app" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>HelloWorld</name>
<description>Sample Apache Cordova App</description>
<author email="dev@cordova.apache.org" href="https://cordova.apache.org">
Apache Cordova Team
</author>
<content src="index.html" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
</widget> |
I'm not really sure, but I definitely don't reproduce this though I don't use the VueJS framework as well. So I think this is more of a VueJS integration issue. It is possible that it assumes are more traditional web environment where you have a server, with a domain, etc... These things doesn't necessary exist in a webview environment. Couple of things you can try: Enabling url schemesiOS webview has a concept of schemes, by default has this disabled. This means that you're web app is loaded over the If you add a <?xml version='1.0' encoding='utf-8'?>
<widget id="com.helloworld.app" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>HelloWorld</name>
<description>Sample Apache Cordova App</description>
<author email="dev@cordova.apache.org" href="https://cordova.apache.org"> Apache Cordova Team </author>
<content src="index.html" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<platform name="ios">
<preference name="scheme" value="app" />
<preference name="hostname" value="localhost" />
</platform>
</widget> Couple of things to note:
Possibility of finding more insightsIf the above fails... then we probably need to get more insights. I think on iOS, xcode will still log JS console messages, but if it is a message from JS, the web inspector may have more insightful information. If you don't know how to use the Safari remote inspector, I have a blog post that describes how, just scroll down to the iOS section. The key thing though is safari web inspector doesn't capture events that occurred before the inspector was attached, so in order to see log messages, network errors, or any debug information that occurred on launch, you'll need to refresh the webview with the inspector attached. This can be done by pressing |
added this, it works very well!! thank you very much for your help :) |
The roblem is still existing. Is there a fix for this? The solution from @mewebranding is not working for me. Also not to add the cordova plugin-file |
Same here, not working for capacitor. |
<platform name="ios">
<preference name="scheme" value="app" />
<preference name="hostname" value="localhost" />
</platform>
Try this
… 2024年9月9日 03:54,jonyking ***@***.***> 写道:
The roblem is still existing. Is there a fix for this? The solution from @mewebranding <https://github.com/mewebranding> is not working for me. Also not to add the cordova plugin-file
—
Reply to this email directly, view it on GitHub <#1440 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AEVIHDH5GJWBOGGZZYZSO3DZVSTQTAVCNFSM6AAAAABJFMCV2GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZWHAYDINZTGQ>.
You are receiving this because you were mentioned.
|
Bug Report
Problem
The Android platform app is working normally, and then we added the iOS platform. When running in the emulator, a white screen appears and the console reports "Failed to resolve host network app ID"
What is expected to happen?
IOS should work normally like Android
What does actually happen?
When running in the iOS emulator, a white screen is displayed and the console reports "Failed to resolve host network app id" (btw, Safari in the XCode emulator can access API hosts)
Information
Could it be due to compatibility between our XCode and Mac OS versions or some settings errors?
Command or Code
cordova platform add ios@7.1.0 && cordova build ios
Environment, Platform, Device
build on macOS
Xcode simulator
Version information
Framework
vue3.4.27
Cordova:
Cordova CLI : 12.0.0 (cordova-lib@12.0.1)
Cordova Platforms : ios 7.1.0
Cordova Plugins : None
System
MacOS sonoma14.5
Xcode15.4
NodeJS : v21.7.1
Checklist
The text was updated successfully, but these errors were encountered: