Is it possible to set holiday exclusion when I send local or push notifications on iOS?

Asked 2 years ago, Updated 2 years ago, 42 views

In order to notify users at the specified intervals in the iPhone app, we implement the notification display using local notifications and push notifications.

For example, an image that displays notifications at the designated time of every Monday and the designated time of the second and fourth Wednesday of every month.

I don't want to notify you every Monday, but I don't want to notify you if it's a holiday such as Happy Monday.

I tried implementing Xcode7+Swift2 with local notifications, but it seems that the above mentioned specification in repeatInterverl is possible, but I don't know how to exclude holiday notifications.

Some alarm applications (not iOS standard) seem to be able to exclude holidays, but I don't know how to do it.

Does anyone know?

ios

2022-09-30 20:19

1 Answers

Holidays vary from country to country (outside Japan) and change every year, so it's very complicated, so iOS doesn't have a standard holiday function.

Applications with holiday exclusion settings refer to their own holiday data.
It's not that difficult as long as it's only for Japan and some countries.

Japanese national holidays are decided by law every year, so basically you need to update the data every year.
If you incorporate data into your application, you will need to update it.

If you have network access, you may want to retrieve your data over the Internet.

As mentioned above, defining holidays is troublesome, so there are few general-purpose services, but there are some services that can be obtained through the API.

http://calendar-service.net/api.php

I think it's a good idea to use Google Calendar's holiday calendar.


2022-09-30 20:19

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.