UE-72058 tvOS: Project Packaged with CloudKit Support Crashes on Launch Due to Malformed Value in the Entitlement

#jira UE-72058
#tvOS
#4.22.1
#rb Jack.Porter

Manually integrated (robomerge errors) from CL5731997

When building on Mac, the packaging &  signing rely on the entitlements file.

- the values should correspond to those in the entitlements (take into account syntax differences). Fixed problems related to icloud-container-identifiers, ubiquity-container-identifiers and com.apple.developer.icloud-services
- ICloudContainerIdentifier added to the tvOS plist (previously it was added on iOS)
- added com.apple.developer.icloud-container-environment to the entitlements file, needed when signing the package
- shipping build with CloudKit should also have the push notifications enabled
- fixed an issue with com.apple.developer.associated-domains when the value is a string, not an array
- addding CODE_SIGN_ENTITLEMENTS in the project file

#ROBOMERGE-OWNER: ben.marsh
#ROBOMERGE-AUTHOR: sorin.gradinaru
#ROBOMERGE-SOURCE: CL 5732468 in //UE4/Main/...
#ROBOMERGE-BOT: BUILD (Main -> Dev-Build)

[CL 5735338 by sorin gradinaru in Dev-Build branch]
This commit is contained in:
sorin gradinaru
2019-04-04 09:07:10 -04:00
parent 8f16fbf1d6
commit 53c4740675
4 changed files with 67 additions and 30 deletions

View File

@@ -1148,12 +1148,14 @@ namespace UnrealBuildTool
string TVOSInfoPlistPath = null;
string MacInfoPlistPath = null;
string IOSEntitlementPath = null;
string TVOSEntitlementPath = null;
if (bIsUE4Game)
{
IOSInfoPlistPath = UE4Dir + "/Engine/Intermediate/IOS/" + Config.BuildTarget + "-Info.plist";
TVOSInfoPlistPath = UE4Dir + "/Engine/Intermediate/TVOS/" + Config.BuildTarget + "-Info.plist";
MacInfoPlistPath = UE4Dir + "/Engine/Intermediate/Mac/" + MacExecutableFileName + "-Info.plist";
IOSEntitlementPath = "";
TVOSEntitlementPath = "";
}
else if (bIsUE4Client)
{
@@ -1161,6 +1163,7 @@ namespace UnrealBuildTool
TVOSInfoPlistPath = UE4Dir + "/Engine/Intermediate/TVOS/UE4Game-Info.plist";
MacInfoPlistPath = UE4Dir + "/Engine/Intermediate/Mac/" + MacExecutableFileName + "-Info.plist";
IOSEntitlementPath = "";
TVOSEntitlementPath = "";
}
else if (ProjectFile != null)
{
@@ -1168,6 +1171,7 @@ namespace UnrealBuildTool
TVOSInfoPlistPath = GamePath + "/Intermediate/TVOS/" + Config.BuildTarget + "-Info.plist";
MacInfoPlistPath = GamePath + "/Intermediate/Mac/" + MacExecutableFileName + "-Info.plist";
IOSEntitlementPath = GamePath + "/Intermediate/IOS/" + Config.BuildTarget + ".entitlements";
TVOSEntitlementPath = GamePath + "/Intermediate/TVOS/" + Config.BuildTarget + ".entitlements";
}
else
{
@@ -1193,6 +1197,7 @@ namespace UnrealBuildTool
else if (XcodeProjectFileGenerator.bGeneratingRunTVOSProject)
{
Content.Append("\t\t\t\tINFOPLIST_FILE = \"" + TVOSInfoPlistPath + "\";" + ProjectFileGenerator.NewLine);
Content.Append("\t\t\t\tCODE_SIGN_ENTITLEMENTS = \"" + TVOSEntitlementPath + "\";" + ProjectFileGenerator.NewLine);
}
else
{
@@ -1205,6 +1210,7 @@ namespace UnrealBuildTool
if (TVOSRunTimeVersion != null)
{
Content.Append("\t\t\t\t\"INFOPLIST_FILE[sdk=appletvos*]\" = \"" + TVOSInfoPlistPath + "\";" + ProjectFileGenerator.NewLine);
Content.Append("\t\t\t\t\"CODE_SIGN_ENTITLEMENTS[sdk=appletvos*]\" = \"" + TVOSEntitlementPath + "\";" + ProjectFileGenerator.NewLine);
}
}