Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
What's new in iOS 9
Search
Adrien Humilière
January 12, 2017
Programming
0
280
What's new in iOS 9
Cocoaheads Paris, January 2017
Adrien Humilière
January 12, 2017
Tweet
Share
More Decks by Adrien Humilière
See All by Adrien Humilière
Build an iOS app from an iPad
adhumi
0
25
Something about Xcode ^^
adhumi
0
120
Inside Brut.
adhumi
0
81
Localization done bien
adhumi
1
240
Test and distribute an iOS app with Gitlab CI
adhumi
0
350
Pushing Forward iOS Notifications
adhumi
0
180
Good practices for iOS releases
adhumi
0
200
Rebranding an iOS app
adhumi
0
240
Cocoapods for private libraries
adhumi
0
120
Other Decks in Programming
See All in Programming
PHPUnitしか使ってこなかった 一般PHPerがPestに乗り換えた実録
mashirou1234
0
150
PHPとAPI Platformで作る本格的なWeb APIアプリケーション(入門編) / phpcon 2024 Intro to API Platform
ttskch
0
200
良いユニットテストを書こう
mototakatsu
5
2.1k
テストコードのガイドライン 〜作成から運用まで〜
riku929hr
1
260
CQRS+ES の力を使って効果を感じる / Feel the effects of using the power of CQRS+ES
seike460
PRO
0
120
Zoneless Testing
rainerhahnekamp
0
120
tidymodelsによるtidyな生存時間解析 / Japan.R2024
dropout009
1
770
20年もののレガシープロダクトに 0からPHPStanを入れるまで / phpcon2024
hirobe1999
0
460
Keeping it Ruby: Why Your Product Needs a Ruby SDK - RubyWorld 2024
envek
0
180
ソフトウェアの振る舞いに着目し 複雑な要件の開発に立ち向かう
rickyban
0
890
命名をリントする
chiroruxx
1
400
PHPで学ぶプログラミングの教訓 / Lessons in Programming Learned through PHP
nrslib
2
210
Featured
See All Featured
Code Review Best Practice
trishagee
65
17k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.9k
Music & Morning Musume
bryan
46
6.2k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
32
2.7k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
KATA
mclloyd
29
14k
BBQ
matthewcrist
85
9.4k
Unsuck your backbone
ammeep
669
57k
Producing Creativity
orderedlist
PRO
341
39k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
Building Applications with DynamoDB
mza
91
6.1k
Building Your Own Lightsaber
phodgson
103
6.1k
Transcript
What’s new in iOS 9 @adhumi, Trainline Cocoaheads Paris, jan.
2017
→
None
None
None
None
What is already used (or could be)
iPad Multitasking / Split screen & slide over Gif animé
de changement de size class
iPad Multitasking / Split screen & slide over Out of
the box ✨ (if you support size classes correctly)
iPad Multitasking / Split screen & slide over <key>UIRequireFullScreen</key> <true/>
Opt-out (info.plist)
Search API Add content to spotlight "
Search API NSUserActivity For current activity indexation (can be public)
var activity = NSUserActivity(activityType: "com.ct.capitainetrain") activity.title = "Paris → Carpentras" activity.userInfo = ["id": "www.trainline.fr/results/paris/carpentras"] activity.isEligibleForSearch = true "
Search API " let attributeSet = CSSearchableItemAttributeSet( itemContentType: kUTTypeData) attributeSet.title
= "Private searchable item" let item = CSSearchableItem(uniqueIdentifier: "AE4F-C8C24D", domainIdentifier: "domain", attributeSet: attributeSet) CSSearchableIndex.default().indexSearchableItems([item], completionHandler: nil) CoreSpotlight For massive and/or private, indexation
App thinning / Bitcode & App Slicing Archive iTunes Connect
App record App Store armv7, arm64 iPhone, iPad screen density
App thinning / Bitcode & App Slicing Default on iOS
(optional) Mandatory on watchOS and tvOS ⚠ Dependencies need to support Bitcode ~20-50% size gain
Keyboard shortcuts
Keyboard shortcuts override var keyCommands: [UIKeyCommand]? { return [UIKeyCommand(input: "\r",
modifierFlags: .command, action: #selector(onCommandEnter(_:)), discoverabilityTitle: "Validate")] } override var keyCommands: [UIKeyCommand]?
3D Touch / Quick Actions
3D Touch / Quick Actions let shortcut = UIApplicationShortcutItem(type: "fr.adhumi.app.message",
localizedTitle: "Send message") UIApplication.shared.shortcutItems = [shortcut] Dynamic Static Compile time Runtime
3D Touch / Peek & Pop func previewingContext(_ previewingContext: UIViewControllerPreviewing,
commit vc: UIViewController) { self.navigationController?.pushViewController(vc, animated: true) } override func viewDidLoad() { self.registerForPreviewing(with: self, sourceView: self.view) } func previewingContext(_ previewingContext: UIViewControllerPreviewing, viewControllerForLocation location: CGPoint) -> UIViewController? { return MyController() }
What’s really new and can be adopted
UIAlertView UIActionSheet ↓ UIAlertController
UIAlertController
UIAlertController self.present(alert, animated: true, completion: nil) let alert = UIAlertController(title:
"Uh oh!", message: "An error occured.", preferredStyle: .alert) let resolve = UIAlertAction(title: "Resolve", style: .destructive) { (action) in // Do stuff } alert.addAction(resolve) let cancel = UIAlertAction(title: "Cancel", style: .cancel) { (action) in // Do stuff } alert.addAction(cancel)
UIWebView WKWebView ↓ SFSafariViewController
SFSafariViewController
SFSafariViewController let url = URL(string: "https://www.trainline.fr") let safari = SFSafariViewController(url:
url!) self.navigationController?.pushViewController(safari, animated: true)
AddressBook.framework ↓ Contacts.framework
Contacts.framework let contacts = CNContactPickerViewController() contacts.delegate = self self.present(contacts, animated:
true, completion: nil) func contactPicker(_ picker: CNContactPickerViewController, didSelect contact: CNContact) { print(contact.givenName) print(contact.emailAddresses) } let firstName: String = ABRecordCopyValue(contact, kABPersonFirstNameProperty).takeRetainedValue()
App thinning / On Demand Resources Xcode project tag-yellow tag-blue
No tag APP
App thinning / On Demand Resources let tags: Set<String> =
["tag-yellow, tag-blue"] let request = NSBundleResourceRequest(tags: tags) request.beginAccessingResources { (error) in if let error = error { print(error) } else { print("Resources available") } }
NSLayoutConstraint(item: view1, attribute: .centerX, relatedBy: .equal, toItem: view2, attribute: .leading,
multiplier: 1, constant: 0) ↓ view1.centerXAnchor.constraint(equalTo: view2.leadingAnchor)
Auto Layout New syntax UILayoutGuide ( empty views) Anchors
Auto Layout UIStackView
Auto Layout
Auto Layout let stackView = UIStackView() stackView.axis = .vertical stackView.distribution
= .equalSpacing stackView.alignment = .center stackView.spacing = 8 stackView.addArrangedSubview(logo) stackView.addArrangedSubview(title)
Split screen Search APIs Bitcode, App Slicing Keyboard shortcuts 3D
Touch (peek/pop & quick actions) Auto Layout UIAlertController SFSafariViewController On Demand Resources Contacts.framework
Thanks! @adhumi, Trainline trainline.fr/jobs