Xcode iOS Simulator Questions - ios

I have two questions about the iOS Simulator in Xcode for my Unity game:
I am using latest version of all the software involved.
1) Why is it so slow? (I have tried the Cmd+T solution and it does
nothing. Note: The game runs smooth even on a real iPhone 4)
2) Why is the size of the iPad simulator screen bigger than my laptop screen? (I know you can
scale it, but just curious why Apple always tries to make our life
difficult)

When you run game on iOS simulator then your game image runs not completely running on your mobile hardware actually runs in compression mode so seems to be slow.
Having high resolutions Apple deceives have bigger number of pixels on their screen, so its not Screen size but it Screen pixels what we need to concern. And it is for creating more smooth effects on visuals for animation, it is to provide user better quality graphics, not to make your life difficult

Related

Why does my app display differently on the iPad than simulator?

I'm fairly new to developing. My app is graphic heavy with some animation using timers. I am testing on a 4th gen iPad retina. In simulator (Xcode 5) the timers I have going for animations run slower than on the iPad, and some other graphic features (like things fading in and out) don't work the same in simulator as the iPad build. Should I trust the iPad's build and not the simulator? Should I also test on different iPad models to check if the graphic animations run correctly on different models or are they likely to run the same?
I focus on UI art & have experience with making graphics rather than dealing with the Xcode environment itself, so any info about how programmed animation views display on different devices or different environments would be really helpful.
Rule one of developing apps: Always test on a hardware device
The hardware device has a ARM CPU for dealing with normal stuff like calculations and a GPU to accelerate the graphics. The GPU's on iOS devices are pretty powerful and comparable with GPU's of desktop computers a few generations back. Your simulator does not have that and will have problems rendering some of the more heavy stuff because it simulates the device and does not run directly on actual hardware.
I would also suggest that you check out the slowest device possible for the iOS generation you will be targeting in hardware. For instance an iPhone 3GS will still run iOS 6 applications. So if you are targeting iOS 6 or better and it runs well on that device, it will be doing fine on all others in terms of performance.

Is it necessary to create a retina version of an app?

Im creating an iOS game and I thought I was done until I test ran it on the iPad Retina simulator, and its extremely laggy. Is that a simulator glitch, or will it actually not work on the Retina iPad? I tried looking up if it was necessary and couldn't find an exact answer.
You shouldn't be using the simulator for making any kind of judgment around performance. It's a simulator, not an actual device. It doesn't represent the actual conditions you'll be experiencing in hardware, and there are vast differences in terms of graphics and the rendering pipeline. If you're not testing your app on a hardware device you're doing a disservice to your potential users.
Do bear in mind the vast majority of devices being sold right now are retina. Many graphically rich games are able to support the hardware, so I suspect what you're seeing is either a) due to the simulator, or b) can be fixed with some optimisation.
Yes it is (kind of). The appstore has regulations on retina apps. I think that they only accept retina apps and a lot of people use retina devices so it might be a good idea to make it retina.
No it is not necessary. It may look pixelate on a retina device but it is not necessary. However, many people use retina devices (just consider this). Retina is just for looks most of the time. Good luck on your game!
Edit:
I looked into the developer and appstore requirements. Apple needs you to have a retina version or you might be looking at a turned down app. Anyways, have fun with this and good luck!
Designing for Retina display
Building apps for Retina display involves creating two sets of images — one at 163ppi and another at 326ppi. After slugging our way through an app build or two, we feel confident that we have a decent workflow for attacking future Retina display app designs. Hopefully this information is of use to other designers
For More Information Please Check HERE1, HERE2
Yes you need your iOS game to run on all the devices glitch/lag free, when you go for publishing the application on the store it'll be turned down if it is not working on the retina version.
Possibly you are not using the images for retina display which are double the resolution
make sure resolution independence is turned on
design your artwork 2x as large as the actor (so a 100px actor should have artwork that is 200px)
ENSURE that all artwork is divisible by 4. (200/2 is 100, which is the size of the actor. 100/2 is 50 which is the pixel it will center on when placed in the game, you can't rest on .5 a pixel, it can turn out blurry)
Drag artwork into GS and program as normal.
I hope this solves your problem

If an app works on the iPad 2 is it necessary to test it on the iPad mini?

It may seem like you would always want to test your app on all devices that Apple offers: the iPad 2, iPad mini, and iPad 4. But its expensive or difficult to obtain all three devices and keep them around just for testing.
The iPad 2 and mini both have 512MB DDR2, use the 1GHz dual core A9, a Dual-core PowerVR SGX543MP2 and have the same screen resolution. It seems like its the same hardware all together.
Is there likely to be any difference between these two devices that could cause a problem with an app, other than the obvious physically smaller screen size?
Honestly it depends on what the app is. Like you said, screen size is different, but that may have a small effect on the usability of the app.
Other than that, I don't know. Sorry.

Do I really need lower-resolution images for older iOS devices?

I am developing an iphone application and i am using a background picture for my app. I know that before iphone 4 , the resolution of the screen was 480x320 and after 960x640. I read that i should use 2 images like : MyImage.png and MyImage#2x.png with the 2 different resolutions and the app will know which one to choose according to the phone. My question is very simple. If i just use the 960x480 , whats the difference? I am developing on an iphone 3gs and i am using this resolution and everything works perfect. So why have a small resolution for these phones?
The difference, in my opinion, is the following: the phone is going to resize the doubled-resolution to half the size, and this will lead to (1) the final image is not as smooth as if you would have exported it from a image application like Illustrator or Photoshop - at least from my own experience, when I export both resolutions, in non retina devices, the images don't look as good if I had exported the normal resolution. Also (2) the device will waste time/performance to make this conversion, although I don't know how much it is significant. And (3) finally, you may overload memory with no need, considering that the doubled sized images are bigger files, and you could use smaller files instead.
If you don't mind about this issues, you can go ahead. Try yourself.
If nothing else, the high-resolution images will tax the memory much more. One full-screen image at 320✕480 is around 600K in memory, whereas the 640✕960 is almost 2.5M, four times as much. On the older devices the memory is much more scarce than on the new ones and you might run into problems later in the development cycle, when there are more resources in play.
Even if you are able to test the app on all older supported devices and you can guarantee that there are no immediate performance problems or visual glitches, the app will take more memory, forcing the OS to kill other apps more frequently (= worse overall user experience).
if you use one version of image, (960x640) , there will be a memory overhead when the app run on non-retina. you dont need to display the high res in non-retina, only in retina display, making two versions of images .png and #2x.png will tell ios which image version it should load, depends on what device is currently in use.

A cocos2d program with low frame

I start a iPad game using cocos2d..
When I add a full screen image as its background, the frame decreases to 30..
Is there any way to improve it?
Did iOS Simulator cause this?
CCSprite *background = [CCSprite spriteWithFile:#"demoBackground.png"];
background.position = CGPointMake(winSize.width/2, winSize.height/2);
[self addChild:background];
try to run the app on the real iPad. I had similar issue with images for retina screen. On the simulator it was incredible slow (fps) but on the iPod was very smooth.
I have always found that FPS on Sim for Cocos projects is much lower than on device. You should never pay attention to FPS on a simulator. Always load your projects on a device. This isn't the only reason why. Consider memory usage. With the Sim, you can load all sorts of stuff, but your app may immediate crash on device because they have much less memory available. In general, test your apps on Device. Those natural Memory Warnings that iOS sends your app's delegate will only occur on Device as well, and it's very good to know when you've hit Level 2 warnings, and you won't see that in Sim (at least I never have).
I only use the Sim for testing general positioning and layout results with my code. I never test performance or interactivity on the Sim.
Are you measuring the framerate of the Simulator? That would render your question moot. Simulator performance is irrelevant and misleading as you're only measuring how fast your Mac can run the Simulator. All of your users will be running your app on a device.
On an actual device, a single fullscreen background image will not drop the framerate. You need to be doing a lot of other things as well to drop the framerate below 60 fps even on a 1st generation iPad.

Resources