Calling obj-c enum from swift not working after upgrading to Xcode 7.3 swift 2.2

Viewed 1105

The code was working well before the upgrade to Xcode 7.3 from 7.1 and swift 2.2. I have also seen answers using the typedef NS_ENUM(NSUInteger, MyStatus)... but if possible, I prefer not to change the existing obj-c code.

Defined in obj-c header file:

typedef enum {
    StatusPending,
    StatusTimeout,
    StatusSuccess,
    StatusFail
} MyStatus;

Statement in Swift file:

/* some code to retrieve the status */

switch (status) {

case .StatusSuccess:
 /* do something */

/* other test cases omitted here */

default:

}

I've tried using .rawValue, .value, etc, but I still get an error:

Enum case 'StatusSuccess' not found in type 'MyStatus'

All was working fine before the upgrade and have tried uninstalling/reinstalling Xcode 7.3, Product->Clean, Product->Clean Build Folder.. but without success :-(

1 Answers
Related