init(identifier:)
Initializes a background activity scheduler object with a specified unique identifier.
Declaration
init(identifier: String)Parameters
- identifier:
A unique string, in reverse DNS notation, that identifies the activity. For example,
com.example.MyApp.updatecheck.niland zero-length strings are not allowed.
Return Value
A new background activity scheduler object of type NSBackgroundActivityScheduler.
Discussion
The string passed to the identifier parameter should remain constant for an activity across launches of your app because the system uses this unique identifier to track the number of times the activity has run and to improve the heuristics for deciding when to run it again in the future. See Create a Scheduler.