-
Notifications
You must be signed in to change notification settings - Fork 1
Reminders
Reminders are tasks that may be tied to a specific time or location. They are similar to calendar events may not necessarily span an exact period of time.
You can perform the same methods on a reminder as you would on an event, such as adding an alarm or setting a recurrence rule with, see below.
To add alarm
parameter to your reminder you need to create new ISN_EKAlarmDataRequest
and set there dueDate
or timeStamp
like this for example:
ISN_AlarmDataRequest alarm = new ISN_AlarmDataRequest(System.DateTime.Now);
To add recurrenceRules
parameter to your event you need to create new ISN_EKRecurrenceRuleRequest
and set there frequency
and interval
also you need set endDate
because if you what set it, it wil cause an error:
ISN_RecurrenceRuleRequest recurrenceRule = new ISN_RecurrenceRuleRequest(ISN_RecurrenceFrequencies.Monthly, 2, System.DateTime.Now);
You can create reminders using the ISN_EKEventStore.Instance.SaveReminder()
method. The title
paremeter required. Also you can set startDate
and endDate
parameters. An endDate
required if you will add recurrenceRules
.
Like events, reminders can trigger time-based alarms to alert the user of a certain task.
To save a reminder to the Calendar database, call the ISN_EKEventStore.Instance.SaveReminder()
like this:
EKEventStore.Instance.SaveReminder("Test reminder", System.DateTime.Now, System.DateTime.Now, alarm, recurrenceRule, (request)=>
{
if(request.Result.IsSucceeded)
{
Debug.Log("Yey, It's working! ID is - " + request.Identifier);
}
else
{
Debug.Log("We have error - "+ request.Result.Error.FullMessage);
}
});
This request will return ISN_EKSaveResult
object that contains Identifier
of created event or error. You can use this Identifier for removing this event, to do this you need to call ISN_EKEventStore.Instance.RemoveReminder()
method like this:
EKEventStore.Instance.RemoveReminder(m_ReminderID, (request) =>
{
if(request.IsSucceeded)
{
Debug.Log("We removed reminder!");
}
else
{
Debug.Log("We have error at removing reminder!");
}
});
Reliable and high-quality Unity Development service. Let's Talk!
Website | AssetStore | LinkedIn | Youtube | Scripting Reference
- Getting Started
- Authentication
- Game Center UI
- Leaderboards
- Default Leaderboard
- Achievements
- Saving A Game
- Access Point
- iTunes Connect Setup
- StoreKit Initialization
- Purchase flow
- Receipt Validation
- Store Review Controller
- Storefront API
- Subscription Offers