I have an html5 canvas game, limited to 30FPS. This runs fine (#30FPS) on the iPad2 and the xcode simulator when set to iPad2.
However, when I set the simulator to "Retina" and run the app the FPS drop to 11FPS. I get roughly the same result when I do the following:
Let the simulator scale up my iPad2 images.
When I use CSS transorms to scale up my images.
when I JS to scale up my images (using pixelratio).
Interestingly, this 11FPS is also seen when I test it in the iPhone retina simulator (even though this app isn't built for the iPhone so it simply gets cut-off).
Are there any known issues with canvas and the xcode simulator? Are there any fixes or am I doing something wrong?
My hardware is Macbook Pro (mid 2012) with i7CPU and 8GB ram.
Thanks
J.
It's a simulator not an emulator, never expect accurate results from it, especially when it comes to hardware performance related issues. Test your app on a real device, if you get the desired frame rate on a real device, that is all that matters.
Now, why your simulator is doing this is somewhat interesting. My best guess is that the computer is having a hard time running your game at a higher resolution than your screen in a scaled down window... Once again, just my best guess.
Related
When it comes to simulator features what would be different between the iPhone 7 and the iPhone 8 simulators beside the device id? Why did Apple include both in Xcode?
You're unlikely to get an authoritative answer to any "why did Apple..." questions here — Apple as a corporate entity doesn't post to SO.
There aren't really notable simulator features different between iPhone 6, 6s, and 7, nor between the two generations of iPad Pro 12.9" hardware, nor between the various iPhone Plus models, etc. For the past few years of major Xcode releases, they've just included / let you create device-specific simulators for every supported device regardless of whether there's any meaningful difference between those devices at the level Simulator implements. (Of course there are lots of hardware differences that are outside the scope of Simulator, like Metal feature sets or camera features.)
Back before they started having device-specific Simulator profiles (around the time of Xcode 6, IIRC?), Simulator offered a smaller set of profiles mapping to the significant differences in screen geometry — e.g. iPhone 3.5", iPhone 3.5" retina, iPhone 4" retina, iPhone 4.7" retina, iPad, iPad retina, etc.
One issue with that, and a possible reason why Apple changed course, is that the increasing variety and history of Apple devices makes it harder to keep track of what's what in your head. (Okay, I want to see how my app works on iPhone 5s now. What screen size was that?) Another might be that UI size hasn't been directly tied to device size since 2014, where iPhone 6 and 6 Plus (and their successors) have offered a zoomed UI mode (which IIRC is also in Simulator).
Another issue is that there are device differences that don't map to screen differences, like 64-bit support (not that running a 64-bit app as an x86_64 binary in simulator is much like running an arm64 binary on a device, but it's a first approximation), Touch ID (which the simulator provides a proxy for), etc. And (as #russbishop's answer notes) the simulator also makes sure that APIs like uname return realistic values (like iPhone10,1 for iPhone 8) rather than a fictional simulated device.
If you'd rather cut down your set of available simulator targets in Xcode to only those that offer significant screen geometry differences, feel free to visit the Devices and Simulators window and delete/rename to your heart's content. For iOS 11 you could cut down to just iPhone 5s/SE/iPod Touch 6th gen, iPhone 6/6s/7/8, iPhone Plus, iPhone X, and three sizes of iPad screen, getting you eight different run destination instead of the default seventeen.
The answer is because the Simulator is attempting to be as accurate as it can. This ranges from returning the correct model identifier to differences in framework behavior. Sometimes there are new hardware features (eg Touch ID, Face ID) that are only available on the relevant simulators.
Please suggest me.How to solve this.
I got this reason from iTunes Store**"iPhone Apps must also run on iPad without modification, at iPhone resolution, and at 2X iPhone 3GS resolution"**
But I built in only for iPhone.
I got answer of my question.But i didn't change anything in my code.I submitted the same build to the AppStore.App store is accepted my same binary,This is worked for me.
In order to determine if your app is running in iPhone resolution on iPad, embed this code in you opening view controller class:
-(void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
NSLog(#"width = %f, height = %f", self.view.frame.size.width, self.view.frame.size.height);
}
If your app is displayed in iPhone resolution, you will see this in the output console:
width = 320.000000, height = 480.000000
I had the same app rejection reason and it turned out that in FACT my app WAS in iPhone resolution on the iPad, but in iPhone 4 resolution (which I didn't design it for) which made it look like it was in iPad resolution even though it wasn't. Apple has dropped support for the iPhone 4 with iOS 8 and will likely drop support for iPhone 4S with iOS 9, so I neglected to design the app for iPhone 4 which meant that some of my UI elements at the bottom of the screen were not visible on the iPad displaying iPhone 4 resolution. That was the reason for the rejection (really dumb since it's not even an iPad app).
This is what I got back from Apple Developer Technical Support:
While your app may be built for iPhone or iPod, it must still run on
iPad. Did you test your app on an iPad prior to submission? If you
don't have an actual iPad device to test with, many issues that lead
to a 2.10 rejection can be spotted by testing in the iPad simulator.
I'll go over a couple of the most common ones here:
1) Controls or Important Content That Underlap the Status Bar
If your app places controls or important content in the twenty points
below the top of the screen, they will be cutoff when the app is run
on a retina iPad [1]. This can lead to a poor user experience. Make
sure that your app positions controls and important content below the
status bar. You can use the topLayoutGuide property from within your
UIViewController instance to access the current status bar height.
You can also create Auto Layout constraints between the topLayoutGuide
and your view controller's subviews to ensure they remain positioned
below the status bar at all times.
https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/topLayoutGuide
2) Authoring Your Interface Specifically For the 4" Screen
Both the iPad and iPad retina simulate a retina 3.5" display when
running iPhone apps. This means that content positioned 480 points or
more below the top of the screen will not be visible when the app is
run on an iPad (or an iPhone 4, and iPhone 4s for that matter). This
can lead to a poor user experience. Make sure that you have designed
your interface to adapt to any height. This means either adopting
Auto Layout[2] or overriding
-viewWillLayoutSubviews/-viewDidLayoutSubviews in your view controllers to manually position your elements for the given screen
size. If your app displays more content than will fit on a 3.5"
screen, consider placing it in a scroll view.
https://developer.apple.com/library/ios/documentation/WindowsViews/Conceptual/UIScrollView_pg/Introduction/Introduction.html
Before we continue, please try running your app on either an iPad
device or the iPad simulator (both the regular and retina). See if
you can spot either of the above issues in your app. If you can't,
send me screenshots from your tests and we'll work from there.
[1]: When an iPhone app is run on a retina iPad, a 20 point black bar
is overlaid atop the app's window, obscuring any content underneath
it.
[2]: To get started with Auto Layout, you'll want to watch the
Introduction to Auto Layout for iOS and OS X session from WWD 2012
https://developer.apple.com/videos/wwdc/2012/?id=202 followed by the
Auto Layout by Example session from WWDC 2012
https://developer.apple.com/videos/wwdc/2012/?id=232.
Visual Effect View With Blur Doesn't work on iPad retina simulator. It does work with iPad air simulator. I am using Xcode 6.0; IOS8
Seems like an apple issue to me. Do you agree? Notice that Image is just transparent not blurred.
iPad Retina is 3rd generation iPad, which Apple has chosen not to have blur on, like iPad 2. This happened somewhere between the iOS 7.0 betas, presumably due to low performant GPU. It is the same with iOS 8.0/8.1. Use the Air simulator for blur effects. Notice that it is also 64-bit, so your code may behave slightly different depending on what you are doing.
I have just finished installed xCode 4.5 and have been trying to understand the new simulator. I want to test my app in the old screen size and new screen size. However when under the simulator I go to hardware and change the phone size to the 4 inch size, it changes the simulator to take up the full screen, has no home button, is zoomed in, and I have to scroll to navigate which is really frustrating and annoying.
From this
To this
Could someone tell me if this is meant to happen? I want to maintain the normal iPhone look with the simulator, that zoomed in scrollable simulator is terrible, looks horrible and makes debugging a pain. I am sure Apple would not allow something this poor looking to be the normal look for the simulator so I am guessing I am doing something wrong.
The other problem with it is, if I am on the home screen where I can see a list of custom apps under normal iPhone screen size, then change it to the 4 inch simulator screen size, the custom apps I installed on the simulator are not showing for some reason.
Any help would be much appreciated!!
Edit:
I found I change the scale of the simulator under window and changing it to 50 or 75%. However one problem remains, why is there no home button in the iPhone 5 simulator?
What computer are you working on ? I've got a 13'' MacBook and the same thing occurred to me. Some topics say it is related to your screen resolution, and if your screen is "too small" then the simulator won't see the need in a frame representing the physical device. See Nathan Gopen's answer in XCode 4.3.1 iPad simulator. (I also noticed that the frame disappears when you re-scale standard iPhone to 75% or 50%.)
If you need the home button you can find it in Hardware > Home Button, or Shift+Cmd+H. Yeah, I know, it sucks...
This Worked for me:
Go to Simulator Menu
Go to Hardware
Click Device
Click IPhone
This will restore the iPhone Simulator frame.
What worked for me was...
Go to XCode,
Open the main XCode menu option
Click on "Open Developer Tool"
Click on "iOS Simulator"
Change to the simulator you want by going to the "Hardware" menu.
Close the simulator
Run your project again.
XCode was crashing on me when I switched to the non-retina iPad option and this was my solution.
The simulator seems to remember the last hardware option that was chosen.
I don't think it's related to the screen resolution. I'm running it on 1920x1200 and it's the same. I guess it's simply to reduce effort for Apple since it's not essential for development to have a nice looking simulator. But yes, I agree I loved to see a virtual iPhone as simulator. And it was quite easier to produce screenshots of your Apps for your website.
Zooming or scrolling is of course not required on a 1920x1200 screen.
This just happened to me and I did spend a while trying to figure this one out.
By setting the scale to 100% my issue got fixed as Cal said above.
I think this is related to retina display setting ...
When I started the iOS simulator on my macbook pro (w/rd), the iPhone frame came up. I moved the frame over to my attached monitor and it stayed as an iPhone frame. I shut xCode down.
When I restarted, the iOS simulator started up on my attached monitor and lacked the phone frame, just showing the screen. Scaling up or down did not matter.
I moved the unframed screen over to my laptop screen again, and shut down the simulator. When I started it back up, it started on the laptop screen with the phone frame.
I don't think it is related to resolution so much as retina display.
Not sure if this is long term solution, but the following steps helped me.
Go to Windows >> Scale
Select different options as per your wish (I chose 75%)
I'm working on an Adobe Flash Builder 4.5 iPad application. I have only a humble 13" MacBook to work with.
I am being aggravated by the problem of debugging my application in the Flashbuilder's iPad simulator. The FB simulator screen is almost the same physical size as a real iPad, which is too big to fit on a 13" MacBook.
QUESTION: Is there some setting in Flash Builder 4.5 that would scale the iPad simulator to fit the available screen real estate?
Increase the resolution of your Macbook or use the physical device to do development. I don't think it's possible to 'scale' the emulator, nor would you want to.
While I don't know of a way for you to actually scale it, you can get around some of the problems by just rotating it (Command-R)