with all kinds of popular mobile operating systems to introduce the implementation of the push technology. Of course, our main goal is to discuss the Android push technology.
One, the push technology of iOS
Apple offers a perfect push for
Starting with iOS, you'll occasionally hear about MVC design patterns used in development. However, until now, there is no formal contact and use of the real MVC, the feeling of this year, the same as the white, MVC is in the study, after the understanding will come to share.On the push, the local relatively easy, online information will be many.About the remote push
, select Member Center-certificates, Identifiers profiles-certificates, then select Create Certificate, Types are divided into development and product. Take development For example, select Apple Push Notification service SSL (Sandbox), then next, select the previously generated support Push AppID, and then next, submit the CSR file that you created earlier, The
There is no doubt that the practice is better than android,ios in pushing. APNS (Apple push Notification service) is a messaging push from Apple. The principle is that third-party applications will be pushed to the user's information pushed to the Apple server, the Apple server through a unified system interface to
First, create a certificate1 Click the key icon2 in the menu bar, select: Keychain Access? Preferences? certificate tab, the following two items all select Close3 Generating a certificate request: Keychain Access? Certificate Assistant request a certificate from a certification authority4 Enter two e-mail addresses and a common name. The email address is your registered AppleID.A) Common name enter the name you registered on the Apple website, other names have not tried, do not know the line.b)
This is a creation in
Article, where the information may have evolved or changed.
Here's an example of an iOS message push implemented in the Go language
Package Mainimport ("FMT" "Github.com/virushuo/go-apns" "OS" "Time") Func main () {APN, err: = Apns. New ("Apns_dev_cert.pem", "Apns_dev_key.pem", "gateway.sandbox.push.apple.com:2195", 1*time. Second) If err! = Nil {fmt. Printf ("Connect error:%s\n", err
Document directory
(3) hybrid mode
IOS push is implemented in the following steps:
Create push SSL Certification
Register the push function on the IOS client and obtain the devicetoken
Use provider to send push messages to
other development is not much to say, directly say and push related.Open the bundle identifier option for the Info.plist file to fill in the app ID to configure the push certificateAPP ID fill inClick on Project, go to build Setting interface, swipe down, go to code Signing configure certificateConfiguring certificatesNeed to modify the app's capabilities in Xcode to open remote notificationsOpen remote no
] init]; }); return instance;} Push processing [registration message notification]-(void) Registerlocalnotification: (uiapplication*) application{ Application.applicationiconbadgenumber = 0;//Clears the number on the app iconKey: Plus version of control # if __iphone_os_version_max_allowed >= __iphone_8_0//The following line must only run under IOS 8. Th
! =Nil) {[[UIApplication sharedapplication]cancellocalnotification:notification]; Break; } } }}6. Call this method//Local notification callback function that is called when the application is in the foreground-(void) Application: (UIApplication *) application didreceivelocalnotification: (nonnull uilocalnotification *) notification{NSLog (@"notif:%@",
Push is a good solution for traffic consumption and power consumption caused by polling. on Android, although Google provides GCM (previously C2DM ), however, it is basically useless in China. Android applications basically set up push servers or use third-party push platforms. For example, Sina Weibo uses third-party push
Several value passing methods (attribute, proxy, block, Singleton, notification) and iosblock between iOS pages
How does the second view controller obtain partial information of the first view controller?For example, lable In the second interface displays the text in textField of the first interface.
This requires attribute value passing and block value passing.
Then how does the first View Controller obtai
Just made a use of the push function of the application encountered a number of problems the whole very depressed engaged for two days finally is to understand to share to everyoneThis post is mainly for the release of some of the issues of the product to synthesize some information on the web according to their own practice, but the test can also seeFirst of all, to thank those who share the spirit of the contribution of the people to make me this no
In the process of using the app. Will always receive very much message pushes. Today we are going to implement this feature. First, message push is divided into local message push and remote message push. The most frequent use of remote messages.But before you push the remote message. There are two prerequisites. You n
The working mechanism of iOS message push can be simply summed up:Provider refers to the push server for an iphone software, APNs is the Apple push Notification service abbreviation, is a server.Can be divided into three stages:Phase one: The application packages the message
The working mechanism of iOS message push can be simply summed up:Provider refers to the push server for an iphone software, APNs is the Apple push Notification service abbreviation, is a server.Can be divided into three stages:Phase one: The application packages the message
Original address: http://blog.csdn.net/showhilllee/article/details/8631734
Recently in the study of iOS push problem, encountered some problems, and finally sorted out. Put it here and share it with you.
the push mechanism of APNs
First, let's take a look at Apple's official explanation for the iOS
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.