我有一个${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";
info.plist
文件进行本地化处理,但在我的项目中,我有本地化处理的InfoPlist.strings
文件。在这个InfoPlist.strings
文件中,代码$(PROCUDT_NAME)
被显示为一个字面字符串。 - Javier Torron Diaz