Xcode: target membership of frameworks?

余生长醉 提交于 2020-01-05 08:16:19

问题


I have a question about the far right column of your Xcode project (image here)

Apple's documentation tells me this about that column:

Target membership. The column marked by the target icon indicates whether the file is included in the active target. If the checkbox next to a file is checked, then the active target includes that file.

So what if I have #import <Security/Security.h> in my .m file, do I still need to link it with the target membership? What if a .m file has that and it's not linked but the code works? Should I remove the line? Should I remove the framework?

Thanks.


回答1:


If you don't add it to the target, the compiler won't find the Security framework from the other files compiled under the same target. Targets are in a way separate projects that share some common settings.



来源:https://stackoverflow.com/questions/1939515/xcode-target-membership-of-frameworks

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