Repositorio del curso CCOM4030 el semestre B91 del proyecto Artesanías con el Instituto de Cultura

CDVAvailability.h 3.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. /*
  2. Licensed to the Apache Software Foundation (ASF) under one
  3. or more contributor license agreements. See the NOTICE file
  4. distributed with this work for additional information
  5. regarding copyright ownership. The ASF licenses this file
  6. to you under the Apache License, Version 2.0 (the
  7. "License"); you may not use this file except in compliance
  8. with the License. You may obtain a copy of the License at
  9. http://www.apache.org/licenses/LICENSE-2.0
  10. Unless required by applicable law or agreed to in writing,
  11. software distributed under the License is distributed on an
  12. "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  13. KIND, either express or implied. See the License for the
  14. specific language governing permissions and limitations
  15. under the License.
  16. */
  17. #import "CDVAvailabilityDeprecated.h"
  18. #define __CORDOVA_IOS__
  19. #define __CORDOVA_0_9_6 906
  20. #define __CORDOVA_1_0_0 10000
  21. #define __CORDOVA_1_1_0 10100
  22. #define __CORDOVA_1_2_0 10200
  23. #define __CORDOVA_1_3_0 10300
  24. #define __CORDOVA_1_4_0 10400
  25. #define __CORDOVA_1_4_1 10401
  26. #define __CORDOVA_1_5_0 10500
  27. #define __CORDOVA_1_6_0 10600
  28. #define __CORDOVA_1_6_1 10601
  29. #define __CORDOVA_1_7_0 10700
  30. #define __CORDOVA_1_8_0 10800
  31. #define __CORDOVA_1_8_1 10801
  32. #define __CORDOVA_1_9_0 10900
  33. #define __CORDOVA_2_0_0 20000
  34. #define __CORDOVA_2_1_0 20100
  35. #define __CORDOVA_2_2_0 20200
  36. #define __CORDOVA_2_3_0 20300
  37. #define __CORDOVA_2_4_0 20400
  38. #define __CORDOVA_2_5_0 20500
  39. #define __CORDOVA_2_6_0 20600
  40. #define __CORDOVA_2_7_0 20700
  41. #define __CORDOVA_2_8_0 20800
  42. #define __CORDOVA_2_9_0 20900
  43. #define __CORDOVA_3_0_0 30000
  44. #define __CORDOVA_3_1_0 30100
  45. #define __CORDOVA_3_2_0 30200
  46. #define __CORDOVA_3_3_0 30300
  47. #define __CORDOVA_3_4_0 30400
  48. #define __CORDOVA_3_4_1 30401
  49. #define __CORDOVA_3_5_0 30500
  50. #define __CORDOVA_3_6_0 30600
  51. #define __CORDOVA_3_7_0 30700
  52. #define __CORDOVA_3_8_0 30800
  53. #define __CORDOVA_3_9_0 30900
  54. #define __CORDOVA_3_9_1 30901
  55. #define __CORDOVA_3_9_2 30902
  56. #define __CORDOVA_4_0_0 40000
  57. #define __CORDOVA_4_0_1 40001
  58. #define __CORDOVA_4_1_0 40100
  59. #define __CORDOVA_4_1_1 40101
  60. #define __CORDOVA_4_2_0 40200
  61. #define __CORDOVA_4_2_1 40201
  62. #define __CORDOVA_4_3_0 40300
  63. #define __CORDOVA_4_3_1 40301
  64. #define __CORDOVA_4_4_0 40400
  65. #define __CORDOVA_4_5_0 40500
  66. #define __CORDOVA_4_5_1 40501
  67. #define __CORDOVA_4_5_2 40502
  68. #define __CORDOVA_4_5_4 40504
  69. #define __CORDOVA_5_0_0 50000
  70. #define __CORDOVA_5_0_1 50001
  71. #define __CORDOVA_5_1_0 50100
  72. #define __CORDOVA_5_1_1 50101
  73. #define __CORDOVA_6_0_0 60000
  74. #define __CORDOVA_6_1_0 60100
  75. #define __CORDOVA_6_1_1 60101
  76. /* coho:next-version,insert-before */
  77. #define __CORDOVA_NA 99999 /* not available */
  78. /*
  79. #if CORDOVA_VERSION_MIN_REQUIRED >= __CORDOVA_4_0_0
  80. // do something when its at least 4.0.0
  81. #else
  82. // do something else (non 4.0.0)
  83. #endif
  84. */
  85. #ifndef CORDOVA_VERSION_MIN_REQUIRED
  86. /* coho:next-version-min-required,replace-after */
  87. #define CORDOVA_VERSION_MIN_REQUIRED __CORDOVA_6_1_1
  88. #endif
  89. /*
  90. Returns YES if it is at least version specified as NSString(X)
  91. Usage:
  92. if (IsAtLeastiOSVersion(@"5.1")) {
  93. // do something for iOS 5.1 or greater
  94. }
  95. */
  96. #define IsAtLeastiOSVersion(X) ([[[UIDevice currentDevice] systemVersion] compare:X options:NSNumericSearch] != NSOrderedAscending)
  97. /* Return the string version of the decimal version */
  98. #define CDV_VERSION [NSString stringWithFormat:@"%d.%d.%d", \
  99. (CORDOVA_VERSION_MIN_REQUIRED / 10000), \
  100. (CORDOVA_VERSION_MIN_REQUIRED % 10000) / 100, \
  101. (CORDOVA_VERSION_MIN_REQUIRED % 10000) % 100]
  102. // Enable this to log all exec() calls.
  103. #define CDV_ENABLE_EXEC_LOGGING 0
  104. #if CDV_ENABLE_EXEC_LOGGING
  105. #define CDV_EXEC_LOG NSLog
  106. #else
  107. #define CDV_EXEC_LOG(...) do { \
  108. } while (NO)
  109. #endif