You can use TOSVersion record in System.SysUtils.
if TOSVersion.Check(7, 0) then //Os is iOS 7
TOSVersion = record public type TArchitecture = (arIntelX86, arIntelX64, arARM32); TPlatform = (pfWindows, pfMacOS, pfiOS, pfAndroid, pfWinRT, pfLinux); public const AllArchitectures = [arIntelX86, arIntelX64, arARM32]; AllPlatforms = [pfWindows, pfMacOS, pfiOS, pfAndroid, pfWinRT, pfLinux]; private class var FArchitecture: TArchitecture; class var FBuild: Integer; class var FMajor: Integer; class var FMinor: Integer; class var FName: string; class var FPlatform: TPlatform; class var FServicePackMajor: Integer; class var FServicePackMinor: Integer; class constructor Create; public class function Check(AMajor: Integer): Boolean; overload; static; inline; class function Check(AMajor, AMinor: Integer): Boolean; overload; static; inline; class function Check(AMajor, AMinor, AServicePackMajor: Integer): Boolean; overload; static; inline; class function ToString: string; static; class property Architecture: TArchitecture read FArchitecture; class property Build: Integer read FBuild; class property Major: Integer read FMajor; class property Minor: Integer read FMinor; class property Name: string read FName; class property Platform: TPlatform read FPlatform; class property ServicePackMajor: Integer read FServicePackMajor; class property ServicePackMinor: Integer read FServicePackMinor; end;
Detecting iOS 6 and iOS 7
To detect the iOS version being used on the target iOS device (and to assign an appropriate available style at run time), use the TOSVersion.Check method as follows.
Example:
Delphi:
{$IFDEF IOS} if TOSVersion.Check(7, 0) then Style := TStyleManager.LoadFromResource(HInstance, 'iOS7Jet', RT_RCDATA) else Style := TStyleManager.LoadFromResource(HInstance, 'iOSJet', RT_RCDATA); {$ENDIF}