I\'m new in Xcode and in Swift language. I\'m trying to understand the usage of the \"import\" in ViewController and the \"framework import\" in my project. Example: if I u
The import
in the source code facilitates compilation of your code, ensuring that the correct headers are found. The "Link Binary with Libraries" section of the "Build Phases" in "Project Settings" (now also included on the "Summary" tab under "Linked Libraries and Frameworks") specifies with which frameworks and libraries your object code will be linked.
Historically we always needed to specify these two separately, but now there is a project setting "Link Frameworks Automatically", which if on, will automatically link the framework to your project if you import
it in your source code. You also must have "Enable Modules" turned on, too.