Skip to content

Run a virtual iPhone on an Apple Silicon Mac.

Swift

Carry location usage descriptions in vphone-launchpad

Lakr233eb1333853f95
diff --git a/VPhoneLaunchpad/Configuration/VPhoneLaunchpad.xcconfig b/VPhoneLaunchpad/Configuration/VPhoneLaunchpad.xcconfig
index 21328ddd..6838f2b5 100644
--- a/VPhoneLaunchpad/Configuration/VPhoneLaunchpad.xcconfig
+++ b/VPhoneLaunchpad/Configuration/VPhoneLaunchpad.xcconfig
@@ -14,5 +14,6 @@ LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/../Frameworks
// and tinted appearances. actool merges CFBundleIconName into the plist.
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon
// Same languages and String Catalog setup as VPhone.bundle: English source,
-// with zh-Hans, ja, ko and vi in VPhoneLaunchpad/Localizable.xcstrings.
+// with zh-Hans, ja, ko and vi in VPhoneLaunchpad/Localizable.xcstrings and
+// VPhoneLaunchpad/InfoPlist.xcstrings.
SWIFT_EMIT_LOC_STRINGS = YES
diff --git a/VPhoneLaunchpad/Resources/VPhoneLaunchpad.Info.plist b/VPhoneLaunchpad/Resources/VPhoneLaunchpad.Info.plist
index 626487e1..e5815b79 100644
--- a/VPhoneLaunchpad/Resources/VPhoneLaunchpad.Info.plist
+++ b/VPhoneLaunchpad/Resources/VPhoneLaunchpad.Info.plist
@@ -26,6 +26,16 @@
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
+ <!-- vphone-vm reads the host location for the guest. A VM started from
+ Launchpad can have Launchpad as its responsible process, so TCC shows
+ these descriptions from this bundle. Same text as VPhone.bundle,
+ localized by VPhoneLaunchpad/InfoPlist.xcstrings. -->
+ <key>NSLocationUsageDescription</key>
+ <string>Shares your location with the virtual iPhone so apps running inside it see the same location.</string>
+ <key>NSLocationWhenInUseUsageDescription</key>
+ <string>Shares your location with the virtual iPhone so apps running inside it see the same location.</string>
+ <key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
+ <string>Shares your location with the virtual iPhone so apps running inside it see the same location.</string>
<key>SMPrivilegedExecutables</key>
<dict>
<key>com.vphone.launchpad.helper</key>
diff --git a/VPhoneLaunchpad/VPhoneLaunchpad/InfoPlist.xcstrings b/VPhoneLaunchpad/VPhoneLaunchpad/InfoPlist.xcstrings
new file mode 100644
index 00000000..65d175b8
--- /dev/null
+++ b/VPhoneLaunchpad/VPhoneLaunchpad/InfoPlist.xcstrings
@@ -0,0 +1,108 @@
+{
+ "sourceLanguage": "en",
+ "strings": {
+ "NSLocationUsageDescription": {
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Shares your location with the virtual iPhone so apps running inside it see the same location."
+ }
+ },
+ "zh-Hans": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "将您的位置共享给虚拟 iPhone,使其中运行的应用能获取相同的位置。"
+ }
+ },
+ "ja": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "位置情報を仮想 iPhone と共有し、その中のアプリにも同じ位置情報を提供します。"
+ }
+ },
+ "ko": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "가상 iPhone과 위치를 공유하여 그 안에서 실행되는 앱이 동일한 위치를 사용하도록 합니다."
+ }
+ },
+ "vi": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Chia sẻ vị trí của bạn với iPhone ảo để các ứng dụng bên trong sử dụng cùng vị trí."
+ }
+ }
+ }
+ },
+ "NSLocationWhenInUseUsageDescription": {
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Shares your location with the virtual iPhone so apps running inside it see the same location."
+ }
+ },
+ "zh-Hans": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "将您的位置共享给虚拟 iPhone,使其中运行的应用能获取相同的位置。"
+ }
+ },
+ "ja": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "位置情報を仮想 iPhone と共有し、その中のアプリにも同じ位置情報を提供します。"
+ }
+ },
+ "ko": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "가상 iPhone과 위치를 공유하여 그 안에서 실행되는 앱이 동일한 위치를 사용하도록 합니다."
+ }
+ },
+ "vi": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Chia sẻ vị trí của bạn với iPhone ảo để các ứng dụng bên trong sử dụng cùng vị trí."
+ }
+ }
+ }
+ },
+ "NSLocationAlwaysAndWhenInUseUsageDescription": {
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Shares your location with the virtual iPhone so apps running inside it see the same location."
+ }
+ },
+ "zh-Hans": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "将您的位置共享给虚拟 iPhone,使其中运行的应用能获取相同的位置。"
+ }
+ },
+ "ja": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "位置情報を仮想 iPhone と共有し、その中のアプリにも同じ位置情報を提供します。"
+ }
+ },
+ "ko": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "가상 iPhone과 위치를 공유하여 그 안에서 실행되는 앱이 동일한 위치를 사용하도록 합니다."
+ }
+ },
+ "vi": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Chia sẻ vị trí của bạn với iPhone ảo để các ứng dụng bên trong sử dụng cùng vị trí."
+ }
+ }
+ }
+ }
+ },
+ "version": "1.3"
+}