Shahbaz Akram
Shahbaz Akram

Reputation: 1657

No Such module whenever import any class swift ios

I have swift 4 project, recently pull from another branch. But whenever i want to import any class which is already exist in project show me the error "No such module...". Please suggest me what is wrong. enter image description here

Upvotes: 1

Views: 1047

Answers (2)

Incredible_Dev
Incredible_Dev

Reputation: 976

In Swift, if a class already exist in project then you don't need to import it; you can directly use its properties by creating its instance. but if you have problem with it then you need to check target membership for the class. it should be checked for the project like in my example in picsenter image description here

enter image description here

Upvotes: 2

Waqas Sultan
Waqas Sultan

Reputation: 894

You don't need to import files in Swift as they are globally available. In Swift you can only import module, e.g. any framework.

Upvotes: 6

Related Questions