使用基本php提醒Apple iOS设备的通知

I have four notification settings as below :

1.Renew Tax
2.Renew Health Insurance
3.Renew Car Insurance
4.Renew Residential Insurance

If a user turn off any of the settings in their mobile phone NO notification will be sent to their mobile phone.

If a user turn on the setting to notify, then user will receive alert message just 4 days before payment as a reminder.

How will I write a web service in basic php to send notifications?

  1. Your cannot check if user disabled notification settings until (s)he starts an app.
  2. currentUserNotificationSettings will help you to check permissions on the start of the app.
  3. If the user disables notifications, push notifications from server won't come as well.
  4. Notifications from server are called push notifications. You should have an appropriate certificate and use either sockets, or existing internet-services which allow you to do so. If you want to do it in php: If you are interested, you may write your worn APN service, for example, use https://github.com/manifestinteractive/easyapns

In general, you have plenty of little tasks you need to do to achive your goal. Just write appropriate business logic of your app and search each item of the list.

First thing first,

  1. Add column in thables that will store the flags for each like renew_tax, health_insurance etc. Flags will be like "y or n".\
  2. Add column to store each user's GSM registration key ( for android) or token key (for iphone).
  3. Add crone job to to execute a file at evry midnight or littel after midnight.
  4. Crone file will select all the user whihc have flag set to yes. like to send notifcatiosn for "Renew Tax" check if its ys or no. Select only "yes"
  5. Now, in loop for above array, send notifcation for each user.
  6. Search code or sending notifcation from php to ios / android.