C S 314 Chapter Notes - Chapter 24: Integrated Development Environment, Xcode, Apple Developer

57 views2 pages
Swift - An Apple Compatible Language
Background Information:
Swift is a coding language, developed by Apple, that was debuted in 2014. This language was kept
private until December 2015, when it became open source. Apple developed this new language, which
acts as a compiler, in response to Objective-C, which was seen as being unsafe. The program was released
as a safer, more resilient option. Furthermore, Swift was designed to run on only Mac and Linux. It’s the
coding language behind iOS, macOS, tvOS, and watchOS. As the demand for these softwares increases,
so does the demand for iOS developers, and a proficiency in Swift.
Development Environment:
The standard programming environment for Swift is known as XCode. It is also an integrated
development environment (IDE) for Swift. To make XCode more accessible to users, and more fun to
learn, Apple has created XCode Playgrounds. These playgrounds are essentially video games, which
require the user to code in order to play.
While Swift was created as an alternative to languages such as Objective-C, it can be used in conjunction
with Objective-C. The goal of this is for Swift to be cleaner and have fewer errors. Swift is able to take
code, such as parameters, from other languages and automatically convert it so that it can be easily used
in Swift.
The syntax of Swift is expressive and flexible. It accepts all sorts of characters, ranging from letters to
emojis. It does not require semicolons, as they are added automatically by Swift supports.
Swift Syntax:
To print: print (“Hello World”)
To declare global constant: let Constant_Name = value
To declare variable: var Variable_Name = value
To comment: // this is a comment OR
/* this is a multiline
comment */
For in loops: for index in 1...5 {
print("\(index) times 5 is \(index * 5)")
}
While loops: while condition {
Statements
}
Unlock document

This preview shows half of the first page of the document.
Unlock all 2 pages and 3 million more documents.

Already have an account? Log in

Document Summary

Swift is a coding language, developed by apple, that was debuted in 2014. This language was kept private until december 2015, when it became open source. Apple developed this new language, which acts as a compiler, in response to objective-c, which was seen as being unsafe. The program was released as a safer, more resilient option. Furthermore, swift was designed to run on only mac and linux. It"s the coding language behind ios, macos, tvos, and watchos. As the demand for these softwares increases, so does the demand for ios developers, and a proficiency in swift. The standard programming environment for swift is known as xcode. It is also an integrated development environment (ide) for swift. To make xcode more accessible to users, and more fun to learn, apple has created xcode playgrounds. These playgrounds are essentially video games, which require the user to code in order to play.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents