[英]iOS:How to run framework code only in extension not containing app
Framework is a good way to share code between Containing App and Extension. 框架是在Containing App和Extension之间共享代码的好方法。
Sometimes I want some code to run only when target is Containing App not Extension, or vice versa. 有时,我希望某些代码仅在目标是包含应用程序而不是扩展程序时才运行,反之亦然。
Is there something like TARGET_OS_EXTENSION ? 是否有类似TARGET_OS_EXTENSION的东西?
use your macro by yourself, just example in target marcro in ios 自己使用宏,仅是iOS中目标marcro中的示例
it is very flexible 它非常灵活
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.