swiftimportmessageui

Why my import MessageUI in AppDelegate is not visible within my UITableViewController?


Since Swift files are visible for each others, why my import within Appelegate is not visible for one of my controllers? I get an error there.


Solution

  • This is called Access level for Swift Modules. Default access level for Swift modules is internal, that is to that file itself.

    Have a look here in Apple documentation Access level in Swift module

    You need to import frameworks/modules in which ever class you are using.