failed to get the task for process – while debugging iOS application

Just make sure you are using your development certificates while debugging the code on device. Production profiles neither have “get-task-allow” nor “Can be debugged” properties.