Get Xcode 5 to warn about new API calls

后端 未结 4 1191
北恋
北恋 2020-12-11 12:47

There was a method for Xcode 4.x:

#define __AVAILABILITY_TOO_NEW __attribute__((deprecated(\"TOO NEW!\"))) __attribute__((weak_import))

#if __IPHONE_OS_VERS         


        
4条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-11 13:28

    Use the method described here: https://stackoverflow.com/a/8919108/480467

    In addition, to get this to work under XCode 5 you need to also redefine the NS_AVAILABLE and NS_DEPRECATED macros because CFAvailability.h distinguishes between compilers that support the attribute_availability_with_message feature.

    See my response here: https://stackoverflow.com/a/19704587/480467

提交回复
热议问题