TemplateMacPlist
TemplateMacPlist
#Overview
name: TemplateMacPlist
The value of this variable can be defined or overridden in .ini config files. 1
.ini config file referencing this setting variable.
It is referenced in 4
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of TemplateMacPlist is to specify the template Info.plist file used for Mac game targets in Xcode projects. This setting variable is primarily used for configuring the build process for Mac applications developed with Unreal Engine.
This setting variable is mainly relied upon by the Mac platform-specific modules of Unreal Engine, particularly the MacPlatformEditor and MacTargetPlatform. These modules are responsible for handling Mac-specific project settings and build configurations.
The value of this variable is set through the Unreal Engine editor interface, specifically in the project settings under the “Xcode Project” category. It can be modified by users to point to a custom Info.plist template file.
TemplateMacPlist interacts with other variables such as TemplateIOSPlist, PremadeMacEntitlements, and ShippingEntitlements, which are all related to configuring Xcode project settings for different platforms and build configurations.
Developers must be aware that this variable is only applicable when building for Mac platforms and is conditionally used based on the bUseModernXcode flag. It’s important to ensure that the specified template file exists and contains valid plist content.
Best practices when using this variable include:
- Use a properly formatted and valid Info.plist template file.
- Keep the template file in a consistent location within the project structure, preferably under the “/Game/” directory.
- Regularly review and update the template file to ensure it meets the latest requirements for Mac applications.
- Consider version control for the template file to track changes over time.
- Test builds with custom templates thoroughly to ensure they don’t introduce any issues in the application’s behavior or capabilities on Mac platforms.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEngine.ini:3191, section: [/Script/MacTargetPlatform.XcodeProjectSettings]
- INI Section:
/Script/MacTargetPlatform.XcodeProjectSettings
- Raw value:
(FilePath="/Game/Build/Mac/Resources/Info.Template.plist")
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Developer/Mac/MacPlatformEditor/Private/XcodeProjectSettingsDetailsCustomization.cpp:24
Scope (from outer to inner):
file
function void FXcodeProjectSettingsDetailsCustomization::CustomizeDetails
Source code excerpt:
void FXcodeProjectSettingsDetailsCustomization::CustomizeDetails(IDetailLayoutBuilder& DetailLayout)
{
TemplateMacPlist = DetailLayout.GetProperty(GET_MEMBER_NAME_CHECKED(UXcodeProjectSettings, TemplateMacPlist));
TemplateIOSPlist = DetailLayout.GetProperty(GET_MEMBER_NAME_CHECKED(UXcodeProjectSettings, TemplateIOSPlist));
PremadeMacEntitlements = DetailLayout.GetProperty(GET_MEMBER_NAME_CHECKED(UXcodeProjectSettings, PremadeMacEntitlements));
ShippingEntitlements = DetailLayout.GetProperty(GET_MEMBER_NAME_CHECKED(UXcodeProjectSettings, ShippingSpecificMacEntitlements));
IDetailCategoryBuilder& PlistCategory = DetailLayout.EditCategory(TEXT("Plist Files"));
PlistCategory.AddCustomRow(LOCTEXT("InfoPlist", "Info.plist"), false)
#Loc: <Workspace>/Engine/Source/Developer/Mac/MacPlatformEditor/Private/XcodeProjectSettingsDetailsCustomization.cpp:118
Scope (from outer to inner):
file
function FReply FXcodeProjectSettingsDetailsCustomization::OnRestorePlistClicked
Source code excerpt:
}
TemplateMacPlist->SetValueFromFormattedString(TEXT("(FilePath=\"/Game/") + (FString)kDefaultMacResourcesFolder + TEXT("Info.Template.plist\")"));
// No need to copy iOS template, it uses generated plist
TemplateIOSPlist->SetValueFromFormattedString(TEXT("(FilePath=\"/Game/") + (FString)kDefaultIOSGeneratedFolder + TEXT("Info.Template.plist\")"));
return FReply::Handled();
#Loc: <Workspace>/Engine/Source/Developer/Mac/MacPlatformEditor/Public/XcodeProjectSettingsDetailsCustomization.h:26
Scope (from outer to inner):
file
class class FXcodeProjectSettingsDetailsCustomization : public IDetailCustomization
Source code excerpt:
FReply OnRestoreEntitlementClicked();
TSharedPtr<IPropertyHandle> TemplateMacPlist;
TSharedPtr<IPropertyHandle> TemplateIOSPlist;
TSharedPtr<IPropertyHandle> PremadeMacEntitlements;
TSharedPtr<IPropertyHandle> ShippingEntitlements;
};
#Loc: <Workspace>/Engine/Source/Developer/Mac/MacTargetPlatform/Classes/XcodeProjectSettings.h:84
Scope (from outer to inner):
file
class class UXcodeProjectSettings : public UObject
Source code excerpt:
*/
UPROPERTY(EditAnywhere, config, Category="Plist Files", meta = (EditCondition="bUseModernXcode", DisplayName = "Mac: Info.plist Template"))
FFilePath TemplateMacPlist;
/**
* The template info.plist used for iOS game targets
*/
UPROPERTY(EditAnywhere, config, Category="Plist Files", meta = (EditCondition="bUseModernXcode", DisplayName = "IOS / TVOS: Info.plist Template"))
FFilePath TemplateIOSPlist;