chiara chiappini - swift and the future of ios app development
TRANSCRIPT
![Page 1: Chiara Chiappini - Swift and the future of iOS app development](https://reader031.vdocument.in/reader031/viewer/2022030117/589f19551a28ab7b208b4e35/html5/thumbnails/1.jpg)
Swift and the future of iOS
Chiara Chiappini @chiarachiappini
google.com/+chiarachiappini
![Page 2: Chiara Chiappini - Swift and the future of iOS app development](https://reader031.vdocument.in/reader031/viewer/2022030117/589f19551a28ab7b208b4e35/html5/thumbnails/2.jpg)
Swift
@chiarachiappini
Jun 2014
June 2015
Some point this
year?
Swift announced at WWDC 2014
Swift 2 announced at WWDC 2015
Swift will be open source
![Page 3: Chiara Chiappini - Swift and the future of iOS app development](https://reader031.vdocument.in/reader031/viewer/2022030117/589f19551a28ab7b208b4e35/html5/thumbnails/3.jpg)
Useful reading
Swift language guideraywenderlich.com
NSHipster.com
@chiarachiappini
![Page 4: Chiara Chiappini - Swift and the future of iOS app development](https://reader031.vdocument.in/reader031/viewer/2022030117/589f19551a28ab7b208b4e35/html5/thumbnails/4.jpg)
4 key features of Swift
Modern
@chiarachiappini
![Page 5: Chiara Chiappini - Swift and the future of iOS app development](https://reader031.vdocument.in/reader031/viewer/2022030117/589f19551a28ab7b208b4e35/html5/thumbnails/5.jpg)
4 key features of Swift
ModernEasy
@chiarachiappini
![Page 6: Chiara Chiappini - Swift and the future of iOS app development](https://reader031.vdocument.in/reader031/viewer/2022030117/589f19551a28ab7b208b4e35/html5/thumbnails/6.jpg)
4 key features of Swift
ModernEasySafe
@chiarachiappini
![Page 7: Chiara Chiappini - Swift and the future of iOS app development](https://reader031.vdocument.in/reader031/viewer/2022030117/589f19551a28ab7b208b4e35/html5/thumbnails/7.jpg)
4 key features of Swift
ModernEasySafeSmall
@chiarachiappini
![Page 8: Chiara Chiappini - Swift and the future of iOS app development](https://reader031.vdocument.in/reader031/viewer/2022030117/589f19551a28ab7b208b4e35/html5/thumbnails/8.jpg)
Who is using Swift?
SlideShareAmerican Airlines
Duolingodo you know more?
@chiarachiappini
![Page 9: Chiara Chiappini - Swift and the future of iOS app development](https://reader031.vdocument.in/reader031/viewer/2022030117/589f19551a28ab7b208b4e35/html5/thumbnails/9.jpg)
Swift Playground
@chiarachiappini
![Page 10: Chiara Chiappini - Swift and the future of iOS app development](https://reader031.vdocument.in/reader031/viewer/2022030117/589f19551a28ab7b208b4e35/html5/thumbnails/10.jpg)
Swift and Objective-C Swift let name ="Chiara"
print("Hello \(name)")
Objective-C NSString*str =@"Hello Chiara";
NSLog(@"%@", str)
@chiarachiappini
![Page 11: Chiara Chiappini - Swift and the future of iOS app development](https://reader031.vdocument.in/reader031/viewer/2022030117/589f19551a28ab7b208b4e35/html5/thumbnails/11.jpg)
Xcode vs Appcode
@chiarachiappini
![Page 12: Chiara Chiappini - Swift and the future of iOS app development](https://reader031.vdocument.in/reader031/viewer/2022030117/589f19551a28ab7b208b4e35/html5/thumbnails/12.jpg)
Dependency managementCocoapods vs Maven vs Gradle
@chiarachiappini
![Page 13: Chiara Chiappini - Swift and the future of iOS app development](https://reader031.vdocument.in/reader031/viewer/2022030117/589f19551a28ab7b208b4e35/html5/thumbnails/13.jpg)
sudo gem install cocoapodspod init
edit PodFile (similar to editing pom.xml)pod install
@chiarachiappini
![Page 14: Chiara Chiappini - Swift and the future of iOS app development](https://reader031.vdocument.in/reader031/viewer/2022030117/589f19551a28ab7b208b4e35/html5/thumbnails/14.jpg)
platform :ios, '8.0'use_frameworks!
target 'SwiftTalk' do pod 'Alamofire', '~> 3.1'end
target 'SwiftTalkTests' do pod 'Quick', '~> 0.6.0' pod 'Nimble', '2.0.0-rc.3'end
![Page 15: Chiara Chiappini - Swift and the future of iOS app development](https://reader031.vdocument.in/reader031/viewer/2022030117/589f19551a28ab7b208b4e35/html5/thumbnails/15.jpg)
Protocol vs Interface
@chiarachiappini
![Page 16: Chiara Chiappini - Swift and the future of iOS app development](https://reader031.vdocument.in/reader031/viewer/2022030117/589f19551a28ab7b208b4e35/html5/thumbnails/16.jpg)
protocol Sweet { var sugarQuantity: Int { get }}
class BlackChocolate: Sweet { var sugarQuantity: Int = 10}
@chiarachiappini
![Page 17: Chiara Chiappini - Swift and the future of iOS app development](https://reader031.vdocument.in/reader031/viewer/2022030117/589f19551a28ab7b208b4e35/html5/thumbnails/17.jpg)
Unit Tests
@chiarachiappini
![Page 18: Chiara Chiappini - Swift and the future of iOS app development](https://reader031.vdocument.in/reader031/viewer/2022030117/589f19551a28ab7b208b4e35/html5/thumbnails/18.jpg)
XCTest vs JUnit
testing framework integrated with XCode
@chiarachiappini
![Page 19: Chiara Chiappini - Swift and the future of iOS app development](https://reader031.vdocument.in/reader031/viewer/2022030117/589f19551a28ab7b208b4e35/html5/thumbnails/19.jpg)
XCTest exampleclass MyTestsXCTests: XCTestCase{ let myNumbers = [1,2,3] func testNumbersWithXCTest() { XCTAssertEqual(1 + 1, 2, "expected one plus one to equal two") for number in myNumbers{ XCTAssertLessThan(number, 4) } }}
@chiarachiappini
![Page 20: Chiara Chiappini - Swift and the future of iOS app development](https://reader031.vdocument.in/reader031/viewer/2022030117/589f19551a28ab7b208b4e35/html5/thumbnails/20.jpg)
Use @testableimport XCTest@testable import CodemotionExamples
class CodemotionExamplesTests: XCTestCase { func testBlackChocolateHasSugar() { let blackChocolate = BlackChocolate() XCTAssertEqual(blackChocolate.sugarQuantity, 10, "Expected sugar quantity is 10") } }
@chiarachiappini
![Page 21: Chiara Chiappini - Swift and the future of iOS app development](https://reader031.vdocument.in/reader031/viewer/2022030117/589f19551a28ab7b208b4e35/html5/thumbnails/21.jpg)
Quick and Nimble
Quick:behaviour driven testing frameworkNimble: fluent assertions
https://github.com/Quick/Nimble
@chiarachiappini
![Page 22: Chiara Chiappini - Swift and the future of iOS app development](https://reader031.vdocument.in/reader031/viewer/2022030117/589f19551a28ab7b208b4e35/html5/thumbnails/22.jpg)
Nimble
func testNumbersWithNimble() { expect(1+1).to(equal(2)) expect([1,2,3]).to(allPass(beLessThan(4))) }
@chiarachiappini
![Page 23: Chiara Chiappini - Swift and the future of iOS app development](https://reader031.vdocument.in/reader031/viewer/2022030117/589f19551a28ab7b208b4e35/html5/thumbnails/23.jpg)
func testStringWithNimble() { let myString = "Hello!" expect(myString).to(equal("Hello!"))
expect(myString)==("Hello!") expect(myString).to(beginWith("Hel")) }
@chiarachiappini
![Page 24: Chiara Chiappini - Swift and the future of iOS app development](https://reader031.vdocument.in/reader031/viewer/2022030117/589f19551a28ab7b208b4e35/html5/thumbnails/24.jpg)
Quickclass MyTestsQuick: QuickSpec { override func spec() { describe("Testing numbers") { context("when adding 1 and 2"){ it("results as 3") { expect(1+2).to(equal(3)) } } }
@chiarachiappini
![Page 25: Chiara Chiappini - Swift and the future of iOS app development](https://reader031.vdocument.in/reader031/viewer/2022030117/589f19551a28ab7b208b4e35/html5/thumbnails/25.jpg)
Testing and CI
@chiarachiappini
![Page 26: Chiara Chiappini - Swift and the future of iOS app development](https://reader031.vdocument.in/reader031/viewer/2022030117/589f19551a28ab7b208b4e35/html5/thumbnails/26.jpg)
Continuous Integration
early feedback
@chiarachiappini
![Page 27: Chiara Chiappini - Swift and the future of iOS app development](https://reader031.vdocument.in/reader031/viewer/2022030117/589f19551a28ab7b208b4e35/html5/thumbnails/27.jpg)
Continuous Integration
early feedbackteam peace of mind and alerting
@chiarachiappini
![Page 28: Chiara Chiappini - Swift and the future of iOS app development](https://reader031.vdocument.in/reader031/viewer/2022030117/589f19551a28ab7b208b4e35/html5/thumbnails/28.jpg)
Continuous Integration
early feedbackteam peace of mind and alerting
standardized build
@chiarachiappini
![Page 29: Chiara Chiappini - Swift and the future of iOS app development](https://reader031.vdocument.in/reader031/viewer/2022030117/589f19551a28ab7b208b4e35/html5/thumbnails/29.jpg)
Continuous Integration
early feedbackteam peace of mind and alerting
standardized buildrecord of results
@chiarachiappini
![Page 30: Chiara Chiappini - Swift and the future of iOS app development](https://reader031.vdocument.in/reader031/viewer/2022030117/589f19551a28ab7b208b4e35/html5/thumbnails/30.jpg)
Continuous Integration
early feedbackteam peace of mind and alerting
standardized buildrecord of results
support release process
@chiarachiappini
![Page 31: Chiara Chiappini - Swift and the future of iOS app development](https://reader031.vdocument.in/reader031/viewer/2022030117/589f19551a28ab7b208b4e35/html5/thumbnails/31.jpg)
Continuous Integration
early feedbackteam peace of mind and alerting
standardized buildrecord of results
support release processfirst step to continuous deployment
@chiarachiappini
![Page 32: Chiara Chiappini - Swift and the future of iOS app development](https://reader031.vdocument.in/reader031/viewer/2022030117/589f19551a28ab7b208b4e35/html5/thumbnails/32.jpg)
CI for mobile
maturityemulators and real devices
@chiarachiappini
![Page 33: Chiara Chiappini - Swift and the future of iOS app development](https://reader031.vdocument.in/reader031/viewer/2022030117/589f19551a28ab7b208b4e35/html5/thumbnails/33.jpg)
CI for iOS
Xcode server
@chiarachiappini
![Page 34: Chiara Chiappini - Swift and the future of iOS app development](https://reader031.vdocument.in/reader031/viewer/2022030117/589f19551a28ab7b208b4e35/html5/thumbnails/34.jpg)
CI for iOS
Xcode serverJenkins
@chiarachiappini
![Page 35: Chiara Chiappini - Swift and the future of iOS app development](https://reader031.vdocument.in/reader031/viewer/2022030117/589f19551a28ab7b208b4e35/html5/thumbnails/35.jpg)
CI for iOS
Xcode serverJenkins
...
@chiarachiappini
![Page 36: Chiara Chiappini - Swift and the future of iOS app development](https://reader031.vdocument.in/reader031/viewer/2022030117/589f19551a28ab7b208b4e35/html5/thumbnails/36.jpg)
Xcode service and bots
Xcode service integrated in Xcode
@chiarachiappini
![Page 37: Chiara Chiappini - Swift and the future of iOS app development](https://reader031.vdocument.in/reader031/viewer/2022030117/589f19551a28ab7b208b4e35/html5/thumbnails/37.jpg)
Xcode service and bots
Xcode service integrated in Xcodemanage bots from Xcode
@chiarachiappini
![Page 38: Chiara Chiappini - Swift and the future of iOS app development](https://reader031.vdocument.in/reader031/viewer/2022030117/589f19551a28ab7b208b4e35/html5/thumbnails/38.jpg)
Jenkins
Xcode plugin or Xcode tool
@chiarachiappini
![Page 39: Chiara Chiappini - Swift and the future of iOS app development](https://reader031.vdocument.in/reader031/viewer/2022030117/589f19551a28ab7b208b4e35/html5/thumbnails/39.jpg)
Jenkins Jobs
build and unit test the app
@chiarachiappini
![Page 40: Chiara Chiappini - Swift and the future of iOS app development](https://reader031.vdocument.in/reader031/viewer/2022030117/589f19551a28ab7b208b4e35/html5/thumbnails/40.jpg)
Jenkins Jobs
build and unit test the apprun functional tests
@chiarachiappini
![Page 41: Chiara Chiappini - Swift and the future of iOS app development](https://reader031.vdocument.in/reader031/viewer/2022030117/589f19551a28ab7b208b4e35/html5/thumbnails/41.jpg)
Jenkins Jobs
build and unit test the apprun acceptance tests
build application archive (ipa)
@chiarachiappini
![Page 42: Chiara Chiappini - Swift and the future of iOS app development](https://reader031.vdocument.in/reader031/viewer/2022030117/589f19551a28ab7b208b4e35/html5/thumbnails/42.jpg)
Jenkins Jobs
build and unit test the apprun acceptance tests
build application archive (ipa)tag and archive the ipa
@chiarachiappini
![Page 43: Chiara Chiappini - Swift and the future of iOS app development](https://reader031.vdocument.in/reader031/viewer/2022030117/589f19551a28ab7b208b4e35/html5/thumbnails/43.jpg)
Jenkins Jobs
build and unit test the apprun acceptance tests
build application archive (ipa)tag and archive the ipa
send to TestFlight@chiarachiappini
![Page 44: Chiara Chiappini - Swift and the future of iOS app development](https://reader031.vdocument.in/reader031/viewer/2022030117/589f19551a28ab7b208b4e35/html5/thumbnails/44.jpg)
What we learntWhat is Swift
![Page 45: Chiara Chiappini - Swift and the future of iOS app development](https://reader031.vdocument.in/reader031/viewer/2022030117/589f19551a28ab7b208b4e35/html5/thumbnails/45.jpg)
What we learntWhat is Swift
How to practice
![Page 46: Chiara Chiappini - Swift and the future of iOS app development](https://reader031.vdocument.in/reader031/viewer/2022030117/589f19551a28ab7b208b4e35/html5/thumbnails/46.jpg)
What we learntWhat is Swift
How to practice Some Java-Swift language equivalences
![Page 47: Chiara Chiappini - Swift and the future of iOS app development](https://reader031.vdocument.in/reader031/viewer/2022030117/589f19551a28ab7b208b4e35/html5/thumbnails/47.jpg)
What we learntWhat is Swift
How to practice Some Java-Swift language equivalences
Tools
![Page 48: Chiara Chiappini - Swift and the future of iOS app development](https://reader031.vdocument.in/reader031/viewer/2022030117/589f19551a28ab7b208b4e35/html5/thumbnails/48.jpg)
What we learntWhat is Swift
How to practice Some Java-Swift language equivalences
ToolsTesting and CI
![Page 49: Chiara Chiappini - Swift and the future of iOS app development](https://reader031.vdocument.in/reader031/viewer/2022030117/589f19551a28ab7b208b4e35/html5/thumbnails/49.jpg)
Go for Swift!