Foundation
Foundation is basically the Apple development standard library, implemented in OBJECTIVE-C. It includes data types like Nsarray, NSString, and Nsdictionary. However, Swift provides replacements for these data Types:array, String, and Dictionary. You should the only need to in files, and import Foundation
interact with Objective-c APIs. However, since all existing APIs be written in objective-c (since Swift was so new) and you'll have the to import Foundation in Almost all files except for basic domain objects.
UIKit
UIKit actually includes Foundation. If you import the UIKit, you don't need to also import Foundation. UIKit is a collection for standard APIs specific to the IOS interface. It includes views like UITableView and controllers like Uiviewcontroller. You'll need to important this whenever working on the UI of IOS apps.
Cocoa Touch
This template was useful for subclassing classes from UIKit and potentially have Xcode generate interface Builder files F Or you. If you don ' t need either of those things, you should just use the Swift Class template. Only has your object inherit from NSObject if you really has to (if you need to is able to use your Swift class from OBJ ECTIVE-C). If you don ' t inherit from NSObject, there is extra optimizations that the compiler can make and it avoids some of the SLO Wer parts of the OBJECTIVE-C runtime.
Foundation & UIKit & Cocoa Touch