gpt4 book ai didi

objective-c - Objective C InfoPlist.strings 本地化 - 使用应用名称

转载 作者:行者123 更新时间:2023-12-05 07:31:23 25 4
gpt4 key购买 nike

我有一个 ${PRODUCT_NAME} 以便为我的所有目标引用应用程序名称。我想在 InfoPlist.strings 中使用它,以便在 CameraUsageDescription 和其他描述中使用目标名称。

如何在字符串中使用它?

像这样:

/* Localized versions of Info.plist keys */

"NSLocationWhenInUseUsageDescription" = "Allows geolocation to send your location in the chat or know which institutions and services are near you";
"NSContactsUsageDescription" = "To be able to talk with the contacts who have ${PRODUCT_NAME} we need to access your agenda";
"NSPhotoLibraryUsageDescription" = 'Allows ${PRODUCT_NAME} to access the gallery to be able to send photos through the chat';
"NSCameraUsageDescription" = "Allows access to the camera to make a photo and send it";
"NSContactsUsageDescription" = "To be able to talk with the contacts who have ${PRODUCT_NAME} we need to access your agenda";
"NSPhotoLibraryAddUsageDescription" = "Allows access to save the images received by the chat";

最佳答案

您可以使用 $(PRODUCT_NAME) 进行引用。 info.plist 中的应用名称。

例如:“$(PRODUCT_NAME) 需要相机权限。

它会像“YourAppName 需要相机权限。

关于objective-c - Objective C InfoPlist.strings 本地化 - 使用应用名称,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51823770/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com