As per documentation and this thread, among others, for an enum of Ints I can print the case name as a string by simply doing this:
enum TestEnum: Int {
case one
case two
case three
}
let testEnum = TestEnum.two
print(testEnum)
// prints "two"
Which works of course. But if I try to do the same thing with CKAccountStatus, it prints the name of the enum:
import CloudKit
let testStatus = CKAccountStatus.noAccount
print(testStatus)
// prints "CKAccountStatus"
CKAccountStatus is an enum of Ints, just like the test enum above:
public enum CKAccountStatus : Int {
case couldNotDetermine
case available
case restricted
case noAccount
}
What am I doing wrong and/or why is this happening?