1. Go to Xcode and open your project.
  2. In your app target, navigate to Capabilities tab.
  3. Turn on Background Modes.