"'XMLElement' is ambiguous for type lookup in this context" when compiling for Mac Catalyst
GerdC opened this issue · 3 comments
Describe the bug
Compiler complains about "'XMLElement' is ambiguous for type lookup in this context" when compiling for Mac Catalyst
To Reproduce
Steps to reproduce the behavior:
- In an iOS project target, enable Mac Catalyst
- Compile code that uses XMLElement
Expected behavior
compiles without error message
Environment:
- Xcode version: 13.2.1
- OS running SWXMLHash: MacOS 12.2.1 running Xcode
Additional context
appears to be a known problem when directly compiling for MacOs. XMLElement Sourcecode says
// Workaround for "'XMLElement' is ambiguous for type lookup in this context" error on macOS.
Confirmed - I put together a quick repro of it up at https://github.com/drmohundro/swxmlhash-test-xmlelement-catalyst-repro.
That being said, it is possible to get around it by scoping the XMLElement
with SWXMLHash.XMLElement
. See drmohundro/swxmlhash-test-xmlelement-catalyst-repro@07bad9d - that compiles for me.
Does that solve your issue?
Yes, replacing XMLElement
with SWXMLHash.XMLElement
works for me