GBDeviceInfoInterface.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. //
  2. // GBDeviceInfoInterface.h
  3. // GBDeviceInfo
  4. //
  5. // Created by Luka Mirosevic on 20/02/2015.
  6. // Copyright (c) 2015 Luka Mirosevic. All rights reserved.
  7. //
  8. // Licensed under the Apache License, Version 2.0 (the "License");
  9. // you may not use this file except in compliance with the License.
  10. // You may obtain a copy of the License at
  11. //
  12. // http://www.apache.org/licenses/LICENSE-2.0
  13. //
  14. // Unless required by applicable law or agreed to in writing, software
  15. // distributed under the License is distributed on an "AS IS" BASIS,
  16. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17. // See the License for the specific language governing permissions and
  18. // limitations under the License.
  19. #import "GBDeviceInfoTypes_Common.h"
  20. @class GBDeviceInfo;
  21. @protocol GBDeviceInfoInterface <NSObject>
  22. @required
  23. /**
  24. Returns information about the device the current app is running on.
  25. */
  26. + (GBDeviceInfo *)deviceInfo;
  27. /**
  28. Check if the OS version is equal to or higher than version.
  29. */
  30. - (BOOL)isOperatingSystemAtLeastOSVersion:(GBOSVersion)version;
  31. /**
  32. Check if the OS version is equal to or higher than versionString, where versionString gets parsed into a GBOSVersion.
  33. e.g. @"8.2.3" -> GBOSVersionMake(8,2,3)
  34. @"9.1" -> GBOSVersionMake(9,1,0)
  35. */
  36. - (BOOL)isOperatingSystemAtLeastVersion:(NSString *)versionString;
  37. @end