swiftswiftsoup

How to handle swift classes having same name?


I am using swiftsoup library , in that there is Document class And I have used this to parse html documents. But in my team one of my friend created Document class for diffrent purpose.Now it is conflicting for my code after taking his pull.Is there any way to use both classes ?. Error is "Cannot convert value of type 'Document' to specified type 'Document'" Thanks in advance


Solution

  • Modules are namespaces. SwiftSoup.Document is not MyApp.Document.

    Even better, use Refactor -> Rename and prevent the conflict in the first place.