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
Streams APIとTCPフロー制御 / Web Streams API and TCP flow control
tasshi
2
350
Amazon Qを使ってIaCを触ろう!
maruto
0
410
Duckdb-Wasmでローカルダッシュボードを作ってみた
nkforwork
0
130
Tauriでネイティブアプリを作りたい
tsucchinoko
0
370
ペアーズにおけるAmazon Bedrockを⽤いた障害対応⽀援 ⽣成AIツールの導⼊事例 @ 20241115配信AWSウェビナー登壇
fukubaka0825
6
2k
シェーダーで魅せるMapLibreの動的ラスタータイル
satoshi7190
1
480
2024/11/8 関西Kaggler会 2024 #3 / Kaggle Kernel で Gemma 2 × vLLM を動かす。
kohecchi
5
930
카카오페이는 어떻게 수천만 결제를 처리할까? 우아한 결제 분산락 노하우
kakao
PRO
0
110
どうして僕の作ったクラスが手続き型と言われなきゃいけないんですか
akikogoto
1
120
『ドメイン駆動設計をはじめよう』のモデリングアプローチ
masuda220
PRO
8
540
Flutterを言い訳にしない!アプリの使い心地改善テクニック5選🔥
kno3a87
1
200
聞き手から登壇者へ: RubyKaigi2024 LTでの初挑戦が 教えてくれた、可能性の星
mikik0
1
130
Featured
See All Featured
Rails Girls Zürich Keynote
gr2m
94
13k
Imperfection Machines: The Place of Print at Facebook
scottboms
265
13k
Gamification - CAS2011
davidbonilla
80
5k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
Scaling GitHub
holman
458
140k
We Have a Design System, Now What?
morganepeng
50
7.2k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.7k
It's Worth the Effort
3n
183
27k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
Adopting Sorbet at Scale
ufuk
73
9.1k
The Pragmatic Product Professional
lauravandoore
31
6.3k
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