Things to note about communication between programs and local notifications

Source: Internet
Author: User

Survey Web site for inter-program communication

Http://www.2cto.com/kf/201403/283996.html

Change the URL schemes corresponds to the name of the URL scheme

Nsurl's name is unified.

Nsurl * url = [nsurl urlwithstring:[nsstring stringwithformat:@ "invoked1:"]];

When searching, take the following: or the path;

Inter-Program Communication

1. You can create a local Cfmessageportref object via cfmessageportcreatelocal
2. It is very important that the Cfmessageport object is uniquely identified by a string, where the string is defined by the macro local_mach_port_name;
3. The Cfmessageport object is created with the callback function Onrecvmessagecallback of the port source event, which is used to handle the port source event;
4. Add the created object as an input source to the Runloop to listen for port source events and invoke the callback method specified in the previous step when Runloop receives the corresponding port source event;

Notification object (Nsnotification) control
Notifications are a design pattern for the iOS development framework that controls view and model interaction

******
Change the URL schemes corresponds to the name of the URL scheme

Nsurl's name is unified.

Nsurl * url = [nsurl urlwithstring:[nsstring stringwithformat:@ "invoked1:"]];

When searching, take the following: or the path;

Can not change: Bundle identifier

*******************************************************************************************
Local notifications
http://blog.csdn.net/l_ch_g/article/details/8767402
Http://www.cnblogs.com/kenshincui/p/4168532.html
Http://jingyan.baidu.com/article/48b37f8d1c1cfb1a65648869.html
The system only saves 64 local notifications
Local notifications can pass sound (sounds), badge (tags), text (text)
Support for Fierdate, reqeat, Interval
If the program does not start, it will show Text,sound,badge;
If the program is in use, no information is displayed, but-application:didreceivelocalnotification is called;
* * * In the background is unable to call-application:didreceivelocalnotification only the program in (active) Active state can be called; * *?

Local notification, which is used for notifications based on time behavior, such as small apps for calendars or Todo lists. In addition, if the app is executed in the background, iOS allows it to run within a limited time, and it will also find local notifications useful. For example, an application that runs in the background, gets a message to the server side of the application, notifies the user via a local notification mechanism when a message arrives, such as a prompt to download an updated version.

Local notifications are instances of uilocalnotification, and there are three main types of properties:

Scheduled time, which specifies the date and time when the iOS system sends notifications;
Notification type, which includes the warning message, the caption of the action button, the badge (digital marker) on the app icon, and the sound being played;
Custom data, local notifications can contain a dictionary type of local data.

Things to note about communication between programs and local notifications

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.