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
380
0
Share
What's new in iOS 9
Cocoaheads Paris, January 2017
Adrien Humilière
January 12, 2017
More Decks by Adrien Humilière
See All by Adrien Humilière
Attention to details
adhumi
0
16
Build an iOS app from an iPad
adhumi
0
80
Something about Xcode ^^
adhumi
0
150
Inside Brut.
adhumi
0
140
Localization done bien
adhumi
1
290
Test and distribute an iOS app with Gitlab CI
adhumi
0
400
Pushing Forward iOS Notifications
adhumi
0
220
Good practices for iOS releases
adhumi
0
240
Rebranding an iOS app
adhumi
0
280
Other Decks in Programming
See All in Programming
3Dシーンの圧縮
fadis
1
310
UaaL×Androidアプリのメモリ計測 — Memory Profilerの先へ
rio432
0
180
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
2
290
Migrations : C'est une question d'hygiène !
vinceamstoutz
0
2.1k
AI時代になぜ書くのか
mutsumix
0
460
サークル参加から学ぶ、小さな事業の回し方
yuzneri
0
240
AIチームを指揮するOSS「TAKT」活用術 / How to Use “TAKT,” an OSS Tool for Orchestrating AI Teams
nrslib
5
680
Claspは野良GASの夢をみるか
takter00
0
110
新規プロダクトを高速で生み出すハーネスエンジニアリング
seanchas116
4
280
GitHub Copilot CLIのいいところ
htkym
2
1.1k
サーバーレスで作る、動画データ管理基盤
oyasumipants
0
270
ECR拡張スキャンでSBOMを収集して サプライチェーン攻撃の影響調査を 爆速で終わらせてみた
akihisaikeda
2
200
Featured
See All Featured
Reality Check: Gamification 10 Years Later
codingconduct
0
2.2k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
190
The Limits of Empathy - UXLibs8
cassininazir
1
340
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.7k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
290
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
150
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
140
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.2k
Abbi's Birthday
coloredviolet
2
7.7k
The agentic SEO stack - context over prompts
schlessera
0
790
The SEO identity crisis: Don't let AI make you average
varn
0
470
The Curse of the Amulet
leimatthew05
1
12k
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