Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Best way to get iOS, MAC OS version

    • 0
    • 0
    • 1
    • 0
    • 0
    • 0
    • 0
    • 0
    • 126
    Comment on it

    Many times we need to make check for iOS version as it Apple changes its API from version to version. For this reason Apple provide the safest way to achieve it, which is "NSFoundationVersionNumber". It returns on which version device is running. It provide ENUM for it which is used to make check as follows (In this example we are checking for iOS8):

    BOOL iOS8 = (floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_7_1) ? YES : NO;
    

    As simple as that. Also ENUM for NSFoundationVersionNumber has values for iOS, iPhoneOS and MAC OS as well.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: