Sending notifications from Mac to iPhone/ iPad/ iPod touch

后端 未结 1 1456
暖寄归人
暖寄归人 2021-01-06 20:12

I currently sell a Mac-only productivity tool that uses visual and audio notifications to remind the user of certain events taking place.

I\'ve started planning the

相关标签:
1条回答
  • 2021-01-06 20:35

    You'll need to implement APNs (Apple Push Notification Service) in both your app and your server.

    To clarify a few things:

    1. You'll need a server doing those transferring messages job between the user's Mac/PC and their iDevices.
    2. Your server will decide when to push what kind of notification to which user's device.
    3. After that, your server sends a message to Apple's APNs server, which will push that message on your behalf.
    4. It's absolutely OK that your app can be in the background or even closed when the APNs message arrives at the user's device. The user will be guided by the OS to open your app.
    5. If the user has explicitly disabled your app's APNs function in her/his device, or, if the user cancels the APNs alert when it arrives, your app won't be launched if it originally stays in the background or if it hasn't been open yet.
    6. The user will be asked to enable (as you put it, authenticate) your app's APNs function by the OS in her or his device when your app is launched for the first time.

    It's not a challenging task for an experienced iOS developer or an experienced PHP developer, since Apple's documents and APIs are pretty straightforward. However, configuration on the server side can be a little tricky.

    I believe Stack Overflow already has tons of information on how to enable APNs in iOS apps. All you need to do is be specific in your question and do the search work beforehand.

    Hope that helps.

    0 讨论(0)
提交回复
热议问题