0
    vp.verifyEmail(self.textClaim) {(OYIDCVerificationStatus status)
        in
        println("verifying email \(self.textClaim) returned \(status)")
    }

yields "verifying email foo@bar returned (Enum Value)" (which obviously is of no practical use). this:

    vp.verifyEmail(self.textClaim) {(OYIDCVerificationStatus status)
        in
        var s : CShort = status as CShort //<- this does not compile
        println("verifying email \(self.textClaim) returned \(s)")
    }

does not compile

VerifyEmailViewController.swift:22:21: 'YOIDCVerificationStatus' is not convertible to 'CShort'

even though the enum is declared like so:

typedef NS_ENUM(short, YOIDCVerificationStatus) {
    Unavailable = -1,
    ClaimRefuted,
    ClaimVerified
};
Anil Varghese
  • 42,757
  • 9
  • 93
  • 110
Anton Tropashko
  • 5,486
  • 5
  • 41
  • 66

1 Answers1

0

Would toRaw do what you need?

 vp.verifyEmail(self.textClaim) {(OYIDCVerificationStatus status)
        in
        println("verifying email \(self.textClaim) returned \(status.toRaw())")
    }
Ashley Mills
  • 50,474
  • 16
  • 129
  • 160
  • something like toRaw, yes. attempting to do status.toRaw results in VerifyEmailViewController.swift:22:12: 'status' is not a type – Anton Tropashko Jun 06 '14 at 10:33