I am getting a crash Thread 21: EXC_BAD_ACCESS (code=1, address=0x101e)
when trying to log a Swift enum in my Objective C code.
Enum passed in as the result of a completion handler on Swift function call from Obj C code:
NSLog(@"Completed with operation: %@", operation);
Enum:
@objc public enum Operation: Int {
case Unknown
case Operation1
case Operation2
case Operation1And2
}
I tired the following 2 variations and the app failed to build. There is an issue with Xcode that prevents me from being able to see what the actual error was.
NSLog(@"Completed with operation: %@", [operation description]);
NSLog(@"Completed with operation: %@", [operation value]);
I want to do basic operation on this enum like log its value, do boolean comparisons. But I am a little lost on how to do that as fairly new to Objective C.