dispatch_once call causes crash

徘徊边缘 提交于 2019-12-05 20:54:25

I've been fighting this exact same issue for a little while on a PhoneGap-based project I'd converted to ARC a while back - crashing in the simulator but not on the device.

I created a fresh project and the same code worked OK, so I went through the project configuration to see what was different.

In my case, I had old un-needed linker flags set, specifically -weak_library /usr/lib/libSystem.B.dylib.

Removing that from the "Other Linker Flags" section of "Build Settings" fixed it.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!