Sunday, December 8, 2013

iphone

If you have a new job applications on notification, notify the user point jump page requires handling the work,
Beg you reach people with the big Xia is how to deal with co ~ ~ seek solutions
Reply:
This is the so-called push technology in iOS or local notification technology, LZ can access relevant information.

Reply:
cited a floor jiangyuaiqing reply:
iOS this is where the so-called push technology, or local notification technology, LZ can access relevant information.



I have to find some local notification information is written very simply, and only notice once ~ ~
Reply:
There are Apple's developer site specific demo you can see down under article on blogs to see if you can go to find before
Reply:
1: Device -> connection -> APNs get DeviceToken

2: Device -> connection -> Provider provides DeviceToken

3: Provider needs to push messages to detect generation Notification Information

4: Provider detect the message you want to push to push APNs
5: APNs to push the message to your phone

Configuration:

0 On the development machine to apply for a new certificate

1 App ID
generate the application and development centers in apple
2 Click the App ID back to the next screen, check Enable for Apple Push Notification service

3 Point Development Push SSL Certificate behind Configure, a pop-up interface directly point "continue", go to the next screen, CSR file an application before selecting step at 0, followed by down, you can generate a downloadable cer file

4 Double-click the cer file, you can see Apple Development with the keys in the Keychain Access. . .

5 in apple development center provisioning option to create a new profile for the just the appID, then download

6. Profile
connect the phone Provisioning Profiles in Riga, just enter the


Code:

Mobile terminal:

1 Registered enable push

[[UIApplicationsharedApplication] registerForRemoteNotificationTypes: (UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound)];

2.

/ / Use this to determine the procedure was not initiated by
push message- (BOOL) application: (UIApplication *) application didFinishLaunchingWithOptions: (NSDictionary *) launchOptions

/ / IPhone activation method
from the APNs server gets deviceToken- (Void) application: (UIApplication *) app didRegisterForRemoteNotificationsWithDeviceToken: (NSData *) deviceToken

/ / Register the push function returns an error message after the failure of the implementation of appropriate treatment
- (Void) application: (UIApplication *) app didFailToRegisterForRemoteNotificationsWithError: (NSError *) err



Online there is a program of development and testing of Provider:
PushMeBaby:
The method used is,
1; [. Cer file] copy Sign up for the SSL certificate file named apns.cer weight in
added to the Resources folder PushMeBaby2: deviceToken
Run, type acquired iPhone client3: Push
Device program to get the message to the appropriate symbol of success.
Reply:
4th floor of a remote message push it. . I have not swollen App Id generate a certificate?
Reply:
Waiting for one day

No comments:

Post a Comment