iPhone: iPhone application testing - iphone

First, Thanks to all for your quick help for any questions asked in this forum.
I just want to know what are the testing tools coming up with Xcode on Mac as i need to test my iPhone application professionally (or) What do you suggest to use debug and test my application using any (or) built-in tools?
Thanks.

The first thing I try is Xcode's "Build and Analyze" menu command.
Next thing is to run Instruments and look for memory and object allocations and disposal. Instruments should keep you busy for quite a while as it can provide you a wealth of information, including network performance and graphics utilization.

When using instruments, the first method you should check is memory allocation and leaks. When your application leaks, it will spike. Click on this leak and then extend the details to find the exact whereabouts of the leak.
However read the documentation on it all first.
Documentation

Related

Separate Applications for iPad1-2 and iPad3-4

Is it possible to restrict applications to only run in iPad3 and iPad4?
I have an application which has memory leak, most probably on iPad 1-2.
I want to restrict my application.
Answering to your question, that's not possible right now, you can restrict the version of iOS, but not the device.
About your problem, as other people is saying, fix your code because you are leaking somewhere, you get the risk of Apple rejecting it too.
The best way to check it is analysing your code (Product > Analyze), also run the Instruments (Product > Profile) and check the memory leaks.
The best option is fixing your leak.
If you still want to restrict usage of your application you can use the UIRequiredDeviceCapabilities list. add a capability in your plist called auto-focus-camera. This functionality is available starting the 3rd generation iPad.
Keep in mind that this is not the best option
Here is the capabilities list sorted by device

How to add and use "ObjectAlloc" and "MallocDebug" in the instrument tool

I am trying to know memory allocated to each view in my App.I am doing it via instruments provided in Xcode.
When i am using instrument in xcode then i am able to see the Tools for leaks and allocation but i am unable to see "ObjectAlloc" and "MallocDebug" tools.
I searched this in the instrument library but it was not showing in the list.
So how to use that tool..
is there any better tool to know memory at each step in my app
Thanks and regards
These are older standalone apps that you seek, formerly distributed with Xcode.
ObjectAlloc: search "Allocations" in Instruments' Library.
MallocDebug: Generally, you'll just set these variables in Xcode's Product Scheme Editor, at Run PRODUCT > Diagnostics > Memory Management.
Options can be found here.

"Leaks Discovered" but not shown in detail via Instruments

I am attempting to obtain information on possible leaks that exist in the iPad app I am currently developing. Typically when Instruments finds a leak, a red 'peak' appears on the graph within the leaks section and I am able to obtain information on that leak within my code. Currently, Instruments is instead telling me "Leaks Discovered", but there are no peaks on the leaks graph and no details are shown. Any idea on why that might be?
Not sure unless there's more information but I generally use "Build and Analyze" and fix all the leaks it shows there and only then move on to Instruments. Try Build and Analyze to see if it shows any leaks there. If you're using Xcode 4, its just Analyze under Product.

Memory management in IOS application

I am developing an IOS application and i will submit it the next week the Apple store. but i am not very good in memory management.
I would like to know what are the all tools that you use to remove all the memory erros ( leaks,...).
should i remove all the NSLogs before submit it to the store ?
What are the other things to take care before submit it to the store ?
thanks for your answers
Before submitting to the app store..
Detect all leaks, you can use
a) Leaks (xcode->instruments->leaks).
b) Static analyzer tools, if you are using newer versions of xcode (Build-> build and analyze).
c) Above all , make a thorough check yourselves, that you arereleasing all memory that you are allocing/retaining..
What the need of NSLog in a
distribution build. NSLog helps in
debug..Remove them all..
Run your app in whatever iphone
device you get..Never submit an
iphone app to store without checking
on device itself.
If your app crashed during review,
then it is surely rejected. Resolve
all bugs/crashes before submitting.
A good QC on device is a must.
This checklist might be helpful..
The static analyzer and the instruments will help you detect the leaks. Find and resolve them. Have a look at Memory management it will help to resolve leaks.
In Xcode , Instruments -> Leaks, is used basically to find out memory leaks.
Hope this helps you.

What is a good performance profiler for iPhone games made w/ objective-C and XCode?

I'm writing an iPhone game in objective-C using XCode. I'd like to profile the performance of my code. What is a good profiler to use?
Have you tried Shark? it comes with the developer tools.
Apple provides a program called Instruments, which is included with the iPhone SDK download, that really is excellent. It allows you to view memory leaks, animation performance, and a bunch of other stuff.
The developer tools you downloaded also included a great app called Instruments. You'll find it in your Developer folder next to Xcode:
/Developer/Applications/Instruments.app
Instruments works great for profiling and also has some preset modes that you can use to track down memory leaks, view how many instances of various objects have been created, monitor your OpenGL performance, etc.
To use Instruments, just build your app in Xcode, then while still in Xcode, launch Instruments from:
Run > Start With Performance Tool > Instruments Templates
…then select the type of performance monitoring you'd like to do.
Shark is an incredible profiler, included as part of Apple's CHUD tools, with XCode. If you can get that to run in, say, the simulator, you will be extremely pleased with the results it provides.
Just wanted to plug a set of profiler macros I created for iPhone. You can profile in the traditional sense vs sampling w Shark. It also doesn't require any special tools and the output is saved to a file in your app's Documents folder.
http://code.google.com/p/iphone-quick-profiler/
.n