When debugging a crash with crash message Thread 1: Fatal error: NSArray element failed to match the Swift Array Element type
. I passing a list to a function: [MyObject]
but the debugger in debug window area of Xcode show me:
list([Project.MyObject])
_buffer (_ArrayBuffer<Project.MyObject>)
_storage(_ArrayBridgeStorage)
rawValue = (Bultin.BridgeObject)
Update:
Instate of create and passing list of MyObject
from XCTestCase
class. I move the method which create list of MyObject
into my logic class. The test is Success
. So I am sure the crash relate to cocoa bug. But still don't know how to work around to fix it.