Question

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.

  1. I tried changing the Base SDK to 10.7, but it won't compile on that.
  2. I tried changing the deployment target to 10.7 keeping the Base SDK 10.8. It compiled, but I'm not sure if that is the right thing to do. Don't have a 10.7 machine to test it, either.

If case 2 is correct, how do I check the in the code and make the menu items disabled?

Was it helpful?

Solution

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
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top