Reputation: 1006
I recently submitted (my first) app to the AppStore. It works on OS X 10.8 and uses some of the 10.8 features like ShareKit. I wanted to support OS X 10.7 also, to make it available for 10.7 users. Of course, this would mean that the 10.7 version will not have the ShareKit features. But I'm not sure what compile settings to use to make it available for both, so that 10.8 users will be able to make use of the features and 10.7 users will not see them.
If case 2 is correct, how do I check the in the code and make the menu items disabled?
Upvotes: 2
Views: 194
Reputation: 14549
number 2 is the correct thing to do, but being able change sdk to 10.7 is very nice, because in general if it won't compile because a class or method is missing it won't run.
you will need to re-write code to dynamically detect if things are available for use...
Class Some108Class = NSClassFromString(@"The10_8Class"); //will be Nil in 10.7
or
[var respondsToSelector:@selector(someMethod)]; // returns no if someMethod isn't available
[SomeClass instancesRespondToSelector:@selector(someMethod)];//same
Upvotes: 4