Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Swift Import Statements No Longer Necessary [duplicate]

Tags:

xcode

swift

With the latest update to Swift, I'm able to use classes, functions, etc. from Foundation and UIKit without having to include the import statements for them. If I add the import statement in Xcode, it shows it crossed out, as if it's depreciated.

Is it no longer necessary to include import statements for some modules like Foundation and UIKit in Swift?

like image 292
kmell96 Avatar asked Apr 03 '16 22:04

kmell96


1 Answers

This appears to be a bug in Xcode 7.3.0. As you said, if you continue to import it, there shouldn't be Amy problems. My guess is that we will see an update in the coming days or weeks to fix some of the bugs. Apple is getting ready to release Xcode 8 with Swift 3 in June and are getting the program ready for the switchover.

like image 91
Dan Levy Avatar answered Oct 20 '22 16:10

Dan Levy