Network Layers in Swift
Daniele Margutti

Great example of a clean architecture! I’m trying to play with it… Added User class but now getting “User cannot be constructed because it has no accessible initializers”.

import Foundation
import SwiftyJSON
class User {
private (set) var username: String = ""

init() {
username = ""
init(json: JSON) {
username = json["username"].stringValue

Any idea why?

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.