Open alanjohnson opened 3 years ago
Hostname
is defined in Hostname.m, included in Hostname.h and wrapped up in ZeroConf-Bridging-Header.h.
ZeroConf-Bridging-Header.h is included in the project on https://github.com/becvert/cordova-plugin-zeroconf/blob/master/plugin.xml#L40.
If Hostname
is undefined, I'd first ask if ZeroConf-Bridging-Header.h is being parsed properly. This has worked for a while, so what could have changed? Is this an XCode issue, or does iOS 15 change something, or is Capacitor no longer compatible?
@alanjohnson if you could provide some extra info:
I'm running:
Cordova 10.0.0 iOS 14.7.1 xCode Version 12.5.1 (12E507)
Hm. Does ZeroConf-Bridging-Header.h show up in the project build settings?
Something like this: https://stackoverflow.com/a/37269127
No, I did not see it in there. If I manually update the Objective-C Bridging Header to point to that file, it starts to build again. Or if I make a new one (as per your provided link), and add the imports, it works as well.
Looks like after running cordova platforms add ios
,it has "Objective-C Bridging Header" set to a generic file ($(PROJECT_DIR)/$(PROJECT_NAME)/Bridging-Header.h
which doesn't appear to exist. 🤷♂️
If I recall, Cordova is supposed to add the bridging header during cordova plugin add x
, after running cordova platforms add ios
. Strange that it didn't automatically happen, that could be an issue with Cordova or XCode.
I might recommend ensuring the header is present in the build settings manually, making a note in your project setup instructions, or even adding a Cordova hook to add it during after_plugin_add
or before_build
.
i have same error. xcode 13.1
The plugin works perfect on android, but it seems to have broken my IOS build.
I'm seeing this error:
I did the steps listed for iOS, but can't find any information on how to resolve this error