Search code examples
ios4iphone-sdk-3.0xcode4

Handle iOS Version for MessageUI.Framework


I am using MessageUI.Framework in my app but the same could not be run on iOS 3.x. Is there any way in which we can check the OS version at compile time. I have tried few solutions(Soln_1 and Soln_2) on web but they did not work.


Solution

  • I have got a solution for the same

    #ifdef _USE_OS_4_OR_LATER
       //code for iOS 4.0+
    #elseif
       //code for the iOS < 4.0
    #endif
    

    This worked for me hope it does for all other as well.