Since lemnar says you cannot use repeatInterval to repeat at a frequency other than Apple calendar units. So the code below:
if([InterValType isEqualToString:@"days"]){ notification.repeatInterval=result*24*60*60; }
Will do nothing. I also use repeated notifications in the application I created, and the way I got around is to create several notifications, each of which is repeated to give the “desired” frequency of repetition. For example, if I want to repeat "every 2 days", I cannot do this with repeatInterval. However, I have a “scheduling function” in my application that creates several separate notifications to achieve this. I do this by performing an arbitrary period of time (in my case, one week). Therefore, in the above example, when the user indicates that he / she needs a notification every two days from today, I create 3 notifications (one for day 3, 5 and 7).
To repeat at a frequency less than a calendar unit, things are a little easier. Say I need to repeat every 12 hours (at 6am and 6pm). Then I will create 2 notifications (one for 6AM and another for 6PM). Then I set repeatInterval for each of these notifications to NSDayCalendarUnit. So I created a set of notifications that repeat every 12 hours.
When my application loads, I exit after 7 days and update notifications as needed. Not the smartest solution, but it was the best way I could think of getting around the repeatInterval constraint.
source share