Best Practice Testing iOS Application Development Using Tools

It is interesting how the professional application provided to the client is such an elegant, smooth and less or less than the collapse of the application. because I always see that the problem is mainly due to a memory leak, NSZombie or not enough good performance.

I notice that fixing some issues with the Tool Tool. But I'm just familiar with memory leaks and the zombie pattern. Of course, I think there is another interesting tool for better tracking and fixing our application. (Using the system, testing automation, etc. Any ideas?)

My question is: What is the best strategy for drastically applying your application with tools? Recommend a tool template or any suggestion?

Share your experience and discuss!

* UPDATE: * Can I ask another question? Should I edit this question in a wiki? It should be more than the question of what we can share the strategy.

+4
source share
4 answers

Basically, I (about 98.2% of cases) use Leak and Distribution patterns. In addition, many people do not know, but in Xcode 4 you can start the application using tools directly from Xcode. In the top menu, select "Product" → "Profile".

Also - even when using ARC, you still need to understand how you use memory and how you allocate objects. Many times, ARC did everything in order, and yet a small change in programming in my code led to much less allocated objects. ARC will help you when writing code, but this is not an excuse for not testing and profiling your applications to make them as efficient as possible.

+3
source

Yes, tools are important. ARC alleviates some of the worst memory issues. Analysis (in the product menu) is also underestimated.

Check out Program 123, Improving the Stability of Your Applications at WWDC 2011 under the Applications section, which has a pleasant discussion of other issues that could affect the stability of your code (I especially think that the discussion of testing is good).

Finally, elegance is not a tool product, but a good design. An elegant product requires surprisingly much work. Declare HIG and the broader philosophical themes contained in it. Also, do code and design reviews with developers you respect.

+1
source

The CPU Sampler (Time Profiler) tells you where your program spends execution time. If your application is slow, this tool often helps you determine where the consumers of the problem time are, and (if you understand your program) how you can fix these problems.

Run this tool regularly to understand your programs, as well as the implementations behind the abstractions on which they depend - don't wait until a problem arises.


You can use the CPU sampler to record stop copies of your program streams. This is recorded at high frequency. The sampler displays information such as functions that take the most time and what percentage of the time they take. You can pay for libraries or functions for your subscribers, effectively choose the granularity you want, or hide what you cannot change. After you find the functions / methods you are interested in, you can view the source file in the Tools, and it will break what takes so long for you.

+1
source

Apple introduced a sweet called Automatic Reference Counting (ARC), which provides almost all of the memory management for you. You just need to set the weak / strong property parameter. And it fixes almost all problems with memory leaks. As for the tools - I do not know other applications than tools. Tools have everything ... Tools :) I need to do tests with.

0
source

Source: https://habr.com/ru/post/1410964/


All Articles