Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

可以获取IOS的具体型号吗? #36

Open
linlaoshi opened this issue Sep 6, 2017 · 10 comments
Open

可以获取IOS的具体型号吗? #36

linlaoshi opened this issue Sep 6, 2017 · 10 comments

Comments

@linlaoshi
Copy link

似乎不行,为什么不加上这个功能呢

@cz848
Copy link

cz848 commented Sep 6, 2017

你说的是iPhone的型号吧?

@linlaoshi
Copy link
Author

是的. 我需要获取大多数设备的物理尺寸,比如在不同的设备展现1厘米的尺子,,只要获取ppi应该就可以搞定.但是没有办法获取型号就不知道ppi了.折腾了好久也没有找到办法,大神可以指条路吗

@cz848
Copy link

cz848 commented Sep 6, 2017

1 ua里根本没有iPhone的型号,2获取设备屏幕尺寸很难吗?

@linlaoshi
Copy link
Author

物理尺寸很难

@linlaoshi
Copy link
Author

比如填充多少像素才是1厘米

@linlaoshi
Copy link
Author

涉及到PPI不是吗

@cz848
Copy link

cz848 commented Sep 9, 2017

PPI是可以查到的。从屏幕尺寸就可以知道大概型号,就可以查到对应的PPI。

@cz848
Copy link

cz848 commented Sep 9, 2017

看了下,除了6p,7p是401外,其它都是326(4以前忽略)。

@kevindu1993
Copy link
Contributor

楼上正解

@hanmingpan
Copy link

见过获取gpu型号来解决这个问题的
https://segmentfault.com/a/1190000010157682

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants