Simultaneous accesses to 0x1c0a7f0f8, but modification requires exclusive access error on Xcode 9 beta 4

后端 未结 11 1831
孤城傲影
孤城傲影 2020-11-29 05:15

my project uses both Objective-C and Swift code. When a user logs in, it calls a set of apis for user preference, I have a DataCoordinator.swift class which schedules the AP

11条回答
  •  借酒劲吻你
    2020-11-29 05:48

    Only in Swift 4 and when using .initial option for your KVO Settings

    If you check your context in observeValue method, just make your context variable static. This blog post describes this bug in detail.

提交回复
热议问题