how to access default value of a core data entity?

how to access default value of a core data entity? For example, I have created an entity called Progress which has three attributes; id, project and week. In case my attribute list is empty, I want to fetch the default value. How can I do that?

Replies

May be you can use a nil-coalescing operator:

a != nil ? a! : b


https://docs.swift.org/swift-book/LanguageGuide/BasicOperators.html