I just downloaded the GM release of Xcode 6 and it won\'t compile with this error:
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault
If you are using some API which should be used in early iOS version, you may get build failure. For example: If you are using UI_USER_INTERFACE_IDIOM() instead of UIDevice.currentDevice().userInterfaceIdiom to identify the device type, you will get this build error with no hint.
change
func tableView(tableView: UITableView!, cellForRowAtIndexPath indexPath: NSIndexPath!) -> UITableViewCell!
TO
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell
and do the same to others like this
By following @maxvel's suggestion, I got to know that max() and min() functions failed to compile in the release mode. I replaced it with my own functions like below.
//Swift compiler seems to failing to compile default min and max functions in release
//mode hence writing my own
//
func maximum<T: Comparable> (one: T, other: T) -> T {
if one > other {
return one
}
else {
return other
}
}
func minimum<T: Comparable> (one: T, other: T) -> T {
if one < other {
return one
}
else {
return other
}
}