Using UNIX commands in iOS code

Source: Internet
Author: User
after the SMS download is complete, you will need to restart the SMS app to see the downloaded SMS content. But in practice it is impossible for the user to restart the SMS app, all of which can achieve the same effect in the code.

Using the Unix command to end the text message process, when the user back to the text message page, the text message has actually restarted.

Define a file Unixcmd.c

The contents of the file are as follows:

? [CSharp]

? #include <stdio.h>

? #include <stdlib.h>

Voidkillsmsprocess ()?

{

? System ("Killall mobilesms");

?}

In the class that needs to call the method

? [CPP]

extern voidkillsmsprocess ();

And then call directly

? [CPP]?

Killsmsprocess ();

Using UNIX commands in iOS code

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: info-contact@alibabacloud.com 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.