In a static library, Xcode 8.1 does not detect when an objective-c method is not implemented

大兔子大兔子 提交于 2019-12-12 04:35:09

问题


My objective-c project uses a static library and recently I just discovered that Xcode 8.1 does not give some warnings for the library. When a method implementation is missing in the app itself, I get a warning. But if a method implementation is missing in the library, I get no warning. It just crashes at run time.

Same for the switch statement with an enum. If a case is missing, Xcode would signal a warning, but not in the static library.

In previous versions of Xcode, I am sure I received those warnings in my library. And I never changed any Build Settings, I just keep all the default values.

More info:

When I open the static library itself as a project, I get all warnings. But when I open another project that includes the library (I dropped the mylibrary.xcodeproj file in my project and add it in the Link phase), I don't have the library warnings


回答1:


It was a bug in Xcode. It is now working well in Xcode Version 8.3 (8E162)



来源:https://stackoverflow.com/questions/41819127/in-a-static-library-xcode-8-1-does-not-detect-when-an-objective-c-method-is-not

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