could not execute support code to read Objective-C class data in the process. at real iPhone device

后端 未结 4 1655
借酒劲吻你
借酒劲吻你 2021-01-04 03:19

when this objective-c based method call in Simulator, it doesn\'t matter. But in real iPhone device, it occurs Thread 1: signal SIGABRT

warning: c

相关标签:
4条回答
  • 2021-01-04 03:30

    Just a silly mistake but I was assigning a navigationController as the rootViewController of another UINavigationController.

    0 讨论(0)
  • 2021-01-04 03:31

    There maybe linking problem with Objective C code.

    Try one of the following:

    • Go to your project
    • Add -ObjC to your Other Linker Flags
    • Enable Modules (C and ObjC) = Yes
    0 讨论(0)
  • 2021-01-04 03:31

    In any case, you had better set a exception breakpoint. You can get a log about the crash.

    0 讨论(0)
  • 2021-01-04 03:33

    I had the same error message and traced it to my array declaration:

    private var boundaries = [CLLocationCoordinate2D]()
    

    I altered the declaration to explicitly declare boundaries as an CLLocationCoordinate2D array like so:

    private var boundaries:[CLLocationCoordinate2D] = [CLLocationCoordinate2D]()
    

    That declaration silenced the error message.

    In your case, you're using an old c method, malloc for your buffer instead of letting swift manage your memory so perhaps that's the problem. Or possibly if you explicitly declared decrypted as an array that would take care of the issue.

    0 讨论(0)
提交回复
热议问题