开发者

EXC_BAD_ACCESS on objc_setAssociatedObject with -weak_library /usr/lib/libSystem.B.dylib linker flags

开发者 https://www.devze.com 2023-03-06 01:23 出处:网络
I have a EXC_BAD_ACCESS when I call objc_setAssociatedObject with the linker flags : -weak_library /usr/lib/libSystem.B.dylib linker flags.

I have a EXC_BAD_ACCESS when I call objc_setAssociatedObject with the linker flags : -weak_library /usr/lib/libSystem.B.dylib linker flags.

I absolutely need the linker flag because of this, do somebody know a workaround?

(I also have a crash on dispatch_async but I can work around that... Also, I'm building a iOS 4 only feature on my app that is iOS 3 compatible)

EDIT: W开发者_高级运维ith more research, I found this and this question but no more answer...


The problem is simply a bug in the iOS Simulator. The codes works fine on the device.

I've filled a radar on Apple's bug reporter (radar://9470793)

EDIT: Just found out : -weak_library /usr/lib/libSystem.B.dylib breaks the iOS Simulator. Use -weak-lSystem instead.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号