Top "Swift4" questions

Use this tag only for questions directly related to changes in version 4 of Apple's Swift programming language.

Swift 4 approach for observeValue(forKeyPath:...)

I've been trying to find an example, but what I've seen doesn't work in my case. What would be the …

swift swift4 key-value-observing keypaths
Failed to load optimized model - GoogleMaps SDK IOS

I am getting this error after installing Google Maps SDK from CocoaPods. CoreData: annotation: Failed to load optimized model at …

ios google-maps sdk swift4 xcode9.1
Generic Swift 4 enum with Void associated type

tl;dr Is it possible to instantiate a generic Swift 4 enum member with an associated value of type Void? Background …

swift enums swift4
Getting string from Swift 4 new key path syntax?

How can you get a string value from Swift 4 smart keypaths syntax (e.g., \Foo.bar)? At this point I'm …

ios swift reflection swift4 key-value-coding
Closure tuple does not support destructuring in Xcode 9 Swift 4

After the gloss project for Swift 4 in Xcode 9 I am getting following error which i have no idea Closure tuple …

ios swift swift4 xcode9-beta
Accessing fileprivate and private variables in extension and another class using swift 4

I have been going through the recent swift docs and working out on few examples in understanding private and fileprivate …

ios swift swift4 access-control access-specifier
Cannot convert value of type '[String : AnyObject]?' to expected argument type '[NSAttributedStringKey : Any]?'

How to convert values of type '[String : AnyObject]?'to expected argument type '[NSAttributedStringKey : Any]?'? open class func …

swift nsattributedstring swift4 nsattributedstringkey
String, substring, Range, NSRange in Swift 4

I am using the following code to get a String substring from an NSRange: func substring(with nsrange: NSRange) -&…

string range nsrange swift4
'Invalid bitcode version (Producer: '902.0.39.2_0' Reader: '900.0.37_0')'

I'm using Xcode 9.0. My pod file: pod 'Alamofire', '~> 4.3' pod 'SwiftyJSON' pod 'AlamofireSwiftyJSON' pod 'KSToastView', '0.5.7' pod …

ios architecture swift4 xcode9 bitcode
Cannot convert value of type Substring to expected argument type String - Swift 4

Trying to get substring of String and append it to array of Strings: var stringToSplit = "TEST TEXT" var s = [String]() …

swift swift4