The enumeration case is UIBackgroundFetchResult.NoData , so the correct way is:
completionHandler (UIBackgroundFetchResult.NoData)
or even:
completionHandler (.NoData)
because the type can be inferred from the closure signature
Hint: if you are not sure about the function signature or enumerations, etc., enter the type in Xcode, in this case UIBackgroundFetchResult , then cmd + click on it to go to the definition, or click + on the pop-up window of its declaration. This usually helps.
source share