-1

i am building an application that is two parts. web and mobile. in brief i want to push a notification for the mobile user when a specific thing is received from the server.

for example, if the web user added a task for the mobile user, then: a notification on the mobile appears to inform the mobile user that there is something new in the app. (just like when using facebook)

any one can help me with implementing this?

Note: i configure my application to be apple to receive notifications and it do so.

this is how to push notification from the ios device to itself:

6.3. From the App

You can also send push notifications directly from a mobile application. Remember that you need to have enabled this feature in the Parse app's settings tab by selecting "Yes" under the heading "Client push enabled?". There are several methods that can be called to send push notifications. You can consult the full list in the iOS API documentation. Here is an example:

// Create our Installation query
PFQuery *pushQuery = [PFInstallation query];
[pushQuery whereKey:@"deviceType" equalTo:@"ios"];

// Send push notification to query
[PFPush sendPushMessageToQueryInBackground:pushQuery 
                           withMessage:@"Hello World!"];

any one knows how this can work ?? i can not import these methods !!!

4

1 回答 1

3

发送推送通知的 6 个简单步骤

1. Creating an App ID

2. Generating a Certificate Request

3. Configuring an App ID for Push Notifications

4. Make APNS certificates

5. Upload certificate to Admin panel

6. Create provision profile

另外,本教程在这里是很好的解释。

或者,如果您没有服务器,则可以使用iOS Push Notifications Using Parse来执行此操作

于 2013-11-01T07:15:41.490 回答