The starter project no longer builds with SwiftyJSON 4.
JSON(data:)
now throws and it’s not handled by starter project in ApiController.swift
line 102.
I’ve changed it to this (haven’t tested but should be okay I guess. Assuming it never throws…):
return session.rx.data(request: request)
.map {
do {
return try JSON(data: $0)
} catch {
return JSON()
}
}
I feel like Chapter 12 overall still needs updates. There are also some other issue pointed out by other posts in forums.
Just a suggestion :]