xcodeswift3xcode8xcode9swift3.2

Xcode doesn't recognize Enums


I made a project with Xcode 9 beta and now for release it I have to use Xcode 8 for archiving and releasing,but when try to build with Xcode 8,some error accord. I have an enum that works correctly in Xcode 9,but Xcode 8 can not recognize members of that.

enum TestAcceptionStatus:Int {
case pricePending = 1
case payReady
case payed
case testerPending
case admissionRegistration
case testerDetail
case sampleRegistration
case answered = 20 }

this is the error image:

this is the error image

so, can anybody help me !!


Solution

  • I found answer. Just should unwrap statusType from switch condition. this may be an Xcode bug,because statusType is not an optional but when I added ! at the end of statusType,errors disappeared.