UIViewController not present in allocations in Instruments heap shot analysis - ios

I'm using heap stack analysis techniques, as described widely on SO here
Everything makes sense, except for I'm trying to track down some UIViewController (subclasses) and they never show up in the allocations list (via parsing it or via search). Since most things in the app's lifecycle are going through VCs, and I can track down other objects allocated in them, I assume there's something I'm missing (...perhaps those are grouped under the much more broad malloc calls?)
I'm trying to track down an over-retained VC, so if anyone can provide useful insight, it'd be appreciated. Thanks!

I spent ages on this yesterday using the simulator, with iOS 8 and Xcode 6.3, with no joy. I think it's not symbolicating properly, hence all the mallocs. I think it's an Xcode bug, as it can't even attach to an iOS 7.1 simulator at all. It was working correctly with an iOS 8 device (8.3). Have you tried on a device yourself?
Have filed radar http://openradar.appspot.com/radar?id=4937802231840768

Related

How to debug multiple scenes loading at the same time in unity?

We have a really weird bug in out game where when we upload it into Beta and send it out through test flight, so phones play the game as intended and other phones have a weird issue pictured below:
From the image you can see the problem. One it does a ghosting type of thing with the characters as they move. Two, it acts like no scene is actually closing, but keeps stacking them on top of each other.
This problem does not occur on iPhone 6s or iPad Pro. It also doesn't occur on Android. We have only seen it on 5S and iPads.
We have looked at versions and that doesn't seem to be an issue either. We are using Unity 5.3 for this build (we reverted to this build as we felt it was the most stable, just to make sure that wasn;t an issue)
Anyone have an idea of what could be causing this problem?
Keep in mind that the things that are being seen are in different scenes.
in your camera settings you probably set clear flags to Dont clear set it to Depth only

XCode's Instruments for Core Animation keeps showing null

I am trying to see the fps of several UITableView in my iOS application.
Though following Apple's documentation, the core animation template keeps showing null. Other instruments seems working as expected. Is there any configuration I missed?
Thanks in advance.
ps. The environment is xCode 6.2 running iPhone 6 Simulator on iOS8.2
See here: https://developer.apple.com/library/ios/documentation/DeveloperTools/Conceptual/InstrumentsUserGuide/Instrument-CoreAnimation.html
Core Animation template
Library pane (only appears when an iOS device is connected)
I feel like this is Apple's way of saying this instrument only works on device. I tested it myself and it has only worked on device so far for me.
If you look here:
https://developer.apple.com/library/ios/documentation/DeveloperTools/Conceptual/InstrumentsUserGuide/Instrument-TimeProfiler.html
the time profiler, which does work on the simulator, does not have the same line about only appearing in the library pane when an iOS device is connected. So I think it is safe to say that Core Animation (and a few others like the Energy Usage Instrument) only will work with a device.

Swift SK game works correctly in simulator, labels missing in physical iPhone 5S (both iOS8)

I'm writing a game using sprite kit, first time so mistakes are inevitable :)
So running it in the simulator when certain events happen it's quite laggy (fps drops to 11 or less).
So I decided to see what happens on a real iPhone 5S.
Things run a little better: still lags at those events but not as badly.
However quite a few of my labels are missing: they appear fine in the Simulator but are completely missing in the physical device (just empty space where they should be).
Running ios8 in the simulator (5S) and on the 5S, code written in Swift.
Any hints at what I should look at?
Well, first you should try to isolate the problem. Try and see if the labels are indeed hidden or if they are behind a view. Download a hierarchy viewer such as Reveal App and try and find the UILabels. If they exist in both, the hierarchy viewer and the Simulator but not the physical iOS device, try and upload it to a different device. If it happens on the other device too, something is wrong with your code. We cant help unless we have something to work with. I recommend looking at https://stackoverflow.com/help/mcve to help with writing good questions.

iOS 5 with ARC - Avoid memory crashes

I am almost done programming a fairly large app which does a lot of talking with a backend, has a lot of caff sounds and displays several animations using sprite sheets. Every XIB files is connected with one ViewController and the project uses ARC and is targeted iOS 5.0.
Testing the app using my iPhone 5 and using the Simulator works fine. However while beta testing I noticed several people using an iPhone 4 (specially people running many background apps) experience crashes while using the app. The crashes mostly appears when doing animations.
So.. how do I go from here? I tried using instruments to check allocations and leaks. Almost none leaks are occurring, and to be honest, I have a hard time understanding how I can use the allocations measurement. I made all my IBOutlets _weak and also all my attributes to a big singleton used throughout the app to _weak.
How should I measure? How should I test that memory gets free'd as intended? How do I avoid these crashes related to low memory?

MapKit poor scrolling performance with Apple Maps in iOS 6

I am writing an app which displays a simple Apple Map across most of the screen. However, when I compare the speed of scrolling, there is a significant slow-down comparative to the native Apple Maps which come with iOS 6.
In my investigation of why, I noticed that the Facebook App (which also uses Apple Maps), the same performance hit is present.
This is most noticeable on iPhone 4 with iOS 6.
Does anyone know of a special view-related performance enhancing step or set of steps which I need to take to increase performance? I would like my maps to move as fluidly as the Apple Maps app.
I was having the same problem, and it looks like it could be due to having Development enabled on the device.
On the Apple Dev Forums I posted to ask about this for my problems (my post) and someone rightly reminded me that a lot of developers have been complaining about sluggish development devices.
So I went to the Organizer and Ignored my device from there, removing it as development enabled. I restarted the device and sure enough my MKMapView was a lot snappier. It was still sluggish at times, but the performance improved significantly.
Try it out for your device and see if you notice a difference.

Resources