开发者

Prevent an iPhone app from running on iPad [duplicate]

开发者 https://www.devze.com 2023-03-01 01:27 出处:网络
This question already has answers here: Closed 11 years ago. Possible Duplicate: Prevent iPhone app to run on iPad
This question already has answers here: Closed 11 years ago.

Possible Duplicate:

Prevent iPhone app to run on iPad

开发者_C百科

Is it possible to prevent my iPhone app from running on an iPad, not even the X2 version.

Thanks


Here is Article about how Prevent iPhone app to run on iPad


Use UIDevice's model method to get device name in string.

NSString* deviceType= [[UIDevice currentDevice] model];

Possible examples of model strings are @”iPhone” and @”iPod touch”.

So you could get the model name in the starting of the application and could show the appropriate popup for showing like "Currently No supporting the iPad" and exit from the application.


In the plist settings, add Application requires iPhone environment and set the boolean to YES

0

精彩评论

暂无评论...
验证码 换一张
取 消