SWIFT: how to run a function even when user kills the app
问题 I am using swift 2 and Xcode7 for iOS9. I want to know if I can maintain a function (that checks for something to delete) running "forever" even if the user kills the app? I am deleting contacts from the contact list according to some rules and time. It is running ok, but just with the app opened or in second plan. I want to make this app capable to delete those contacts even when the user kills it. 回答1: You can use background thread when user opens the app. But if the app will be terminated,