How to use scripts to turn off the VoIP app process in IOS 7

Source: Internet
Author: User
Tags command line

Background information

One feature of VoIP-type apps is the need to keep running in the background to be able to receive incoming calls at any time. Because of this special mechanism that the system provides to the VoIP process, we are unable to completely kill the VoIP process by killing command directly. For more detailed information on this point, refer to the following Apple Developer Web site Introduction:

"Because VoIP apps need to stay running in order to receive incoming calls, the system automatically relaunches the app if It exits with a nonzero exit code. (This type of an exit could happen when there are memory pressure and your app is terminated as a result.) However, terminating the app also releases all of it sockets, including the one used to maintain the VoIP service connect Ion. Therefore, when the ' app is launched ', it always needs to create its sockets from scratch.

In the details of the script to check the implementation of VoIP process, first spend a little space to say why we need to killing the VoIP process.

In iOS, you can use the instruments tool to start the application being tested and perform the automated test cases written by the UI Automation. Two times when the instruments is started, the following error is thrown at the console because the process has already been started: "Executable ' XXX ' is already running as process XXXX which were launched from" Launchd ' process. ' To avoid this error, you can only start one instruments at a time and run through all the automation cases. Because starting instruments at the command line, you can only specify a JS file to execute, so you can only encapsulate all the automation cases into this unique JS file. It's hard to meet the real needs. In reality, we have a large number of automation cases, the need for automation use cases by use case priority classification, according to the type of automation use cases exist in the corresponding JS file, so need to start multiple instruments to execute use cases. Therefore, we need to check the existing VoIP process before starting instruments.

Obviously, it is impossible for us to remove the VoIP process by manually clicking the main screen and sliding up the app icon while the automation script is running. Then let's take a look at our practice process.

Tools for Application

We combine the following tools:

Simulatetouch: Provides a way to click or slide a screen in a coordinate way

Activator: You can set the top status bar to activate multiple taskbar in any location

KillBackgroud7: Provide buttons in multiple taskbar, click this button to check all background processes

Autotouch: Can be used to record actions in the script, we mainly use this tool to view the coordinates

These tools are in the jailbreak of the iphone, can be downloaded through the Cydia.

Introduction to the practice process

First, we locate and click Activatorin the setup, then select and click Anywhere , select and click the top status bar , select and click to activate the taskbar, The purpose of these steps is to click on the top status bar to open the multiple taskbar page in any location. The steps above are shown in the screenshot below:

See more highlights of this column: http://www.bianceng.cn

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.