Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MJGAvailability.h Not working when NS_AVAILABLE_IOS() was used to set API version #6

Closed
JohnEstropia opened this issue Sep 9, 2013 · 7 comments

Comments

@JohnEstropia
Copy link

The deprecation warning works fine for symbols declared with __OSX_AVAILABLE_STARTING but not for those declared with NS_AVAILABLE_IOS and its variants (NS_ENUM_AVAILABLE_IOS, etc.)

@mattjgalloway
Copy link
Owner

Ah only just seen that you posted this. Yes indeed - MJGAvailability really doesn't work well with the iOS 7 SDK. I've been meaning to get round to sorting this out. Apologies.

@mattgapadmi
Copy link

These seem to all bottom out at CF_AVAILABLE, CF_AVAILABLE_MAC and CF_AVAILABLE_IOS. I've added the following for it to work with ios:

#undef CF_AVAILABLE
#define CF_AVAILABLE(_mac, _ios) _AVAILABILITY_INTERNAL__IPHONE##_ios
#undef CF_AVAILABLE_IOS
#define CF_AVAILABLE_IOS(_ios) _AVAILABILITY_INTERNAL__IPHONE##_ios

Any comments?

@mattjgalloway
Copy link
Owner

@mattgapadmi Oh I see, so overriding the CF_AVAILABLE stuff, to bypass the new behaviour. Feel free to PR!

Speakus added a commit to Speakus/MJGFoundation that referenced this issue Jun 29, 2014
@Speakus
Copy link
Contributor

Speakus commented Jun 29, 2014

PR here - #9

mattjgalloway added a commit that referenced this issue Jun 29, 2014
@mattjgalloway
Copy link
Owner

Fixed in #9

@keithyipkw
Copy link

Does it work in Xcode 6.1.1 (6A2008a)? NS_AVAILABLE_IOS seems to only work fine in my code but not in iOS library.

@keithyipkw
Copy link

Setting "Enable Modueles" in build settings solve my issue. The solution is in #9 #11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants