I want to obtain the location service. According to the tutorial, I can't find the "Location When In Use" option in the "Capabilities" section.

Configure App services: In the "Capabilities" section, look for the "Location" option. If your application only needs to use the location function while it is in the foreground, check the "Location When In Use" option. If it needs to obtain location information even when it is in the background (such as a navigation application), then check the "Location Always and When In Use" option. After checking the relevant options, the system will automatically configure the corresponding permissions for your App ID.

I'm seeking for an answer.

In the „Capabilities“ secion you need to add the „background modes“ capability and here check the „location updates“ option.

And in the „Info.plist“ you have to either add the key NSLocationAlwaysAndWhenInUseUsageDescription or the keys NSLocationAlwaysUsageDescription and NSLocationWhenInUseUsageDescription. The value for these keys must be a string explaining why your App needs the location services.

I want to obtain the location service. According to the tutorial, I can't find the "Location When In Use" option in the "Capabilities" section.
 
 
Q