WWDC 2017
Session video and resources: https://developer.apple.com/videos/play/wwdc2017/411/ Provided by @mihriminaz
- Base OS - deprecated functions/new parameters-functions
- Swift 3:
- Unified query syntax in swift
#available
- Unified query syntax in swift
- New Availability checking in Objective-C - NEW!!!
- Compiler warnings
- @available to query availability
- If
(@ available(iOS 11, *))
= required API_AVAILABILITY()
macro for your functions, classes to mark OS support..__builtin_available
for C and C++ for class definitions/functions
All APIs are checked in compile time..
- 3 new checks:
- NSnumber CFNumberRef
- //No need to check for nil.
self.photoCount.integerValue > 1
- Early return
- Suspicious coversions NSnumber CFNumberRef = set yes aggressive -> compiler will check
- dispatch_once()
- Global or static variable..
- NSLock ->
- NSMutable copy properties
- @property(copy) <= mutation detects.
- Capturing parameters in blocks with ARC
Opt parameter
__Strong * error
- Non-prototype declarations in C and objective C Change () -> (void)
- Renaming a function, structs, constants name all over the places..
- Turning a block of code to functions - > adds the parameters as reference typed
- Code completion
- auto[…] To decompose std::tuple
- initializers in if scope, if it is used later - gives error
- advanceDispatch -> new !! => constexpr - an alternative for compile-time dispatch
- std::string -> Substrings are copies and can be expensive -> use std::string_view, but it is not safe (it does not have a storage - so can cause issues after free/release)
- Clean link, incremental link has better performances
- Enable incremental LTO