I have a fingerprint javascript to detect the screensize, the OS and the chip inside an iPhone.
For instance:
Mozilla/5.0 (iPhone; CPU iPhone OS 11_4 like Mac OS X)
available_resolution = 667,375
Apple Inc.~Apple A11 GPU
The problem though is that iPhone Xs Max and iPhone Xr have the same resolution as I see it, the same OS og same Apple chip. So how can I see the difference between iPhone Xs Max and iPhone Xr.
try window.devicePixelRatio - i tested the two devices on browserstack and the XS Max returned 3 and the XR returned 2
in my app i'm using it like this
if (window.devicePixelRatio === 3 && screen.height === 896) {
// is iphone XS Max
}
Related
There are some measured results available for certain older ios devices but I'm not able to find FOV numbers for newer models, specifically, iPhone 5s ~ 6s Plus and iPad 4 ~ iPad Pro. Also, the numbers listed on the above link don't match with some other calculated results.
I'm aware that FOV number can be read using the following API
NSLog(#"Camera's FOV is %f",myCamera.activeFormat.videoFieldOfView);
However, since I don't have all the models available at hand and the read numbers that are publicly available for some models also doesn't match measured/calculated results, I was wondering if there are reliable FOV numbers for most if not all iPhone/iPad models. Thanks.
I think you might want to take a look at
https://developer.apple.com/library/content/documentation/DeviceInformation/Reference/iOSDeviceCompatibility/Cameras/Cameras.html
Table 4-5 iPhone 8 / iPhone 8 Plus / iPhone X Front Camera
Table 4-12 iPhone 7 / iPhone 7 Plus Front Camera
Table 4-15 iPhone 6s / iPhone 6s Plus Front Camera
Table 4-17 iPhone 6 / iPhone 6 Plus Front Camera
Table 4-19 iPhone SE Front Camera
Table 4-21 iPad Pro 12.9-inch (2nd generation) / iPad Pro 10.5-inch Front Camera
Table 4-23 iPad (5th generation) Front Camera
That's about all the calculations of FOVs out there. Also, they are from apple so I believe they are reliable.
I am just starting to learn programming for the iPhone and I had a very general question.
I was wondering why is it that when I run my program in xcode, even though I am programming for iPhone 5, when I run the "iPhone 6.1 Simulator" instead of a iPhone 5 Simulator and iPhone 4 pops up?
I am on Mac OS X - 10.7.5
And Xcode version 4.6
Could it be because the apple id I used to download xcode with only has an iPhone 4 and not a 5?
Thanks for the help.
To change your simulator device to other screen resolutions go to Simulator - Device - Retina 4 inch (for iPhone 5) and Retina 3.5 inch for iPhone 4/4S. Use iPhone for iPhone 3GS resolution.
In the Window menu you can change the scale to fit your Mac's screen resolution. (I use 75% for iPhone Retina 3.5 inch).
I also suggest you download iOS 5.1 Simulator if you want to deploy apps for iOS 5.1 and up - it comes really handy and it actually does have some differences from iOS 6.
Choosing "iPhone 6.1 Simulator" is telling Xcode that you want to use the currently selected iPhone simulator with iOS 6.1.
To select the specific iPhone simulator you need to click on the Hardware then Device menu in the simulator.
Your Apple Id and your registered devices have nothing to do with this.
I have two iPhone devices: 3G and 3GS. My application always loads successfully on iPhone 3GS but on iPhone 3G it loads like 10% of tries (but it loads). I do not have any exceptions or zombies.
Can someone lead me to possible causes or suggestions to how can i find root cause of the problem?
There are many possibilities. One of them is the "Images". Are you using a lot of images? What are the resolution. Remember:
iPhone 4, ipod touch use XX#2x resolution (retina image: 640 x 960 px)
iPhone 3 without #2x (smaller resolution: 320 x 480 px)
If I have 300 640 x 960 images (for iPhone 4) and 300 1024 x 768 images for iPad, and I want to make a universal app, does the installed app on the iPhone include all the iPad specific images and vice-versa?
Seems like on many apps it would greatly increase the installed application size on different devices.
A universal app is a single application by definition, so it will include all your images.
Is there an iPhone4 simulator supporting the new RD 960x640 resolution included within the next release of the iPhone SDK / Xcode?
much appreciated.
Gary
Yes. It's supported. Simulator > Hardware > Device > iPhone 4
Maybe in the menu Hardware > Device of the simulator...
Available in the SDK4 beta, which is currently only accessible by iPhone Developer Program members.
edit: now available for all developers.