I have a swift code that accesses an obj-C class's string property. Like this:
guard let unwrappedStr = objC.str
Crash stems in the above unwrapping line. Getting -[NSNull _fastCStringContents:]: unrecognized selector sent to instance I am unable to reproduce it on my device while debugging.
libobjc.A.dylib | objc_exception_throw (libobjc.A.dylib) |
CoreFoundation | +[NSObject(NSObject) _copyDescription] (CoreFoundation) |
CoreFoundation | forwarding (CoreFoundation) |
CoreFoundation | _CF_forwarding_prep_0 (CoreFoundation) |
libswift...re.dylib | specialized withCocoaASCIIPointer(:requireStableAddress:work:) (libswiftCore.dylib) |
libswift...re.dylib | bridgeCocoaString(:) (libswiftCore.dylib) |
libswift...re.dylib | String.init(_cocoaString:) (libswiftCore.dylib) |
libswift...on.dylib | static String.unconditionallyBridgeFromObjectiveC(:) (libswiftFoundation.dylib) |
The issue as far as I investigated pops up in the objC to swift bridging calls so any help is appreciated.