From 237f86017f4ac9c6eae4dcc6a2ed3e64e1be374a Mon Sep 17 00:00:00 2001 From: Vlad Shcherban Date: Fri, 6 Oct 2023 08:09:30 -0700 Subject: [PATCH] Apple: adding provisioning profile if iCloud was manually added --- platform/resources/CoronaPListSupport.lua | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/platform/resources/CoronaPListSupport.lua b/platform/resources/CoronaPListSupport.lua index 282042a06..91aa08af4 100644 --- a/platform/resources/CoronaPListSupport.lua +++ b/platform/resources/CoronaPListSupport.lua @@ -606,7 +606,7 @@ function CoronaPListSupport.generateEntitlements( settings, platform, provisionP t["com.apple.developer.icloud-container-identifiers"] = cloudKitContainers t["com.apple.developer.icloud-container-environment"] = ppEnt["com.apple.developer.icloud-container-environment"] -- Apple doesn't accept to app store with Development container env. even if it is in provisioning profile - if ppEnt["com.apple.developer.aps-environment"]=="production" or ppEnt["aps-environment"]=="production" then + if ppEnt["com.apple.developer.aps-environment"] or ppEnt["aps-environment"]=="production" then t["com.apple.developer.icloud-container-environment"] = {"Production",} end iCloudEnabled = true @@ -627,7 +627,15 @@ function CoronaPListSupport.generateEntitlements( settings, platform, provisionP end if platformSettings and platformSettings.entitlements then - ret = ret .. CoronaPListSupport.valueToPlistEntry(platformSettings.entitlements) + local pe = platformSettings.entitlements + if pe["com.apple.developer.icloud-container-identifiers"] + or pe["com.apple.developer.ubiquity-container-identifiers"] + or pe["com.apple.developer.ubiquity-kvstore-identifier"] + then + includeProvisioning = true + end + + ret = ret .. CoronaPListSupport.valueToPlistEntry(pe) end return ret, includeProvisioning