-
Notifications
You must be signed in to change notification settings - Fork 1
Events
Create a new event with the ISN_EKEventStore.Instance.SaveEvent() method of the ISN_EKEventStore class.
You can set some of the details include:
-
The event’s title with the
title. -
The event’s start and end dates with the
startDateandendDateparameters.+ -
The alarm associated with the event with the
alarmparameter. -
The event’s recurrence rule, if it is a repeating event, with the
recurrenceRulesparameter.
To add alarm parameter to your event 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 can set endDate like this for example:
ISN_RecurrenceRuleRequest recurrenceRule = new ISN_RecurrenceRuleRequest(ISN_RecurrenceFrequencies.Monthly, 2);Next to save event you need to call ISN_EKEventStore.Instance.SaveEvent() method:
EKEventStore.Instance.SaveEvent("Test event", 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 EKEventStore.Instance.RemoveEvent() method like this:
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