Upload
anat-gilboa
View
260
Download
2
Embed Size (px)
Citation preview
SOURCE EDITING EXTENSIONSCAPABILITIES:
* Add commands to the editor* Edit text* Change selections* Several commands for an extension
JUST HAVE TO SET THE XCSOURCEEDITORCOMMANDINVOCATION IN INFO.PLIST AND IMPLEMENTING THIS PROTOCOL:
public protocol XCSourceEditorCommand : NSObjectProtocol { public func perform(with invocation: XCSourceEditorCommandInvocation, completionHandler: (NSError?) -> Void) -> Void }
> Signed with your Dev Profile and distributed in the App Store...
> Only question left is... is this the end of Alcatraz? (third-party extension/plugin manager for Xcode
plugins)
AUTOLAYOUT DEBUGGINGAMBIGUOUS LAYOUTS ARE REPORTED AS RUNTIME ISSUES
> listed in the Issue Navigator> Highlighted in the activity viewer, explained in the size
inspector
THREAD SANITIZER* Like ASan (Address Sanitizer), finds memory corruption issues* Finds data races, thread leaks, unsafe calls in signal handlers* via Apple: 1. Edit Scheme – Diagnostics tab 2. “Enable Thread Sanitizer” checkbox 3. Build and Run 4. View all of the generated runtime issues 5. Can choose to break on every issue* The more runtime coverage, the better * Would be a good idea to run them on our tests
MEMORY GRAPH DEBUGGING* New tool to find leaked and abandoned memory* Two graph styles * Root paths * Cycles* Logging integration available
NEW SIGNING MODESAUTOMATICALLY
CREATES A SIGNING CERTIFICATE
CREATES AND UPDATES APP IDS
CREATES AND UPDATES PROVISIONING PROFILES
NEW SIGNING MODECUSTOMIZED
> Manually created profiles only
APPLE RECOMMENDS USING AUTOMATIC
> Hopefully all of our signing troubles will go away...
SWIFT 3 & FOUNDATIONLANGUAGE
* swift* swift-evolution
PACKAGE MANAGER* swift-package-manager* swift-llbuild
SWIFT LANGUAGE ADDITIONS:MAJOR UPDATES:
* Naming Guidelines (driven by SE-0005, SE-0006, SE-0023) * Strive for clarity-not terseness or verbosity * Capture essential information * Omit redundant information
THE GREAT RENAMINGarray.appendContentsOf([2,3,4])array.insert(1, atIndex: 0)
turns intoarray.append(contentsOf: [2,3,4])array.insert(1, at: 0)
THE GREAT RENAMING PT 2
Givenfunc myFunction(a: Int, b: Int, c: Int) { }myFunction(42, b: 57, c: 99)
turns intomyFunction(a: 42, b: 57, c: 99)
STRINGLY TYPED OBJECTIVE-C CONSTANTS (SE-0033)
for constants defined astypedef NSString *NSNotificationName NS_EXTENSIBLE_STRING_ENUM;const NSNotificationName NSUserDefaultsDidChangeNotification;
What used to be:let NSUserDefaultsDidChangeNotification: String
turns intoextension UserDefaults { class let didChangeNotification: NSNotification.Name}
UNSAFEPOINTER NULLABILITY (SE-0002)
What used to be:let ptr : UnsafeMutablePointer<Int> = nilif ptr != nil { ptr.memory = 42}
turns intolet ptr : UnsafeMutablePointer<Int>? = nilif let ptr = ptr { ptr.memory = 42}
COLLECTION INDEXING (SE-0065)i = collection.startIndexnext = i.successor()
turns intoi = collection.startIndexnext = collection.index(after: i)
PEEK + POP
> Pop - commit to viewing that content + navigating to it
ENABLING FOR WEB VIEWS
WKWebView/UIWebView can enable via allowsLinkPreviewProperty
SFSafariViewController implements peek & pop automatically
UIPREVIEWINTERACTION
> Advanced control of 3D touch interaction> Exposes force processing & haptic feedback to your
own user interface
UIPREVIEWINTERACTION
Conform to UIPreviewInteractionDelegate Protocol
func previewInteraction(_ previewInteraction: UIPreviewInteraction, didUpdatePreviewTransition transitionProgress: CGFloat, ended: Bool)
HOME SCREEN QUICK ACTIONS
> Static & defined in a plist or dynamic & defined at app’s first launch
> Can have both, but max of 4. Dynamic options appear after Static
> Contain System Icon, Custom Icon, or Address Book Contact Image
UIKitNEW INTERRUPTIBLE ANIMATION ANIMATION SUPPORT FOR
UIViewPropertyAnimator
> Allows users to retain control of animations and link them with gesture-based interactions
> New timing parameters: quadratic, cubic and spring
SPEECH RECOGNITIONNEW API THAT SUPPORTS CONTINUOUS SPEECH
RECOGNITIONlet recognizer = SFSpeechRecognizer()let request = SFSpeechURLRecognitionRequest(url: audioFileURL)recognizer?.recognitionTask(with: request, resultHandler: { (result, error) in print (result?.bestTranscription.formattedString)})
SPEECH RECOGNITIONUSING APIS IN SPEECH.FRAMEWORK, YOU CAN PERFORM SPEECH
TRANSCRIPTION
> Data is temporarily stored on Apple's servers to increase the accuracy of speech recognition
WATCH OS3
> Main goal: 2 seconds or less per interaction> Major UI Enhancements:
Launch apps from complications & new dock (replaces friends screen & glances)
Swipe edge-to-edge to change watch faces with their own individual complications
WATCH BACKGROUND TASKS
> Background App Refresh WKApplicationRefreshBackgroundTask
Update app state in watch background so it’s much faster on launch
WATCH BACKGROUND TASKS
> Background Snapshot Refresh WKSnapshotRefreshBackgroundTask
Update user interface in background: can push, pop, or present other interface controllers.
WATCH BACKGROUND TASKS
> Background Watch Connectivity> Paired iPhone can receive info & launch app in
background, passing info.WKWatchConnectivityRefreshBackgroundTask
handleBackgroundTasks:
WATCH BACKGROUND TASKS
> Workout apps can now run in background> Launch your watchOS workout app from your iOS app startWatchAppWithWorkoutConfiguration:comp
letion:
COMPLICATIONS
Complications are small visual elements that appear directly on watch face.
* Launch apps right from tapping the complication * Watch face complication tells the system to keep the
associated app in a ready-to-launch state. * Guaranteed to receive 50 push updates per day.
APPLE PAY
> In-app paymentsSecurely provide payment and contact information to
pay for physical goods and services PKPaymentAuthorizationController
CROWN ACCESS
WKCrownSequencer
> Current state of the digital crownWKCrownDelegate
> Receive notifications as the user rotates the crown
AUTOLAYOUTAUTORESIZING MASKS
> If a view doesn't have constraints, the autoresizing masks will work views with constraints
> need to set translatesAutoresizingMaskIntoConstraints
== true> Otherwise if a view has constraints, then the
autoresizing masks are ignored
AUTOLAYOUTDESIGN AND RUNTIME CONSTRAINTS
> Designate intrinsic content size> Turn off ambiguity per view w/runtime constraints
AUTOLAYOUTLAYOUT FEEDBACK LOOP
> A new way to find out which views are involved in a loop
> following argument passed on launchUIViewLayoutFeedbackLoopDebuggingThreshold
SIRIKIT
Let Siri play with your app!
> Intents + Intents UI> Current SiriKit Support for domains of:
1. Audio or video calling2. Messaging3. Sending or receiving payments4. Searching photos5. Booking a ride6. Managing workouts
SIRIKIT
> An Intents extension communicates your app’s content to Siri and Maps and performs the tasks associated
with any supported intents.> Optional UI extension for custom interface for your
content within the Siri or Maps interface. This extension is optional.
APPLE FILE SYSTEMDESCRIBED AS A "NEXT-GENERATION FILE SYSTEM
FOR APPLE PRODUCTS"SUPPOSED TO BE OPTIMIZED FOR SSD/FLASH BUT CAN ALSO BE
USED WITH TRADITIONAL HDDS.* Supports: * Cloning of Files and Directories * Exposed CoreOS API `int copyfile(const char *from, const char *to, copyfile_state_t state, copyfile_flags_t flags);` `int fcopyfile(int from_fd, int to_fd, copyfile_state_t, copyfile_flags_t flags);` * Snapshots * Fast Directory Sizing * Atomic Safe-Save
APPLE PAY
> Present card from within app> Dynamic payment networks
> New sandbox testing environment> PassKit support for Apple Pay in places where UIKit is
not available> Apple Pay on web with Apple Pay JS
NOTIFICATIONS
> User Notifications framework (UserNotifications.framework)
> Notification delivery based on time or location> User Notifications UI framework
> Modify push payload after delivery
NOTIFICATIONS
UNNotificationServiceExtension
> Runs in background> Modify or replace the notification’s payload
> Download content> Decrypt notification
RECOMMENDED TALKS
> Understanding Swift Performance> Server-Side Swift
> Swift API Design Guidelines> Optimizing App Startup Time
> Thread Sanitizer and Static Analysis> Debugging Tips and Tricks
> Concurrent programming with GCD