Search code examples
xcodebackground-mode

Background Mode doesn't be added in Xcode


I want to add Background Mode to use Location Updates but I can't. I already know the place of Background Mode but I don't know why it doesn't work.

https://drive.google.com/file/d/1A7CeRiios1vD51u3OmM1qTAs7AxVVmE6/view?usp=sharing

I recorded the situation so you can see it in that link.


Solution

  • I solved the problem by adding

    <key>UIBackgroundModes</key>
    <array>
        <string>location</string>
    </array>
    

    this code to Info.plist.