I am trying to implement a scheduler function in my application using UIDatePicker and dateFormatter so that when a user select a date and time for the action to run on that specific date, the action should occur even if the app is closed, so how can I achieve same?
            Asked
            
        
        
            Active
            
        
            Viewed 75 times
        
    0
            
            
         
    
    
        Basem Hegazy
        
- 3
- 3
1 Answers
0
            It is not possible to (guaranteed) run specific code at a certain time if your app is not running.
It is possible to schedule a local NSNotification to inform the user. In case the user triggers your notification, your app is started / woken up by the OS and you can handle it. A nice notification guide can be found here
 
    
    
        Community
        
- 1
- 1
 
    
    
        shallowThought
        
- 19,212
- 9
- 65
- 112