I am building an app for a delivery company where the vehicle drivers phones need to be notified when they are assigned new tasks(immediately), only if the task meets specific criteria.(so putting a long sound file in the push notification is not a solution)
I am able to process the task and generate a long(29s) notifying sound if the app is in the foreground or background by processing the push notification in application(application: UIApplication, didReceiveRemoteNotification userIno: [NSObject: AnyObject], fetchCompletionHandler completionHandler: (UIBackgroundFetchResult) -> Void)
However, this method is not called if the phone's screen is locked. Is there any way of processing received tasks when the phone screen is locked, without the user unlocking the screen?