Top "Swift4" questions

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

Swift 4 + Alamofire Decodable Json URL format

I have a JSON format which I do not decodable with Alamofire. Here is my json: "data":[ { "id":37, "status":"A\…

swift alamofire swift4 decodable
AudioHardware.cpp:1200:AudioObjectRemovePropertyListener: AudioObjectRemovePropertyListener: no object with given ID 0

Working on a project in swift, where I'm trying to initiate the AVPlayer, and for some reason it trows me …

ios swift avplayer swift4
Custom Font Not Working in WKWebView Swift

Trying to use custom font in WKWebView but no luck. let htmlString = "<span style=\"font-family: 'OpenSans-Bold'; font-size: 30; color: white\"&…

ios swift xcode swift4 wkwebview
Swift 4 - How to convert Json to swift Object automatically like Gson in java

I am new in Swift 4 and trying to figure out How to convert Json to swift Object automatically like Gson …

json swift swifty-json swift4
Convert received Int to Bool decoding JSON using Codable

I have structure like this: struct JSONModelSettings { let patientID : String let therapistID : String var isEnabled : Bool enum CodingKeys: String, CodingKey { …

swift4 codable
How can I use Key-Value Observing with Smart KeyPaths in Swift 4?

Could you help me how to manage to be notified when the contents of NSArrayController are modified, using Smart KeyPaths? …

swift key-value-observing swift4
Ignore non-Codable optional properties in Codable object

When conforming to Codable protocol, I cannot easily skip optional property of non-Codable class In Ride struct we want to …

json swift swift4 codable decodable
Decoding a JSON without keys in Swift 4

I'm using an API that returns this pretty horrible JSON: [ "A string", [ "A string", "A string", "A string", "A string", … ] ] …

arrays json swift swift4 jsondecoder