How do I send out individual push notifications through an iphone app?
The app is for a Gym. I would like it to allow individual push notifications to be sent from trainers to their clients. Is this possible? W开发者_JAVA技巧ould registering the app with user name and trainer after downloading have any effect?
If your goal is to initiate a push message from one iphone app and have it delivered to another iphone, then yes it is possible. Typically in this type of scenario, your application would upload an APN device token to a backend server for each client that logs into your application. The backend server would then associate that token to that particular user. If you want to be able to handle multiple devices per user, then you will want to also include a unique device id with this registration.
When the trainers are using the application, they would tell the backend server to send a push message to one or more clients. Your backend would then retrieve the tokens associated with the clients to which the message is to be sent and use the retrieved token to send the message(s) to Apple's APN interface.
Remember the APN token is specific to the mobile device and application.
精彩评论