Posts

Showing posts from February, 2018

Delete the recursive alarms swift || Calender delete the reminders || EKEVENT delete the recurrence rule

Solution: In objective c you can do the following code to remove the recurrence rule of the reminders in the calender event. [ store removeEvent : eventToRemove span : EKSpanThisEvent commit : YES error :& err ];   SWIFT: objective If you tried the following it will not works try self . eventStore . remove ( calendarEvent_toDelete , span : . thisEvent ) The above is for removing the single reminder Try the below code it will works for recurrence rule. try self . store . remove ( calendarEvent_toDelete , span : . thisEvent , commit : true )

Fense based Notifications

Solution: You can schedule the events or reminders at the time of didenterregion in the geofencing method to trigger the current events at a particular place. You can remove the events at the time of didexittheregion in the geofencing method.

Alarm Example with Repeat || Reminder Example with Repeat || LocalNotification Repeat || GeoFencing Alarm

Alarm With Repeat daily,weekly or monthly: In Local Notification repeat will not be workout because iOS had restrictions for app must be 64 notifications.So we can achieve through calender events. But only one thing is we cannot have to goto the app when user clicks the notification because it will be generated and handled by the calender. We can schedule an event in the calender using our app and save the event identifier inside our app in DB or Coredata. After that if you want to edit the event using the identifier is easy. The below is the example Code: First you have to import the eventkit in your viewcontroller.Then add the below keys in the info.plist Privacy - Reminders Usage Description Privacy - Calendars Usage Description Then create new event using request access to the event. First you have to remember that event fromdate and todate are not for multiple days.It will be the event start and end within a single day.So don't confuse that. If you want t

Alarm example in calender

Solution: In default Calender you can schedule the events by EKEvent and EKAlarm.The below is an example for which you can set an alarm from today to next three days at your current time.I added 30 seconds buffer time for that you can test it easily. Example: import UIKit import EventKit class ViewController: UIViewController {     var yourReminderCalendar: EKCalendar ?     override func viewDidLoad() {         super . viewDidLoad ()          var e ventDB = EKEventStore . init ()         // Request access to calendar first         eventDB. requestAccess (to: . event , completion: { (granted, error) in             if granted {                 var e vent = EKEvent . init (eventStore: eventDB)         event. title = "New Event"         event. startDate = Date ()                 let end = NSCalendar . current . date (byAdding: . day , value: 3 , to: Date ());               event. endDate = end         event. isAllD

EKAlarm set custom sound Calender

Solution: It was not possible in EKAlarm. In that you can set notification tone in the default settings app.Instead of setting custom tone you can use localNotification to achieve that.But in LocalNotification you can set 64 alarms per app only.Also if you want to set repeat alarms the app gets hanged if more than an year you can set.

This bundle is invalid - Your archive contains paths that are not allowed: ( "AppThinning.plist" )

Solution : If you got the below error Dear developer, We have discovered one or more issues with your recent delivery for "APPName". To process your delivery, the following issues must be corrected: This bundle is invalid  - Your archive contains paths that are not allowed: ( "AppThinning.plist" ) Once these issues have been corrected, you can then redeliver the corrected binary. Regards, The App Store team Then you unchecked the stripe swift symbols option in the time of upload.Try new build with check the swift stripe symbols option it will works.

[EventKit] Error getting default calendar for new events: Error Domain=EKCADErrorDomain Code=1019 "(null)"

Solution : If you add the  NSCalendarsUsageDescription and NSRemindersUsageDescription in info.plist then it will be solved