iPhone Simulator Intermittent Slowdown - iphone

Almost every time I use the iPhone Simulator, I get intermittent slowdowns. Everything is running smooth and then the whole UI randomly drops down to 1-5fps. View pushes, animations and everything related to the UI just becomes sluggish for 2-10 seconds. Then all of sudden it comes back to normal again.
I've googled this issue several times and just can't find a solution. My guess is that there's some 3rd party extension/plugin that's causing this slowdown, but I'm not sure how to debug this.
This has been the case for the last 4 SDK installations. Happens on all simulators (iPhone, iPhone 4 and iPad). Happens in my own apps as well as in Apple's stock apps (Photos, Safari, Settings) and even in the Home Screen.
This issue makes debugging/testing extremely annoying. Any guess what could be the issue?

Ended up deleting everything in the ~/Library/Application Support/iPhone Simulator folder. It had some really old folders back from the 3.0 days. Maybe some incompatibility, I'm not sure.
Haven't had the issue since.
EDIT: Nope, this is only a temporary fix. Still looking for a permanent solution.

I know it's been a while, but it seems like Xcode 4.2 fixed this for good.

I noticed some slowdowns in the simulator when FaceTime for Mac is running, but it's not as bad as you describe. Have you tried when nothing else is running on your Mac?

Total long shot: Are you using Core Location at all? (GPS Stuff)?
I have seen the same kind of behavior your are talking about when I turn location tracking on inside my simulated iPhone app.

Related

iPhone App Different Behaviour Archive Version Compared to XCode Debugging

I've got a frustrating problem here in that my iPhone app seems to run fine in XCode (running in the simulator or debugging it with iPhone plugged in), but archive versions act differently.
My sprites are supposed to perform movement only in a strict grid pattern and at constant speeds, but they are sort of skipping around and moving in unexpected diagonals.
I don't think it's IOS7-related because the problem doesn't manifest in the new version (7) of the simulator.
I never saw this problem in months of development and dev testing. It only seems to have started happening since I started producing and distributing archives.
App details:
Game, cocos2D
Hardware:
MacBook Air, iPhone5, IOS7
I ended up getting some help from someone on the Apple Developer Forums, but I'd like to update this posting as well, even though it's redundant.
I've been running XCode for over 2 years and I didn't realize build configurations could cause different behaviour.
By setting the Run scheme to use the Release build configuration I was able to re-create the problem on the device.
The problem still existed of course, but this posting I found suggested turning off compiler optimizations to solve a vaguely similar problem.
That did it. Somehow the calculations that occur to control sprite vectors in my application behave strangely with compiler optimizations turned on.

iPhone map tiling issue on device and iOS simulator

I have run into a very confusing situation with maps on the iPhone. Everything had been running without a hitch on a maps based app that I was developing, and then yesterday my device and the iOS simulators started exhibiting some bizarre behaviour where the tiles the app was fetching for the map did not line up with where they should be.
Here's a screenshot of what I am seeing.
This is happening on both my device (after a factory reset as well) and on the iOS simulator. I managed to fix the simulator by reinstalling Xcode, but this problem seems to be back! I can't for the life of me figure out what it could be.
I should note that I have tried clearing the map tiles cache and it would fix it for a while then the problem would start again.
Also I cleared the map tiles cache and then created an brand new MapKit app and the problem started again so I am sure it isn't my app causing it. It is happening also on the iOS 4 and 5 simulators.
Thanks so much for your help!
There have been quite some reports of people from the Japan area that this affects all devices in the area. Maybe this is the same thing in Australia as well. There is a lengthy apple discussion on https://discussions.apple.com/message/16630435 with affected people.

Is it a bad sign that an ipad app runs perfectly on the ipad but not in the simulator?

i've been developing an ipad app for quite some time now, all the previous versions run perfectly on both the simulator and the Ipad, but the newest version which is a major revamp of the app, runs super smooth on the ipad but has a lot of issues on the simulator (images not appearing, etc)
Is this a bad sign? Should i wait to make it work on both before submitting?
Thanks!
I would suggest that you be sure to test it on both versions of iPad and as many OS versions as you can. Be sure that you are running the same OS on both simulator and iPad (As I see in the comments that you say you are). Just to rule out any problems with using code that is incompatable with older OS's.
In general though, if your app is running fine on the hardware you shouldn't have anything to worry about. I would be much more concerned if it was the other way around.
It is almost always bad when an app does something you did not expect or design it to do. If you designed the app to run on both the Simulator and the iPad, and it doesn't run on one, there is possibly something seriously wrong with your design that could do other unknown things during app review, or worse, on many app user's devices (leading to lots of 1-star ratings).
Therefore you should figure out why something is going wrong, and preferably fix it (or at least understand what's happening well enough to determine how it will behave on your customer's iPads).
Some other suggestions:
make sure that both device and simulator are using the same internet connection
uninstall your app from simulator and device, and run clean on your project, and then do a fresh install

AVAudioPlayer: volume buttons work on some devices and not others

I have an app that uses AVAudioPlayer to play some embedded MP3 files. The volume buttons work reliably on the 3GS I mostly use for testing -- they worked under 4.1 and work now after upgrading to 4.3.1. On my boss's iPhone 4 running 4.2.1, they don't seem to work in our app at at all; and on the iPod Touch (also running 4.2.1) that's my secondary test machine, I've been able to get them to work once but can't reproduce how I did it.
I tried a hack I found, creating a dummy AVAudioPlayer at application startup but leaving it in prepareToPlay state, and found I was able to use the volume buttons on my initial screen, but once I was playing real audio they stopped working.
Anyone run into this? Any ideas why it works on some phones and not others?
Update: I updated the Touch to 4.3.1 and the problem went away. I assume therefore it's probably a bug in 4.2.1, but I'd still like to know if anyone's seen it and/or can point me to a bug report.
I had same problem. I found that the YouTube App was setting the default volume on the AVAudioPlayer. Found this with iPhone 4.3.3 so I am not sure if you are out of the woods yet.

App freeze and then crashes on splash screen

I have an iPhone App published for a while, developed under the SDK3, and everything works great. Some weeks ago, when Apple released the SDK4 I made some changes to my app to support multitasking (it plays audio in the background).
In my simulator and my device (iPhone 3GS iOS4) the app runs great, there is no problem at all. But, now when I submit the update, a lot of users are contacting me because they say that the app freezes on the splash screen and after waiting about 40-60 seconds, it crashes.
By asking to the users, I have determinate that the problem is only in those devices that haves iOS4 (iPhone 3Gs and 4G).
I tested the app over and over in my simulator and my device but it never happens to me!! Some one have any idea or information about this?
I will really appreciate it. Thanks.
After search for the crashes, and try over and over, I can't reproduce the bug on
my devices. So, I decide to start reading at the Apple Developer Forums and I
found a thread where my suspicions are affirmed: this problem is caused by an internal
iOS4 bug.
"There's a bug in the App Store's code signing process. Talk to DTS: they can
help you with the workaround. Mention rdar://7909951."
"...but it should be the cause of nearly all "failed to launch in time" inside
libobjc:_mapStrHash..." (This appears in some of my app crashes)
Here is the link to the post: failed to launch in time in iOS4
There is no certain solution, but some suggest that a start is changing from arm6 to arm7 and try.
You can try changing some code in the app for producing a different binary and submit it again.
I hope it can help anyone else.
Check the crash report on itunesconnect.apple.com
iPhone 3G also supports iOS 4, except it "doesn't support multitasking" (presumably due to lack of RAM?). If you're only seeing crashes on the 3GS and 4, then that might be the issue.
Default.png is shown on launch, but it's also shown on the foreground when the OS didn't manage to get a screenshot while backgrounding, or for various other reasons (e.g. your app was launched with openURL, so the UI is likely to be different).