Skip to content

Commit

Permalink
Bri12415/display device location fix (#1742)
Browse files Browse the repository at this point in the history
* Replace deprecated plist entry and add whenInUse entry for ios DisplayDeviceLocation

* Add Info.plist for mac DisplayDeviceLocation for location permissions entries

* Add location permission entries to SampleViewer mac/info.plist

* Modify SampleViewer/mac/info.plist

* Remove old ios info.plist from DisplayDeviceLocation

* Add permission entry for ios/Info.plist
  • Loading branch information
bri12415 authored Jul 25, 2024
1 parent e2496ac commit bed672d
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ ios {
OTHER_FILES += \
$$PWD/Info.plist

QMAKE_INFO_PLIST = $$PWD/Info.plist
QMAKE_INFO_PLIST = $$PWD/ios/Info.plist
}

macx {
QMAKE_INFO_PLIST = $$PWD/mac/Info.plist
}

android {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
<true/>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Location required for application</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>Location required for application</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
Expand Down
31 changes: 31 additions & 0 deletions CppSamples/Maps/DisplayDeviceLocation/mac/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDisplayName</key>
<string>DisplayDeviceLocation</string>
<key>CFBundleExecutable</key>
<string>DisplayDeviceLocation</string>
<key>CFBundleGetInfoString</key>
<string>ArcGIS</string>
<key>CFBundleIdentifier</key>
<string>com.esri.DisplayDeviceLocation</string>
<key>CFBundleName</key>
<string>DisplayDeviceLocation</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>NSLocationUsageDescription</key>
<string>DisplayDeviceLocation requires location services</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>DisplayDeviceLocation requires location services</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>DisplayDeviceLocation requires location services</string>
</dict>
</plist>

6 changes: 3 additions & 3 deletions SampleViewer/iOS/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@
<string>NO</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSLocationAlwaysUsageDescription</key>
<string></string>
<key>NSLocationWhenInUseUsageDescription</key>
<string></string>
<string>Location required for application</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>Location required for application</string>
<key>NSPhotoLibraryUsageDescription</key>
<string></string>
<key>NSBluetoothAlwaysUsageDescription</key>
Expand Down
6 changes: 6 additions & 0 deletions SampleViewer/mac/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,11 @@
<true/>
<key>NSRequiresAquaSystemAppearance</key>
<string>true</string>
<key>NSLocationUsageDescription</key>
<string>Application requires location services</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Application requires location services</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>Application requires location services</string>
</dict>
</plist>

0 comments on commit bed672d

Please sign in to comment.