Server Side Swift with Vapor · Challenge: Users And Categories | raywenderlich.com


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/870225-server-side-swift-with-vapor/lessons/12

Hi,

I have the following error message when building after creating my models:
Build operations are disabled: ‘project.xcworkspace’ has changed and is reloading.

Could it be Xcode 10.2 update related ?

It’s actually an issue introduced with Xcode 10.1 where changing the project breaks things. If you close Xcode, delete Derived Data and the Xcode project, regenerate it and open it again. It should be good to go

1 Like

Hi @0xtim, i am learning a lots about Vapor.
This is also correct?

extension User: Model {
    typealias Database = SQLiteDatabase
    typealias ID = UUID
    static let idKey: IDKey = \User.id
}

Thanks a lot!

@0xtim Can you please help with this when you get a chance? Thank you - much appreciated! :]

Hey @thiagobutignon, apologies for the delay! Yep that extension is the same as writing extension User: SQLiteUUIDModel {}

1 Like

in User.swift

extension User: SQLiteUUIdModel {}
error - Use of undeclared type ‘SQLiteUUIdModel’

extension User: Migration {}
error - Use of undeclared type ‘Migration’

extension User: Parameter {}
error- Type ‘User’ does not conform to protocol ‘Parameter’

resolved issues by updating swift package

run

swift package update

and reopen project

@akshaydevkate Thank you for sharing your solution - much appreciated! :]