This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Detecting Color of iPhone/iPod touch?
Is it at all possible to detect the color of an iPhone / iPod - either natively or in the mobile browser?
I'm working with a designer who would love to make a web app respond to the color of the device.
I don't think this is possible. The internal hardware (the "motherboard" keeping all the components together and the components themselves) is manufactured without any knowledge about the final casing. The same is true for the software (firmware and iOS), since all devices get an equal copy of exactly the same software, byte for byte identical, except for any serial numbers that might be embedded in the firmware. It might be the case that Apple uses different device serial number ranges for different casings, yet that is just a wild speculation.
It's like building a car: All components (engine, electronics, etc.) are equally manufactured, regardless with what color the final car will be coated. Actual the car is completely assembled, all hardware and all software, and ready to be used before it is color coated; and up to the last second the final decision how to color it may change.
UPDATE
I did some more investigations on this topic and I found out that the "wild speculation" is not as wild as I assumed it to be. It really seems to be the case that Apple uses different serial number ranges for different device colors. The serial number (as well as similar numbers, like the IMEI of iPhones) are the only parts of the device firmware that are different for each device manufactured.
Apple used the following serial number format in the past (not sure if this is still up-to-date, but it was still up-to-date for the iPhone 4):
AABCCDDDEEE
AA = ID of the factory that manufactured the device.
B = Year of production: 8=>2008, 9=>2009, 0=>2010, 1=>2011, etc.
CC = Week number of the year.
DDD = Production index number, is reset every week, base-34 encoded.
EEE = Model ID.
The interesting value is the "Model ID". The same device generation has different Model IDs depending on their color and the amount of available storage.
I haven't found any complete list of all the possible values, though. And even if there was such a complete list, you still have the problem that you need to keep it up-to-date, since Apple is constantly releasing new models, so the list could be out-dated any couple of months (at least once or even twice a year). Here are some sample values for the last 3 digits of the serial number (EEE):
VR0: iPhone 2G Silver 4GB
WH8: iPhone 2G Silver 8GB
0KH: iPhone 2G Silver 16GB
Y7H: iPhone 3G Black 8GB
Y7K: iPhone 3G Black 16GB
3NP: iPhone 3GS Black 16GB
3NR: iPhone 3GS Black 32GB
3NQ: iPhone 3Gs White 16GB
3NS: iPhone 3Gs White 32GB
A4S: iPhone 4 Black 16GB
A4T: iPhone 4 Black 32GB
I haven't found any sample values for the current iPod generations so far.
There's no API exposed for this.
If this is something you'd like Apple to add, you should file an enhancement request at http://bugreporter.apple.com .
Related
When releasing an iPhone application (a game in this case) is there anyway to limit its distribution to only iPhone 5 and above. I know that by using Sprite Kit I automatically limit myself to only iOS7, but I was not sure about the device.
I only ask as the game I am currently writing runs at 60fps on iPhone5/5S but drops to around 40fps in places when running on my iPhone4. I understand I would be loosing customers by doing this but I really want to limit the game to devices where the horse power is available to run the game at full speed.
From my initial research I am assuming this is not possible, but I just wanted to check here before I embark on adding iPhone4 support.
If your app is already listed on the app store you are pretty much stuck with what you already have. Changing required device capabilities cannot be done in app updates.
I have not read the details on each model but you could use UIRequiredDeviceCapabilities to put limits on what hardware specs needs. There are no entries for screen size but you could, for example, limit your app specs to only use the armv7 and armv8 processors which I believe are present on the iPhone 5, 5c & 5s.
UPDATE
Based on additional research and thanks to the comments of Steven Fisher, the answer to the question is that currently no restrictions of the asked type can be made.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
I developed a game using Cocos2d API for iPhone/iPod touch. My game supports normal graphics (480*320) and retina graphics (960*640).
Currently I have all my graphical resources packed in single projects, for example "LoadingScren.png" and "LoadingScreen#2x.png". I guess final release would have around 50MB (the game is not very big and not very complex).
Is this common scenario to have app prepared for normal graphics and retina?
I mean, "LoadingScreen.png" will never be used in Retina device and "LoadingScreen#2x.png" also will never be used by "normal" device! It's a waste of space.
Should I make two versions of the game?
But then, someone who has iPhone 3GS with non-hd version of the game, if lately they buy new iPhone 4/4S with retina support and restore data from backup to new device, they will remain with non-hd version on retina display (which is bad).
Any opinion and additional information regarding this matter is appreciated.
Only make one version of your app! Making a normal and #2x version of each graphic is how it is meant to be done.
When have you ever seen two versions of an app on the App Store, for "normal" or "retina" devices? The entire reason Apple implemented the automatic #2x system is so that you could package it in one app.
As for the "waste of space", don't worry about it. If your app is 50 MB, it means that even on the smallest-space iPhone (8gb) it uses about one-half of one-percent of storage - and nowadays Apple doesn't make any iPhones under 16gb. A quarter of a percent is hardly a high price to pay. Plus, most users could download a 50 mb game over WiFi in under a minute.
*(Often times "HD" versions on the App Store are references to iPad versions of an iPhone app)
Yes, it's normal to have just one version. Very normal. I've never seen an app with both retina and non-retina versions.
You could instead just use the high-res graphics and leave the scaling to the OS; this would reduce the footprint of the graphics by approximately 25%, at the cost of some clarity and slowing down non-retina devices (which would be pretty slow anyway). However, the time and cost of implementing all this has to be balanced against the benefit -- which is improved performance on very old devices. Until your app is as popular as Angry Birds, this extra effort probably buys you far less than it costs.
Different graphics are often provided for iPad (HD) versions of apps, but that's usually because the apps are designed for a different aspect ratio and screen resolution. Such apps already suffer from diverse ratings sets, which is one benefit of universal apps.
As others have said, only make one version. When a retina display device loads up an image, it automatically searches for a copy of that images with the "-hd" tag at the end. If it cannot find one, then it uses the normal picture.
You shouldn't be using "#2x" at the end of your image, as it can cause some errors when using cocos2d. Instead, use "-hd", which is designed for cocos2d.
Examples:
image_1#2x DON'T USE THIS
image_1-hd USE THIS
develop only one project using -HD images At The Staring Time Check Device And if it' iPhone Mean's(320,480) Then set image
image_Scale = scale/2;
Try This And Search on it.
Now more than one year passed since a retina display device appeared. Does anyone know some numbers how many users still suffer under the low-resolution devices? How long do they use their iPhones or iPods until they realize that a retina display is so much better?
I'm sick of having to create every graphic two times, trashing the binary with all these low-resolution files. I wonder if anyone has stopped supporting low resolution hardware without a big loss.
And: If I wanted to stop supporting low resolution devices, what kind of settings in the info.plist must I make? And what would happen if a low-res device still installs my retina-only app?
Why do people still use IE 6? or why do some people still have Windows XP? Simply b/c they can't afford new ones. Money is to blame. There is no simple answer as to when should you stop supporting certain technology. In the technology world you should usually wait for a big company (like Facebook) to stop supporting certain devices. Only those big sharks can force people to switch.
If you want your users to be happy and want your software to be great you should always support all available devices/versions if possible. Little work for you is a big benefit for your users.
In the end you don't have to do anything you don't want to. But your software will resemble it.
You can at least wait for Apple to stop providing iOS updates to low-resolution devices (i.e. iPhone 3G S) since it is capable of running iOS 5
Maybe its not possible right now as it isnt yet supported here.
But releasing your app with a iOS deployment target of iOS 4.2 may reduce the number of non-retina display users to a great extent.
And the main reason for users not switching to new devices is explained perfectly in the previous answer. :)
We have in store an app which displays a series of videos through HTTP Live Streaming. Due to the nature of this videos, and the screensize of the iPhone/iPod device, we have decided to leave behind everything that does not have retina display.
The reason? Well, this videos are encoded in high resolution, and even that we have encoded them in lower resolution, those videos are still a bit pixelated. Since is is a paid app, we don't want to charge iPhone 3G/s users for an app they're not gonna enjoy at most.
The problem now is that we have decided to make the app universal, so iPad users can enjoy the app without that crappy upscaling from emulation. The problem goes like this.
In order to leave behind iPhone 3G/s users from buying the app, we have set as required the front facing camera, but we do not use it, of course. Why? front facing camera = retina display ;) . The problem is with the iPad. We can do the same with the iPad 2, but not with the iPad 1.
So the question is...is there anyway so we can submit the app to be available to everyone except iPhone 3G/s (or iPod)??
You can put constraints on the App in the store, informing of the need for retina display or whatever device capability it needs (i.e., Camera [not on old iPod Touch], GPS, etc.). It does lead to bad reviews, but you cannot stop idiots in the world from buying a product. There have been plenty of cases brought to court where the plantiff is suing a home owner for being injured while breaking in or robbing the house and they won...I mean really?...don't let users who don't have common sense deter you from putting out a product.
To drop the iPhone 3G, you could add the magnometer as a required capability.
That still doesn't take care of the 3GS though...
You can make your app Universal, while maintaining the requirements. You should check two things:
The device is an iPad/iPad 2?
If not, does it have a camera?
Merging these two tests you can determine if the app is running on an iPad (2) or on a retina-display-powered device. It will just require a couple of lines of code more. Eg. test for:
UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad
I am making a game for iOS and it is almost finished, it runs smoothly on all devices except for the iPod Touch 2G.
I want to make sure that people with this device can't buy the game from appstore by accident or at least give them a pop-up warning when they try to buy it, saying that there can be performance issues.
I heard it's possible to exclude a device through the info.plist but I cant figure out how.
AFAIK, You cant prevent them from buying but you can add a note/disclaimer that the App will not work properly on iPod touch 2G. You can also detect the device as iPod 2G and display a warning when the App is run by the user.
the biggest difference (in typical runtime contexts) is the amount of physical memory.
in some cases, you can add support for the device by reducing the amount of memory you use.
the next to affect average apps is likely to be the processor speed.
investing some time into tuning your app to use less memory and reducing your cpu usage will work in most (but not all!) cases.
alternative:
the device is already out of the ios update cycle, you could require a minimum ios version (4.3 or greater).