ios - How to use AdMob only if Deployment target is greater than 6.0? -
i want app support ios 5.0. admob has prerequisite deployment target @ least 6.0.
is there way compile app admob used devices running ios >= 6.0 ?
i ask because people have done similar apple watch can support lower deployment targets: ios7 , apple watch
/* * system versioning preprocessor macros */ #define system_version_equal_to(v) ([[[uidevice currentdevice] systemversion] compare:v options:nsnumericsearch] == nsorderedsame) #define system_version_greater_than(v) ([[[uidevice currentdevice] systemversion] compare:v options:nsnumericsearch] == nsordereddescending) #define system_version_greater_than_or_equal_to(v) ([[[uidevice currentdevice] systemversion] compare:v options:nsnumericsearch] != nsorderedascending) #define system_version_less_than(v) ([[[uidevice currentdevice] systemversion] compare:v options:nsnumericsearch] == nsorderedascending) #define system_version_less_than_or_equal_to(v) ([[[uidevice currentdevice] systemversion] compare:v options:nsnumericsearch] != nsordereddescending)
then use this
if (system_version_greater_than_or_equal_to(@"6.0")) { //do admob stuff } else { //don't admob stuff }
also link optional framework not available in ios < 6.0
p.s. macros taken this answer
Comments
Post a Comment