因此,我试图为mac编译我的iOS项目,当我尝试使用
#if !targetEnvironment(UIKitForMac)
我从标题中得到了错误。
我尝试将构建目标设置为iOS 13,但似乎没有任何效果。
发布于 2019-06-08 11:07:02
如果你使用的是目标-c而不是快速,你应该使用:
#if !TARGET_OS_UIKITFORMAC
#endif发布于 2020-06-16 18:48:32
目标-C
#if !TARGET_OS_MACCATALYST
// Code to exclude from Mac.
#endifSwift
#if !targetEnvironment(macCatalyst)
// Code to exclude from Mac.
#endif资料来源:
https://stackoverflow.com/questions/56497012
复制相似问题