Swift linker error in release build fixable by adding code

送分小仙女□ 提交于 2019-12-06 09:36:28

This is a compiler bug, which has been fixed in Xcode 8.1.

LeonardoBarros

I had the same problem using sorted(by: method in one project that I was migrating to Swift 3.

It seems a bug in the compiler and I found this following references:

For now the only workaround that worked for me was change the swift compiler optimization level to None on Build Settings.

At first i thought is that weird code apple inserted in few places with Comparable stuffs... But didn't worked when i added it back. What worked was to step down the optimization level to: fast, single file optimization They messed up this xcode version, storyboards also have huge problems.

Had the same problem when migrating to Swift 3.

I got it to work by letting the object that calls the code inherit from NSObject.

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