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

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -