unity-branch-deep-linking-attribution
unity-branch-deep-linking-attribution copied to clipboard
Overriding entitlement file
Hi,
Currently when adding the domains to the entitlements file on iOS you write your own file, which overwrites any pre-existing one as your script order is set to 900. This is hardly an edge case, as you know many people use a combination of different plugins in their Unity projects, many of which make changes to the xcode project in post-build processes.
Would you be able to check for an existing file in the project instead of adding your own? Here is a sample code from another plugin that handles this scenario:
#if UNITY_2018_2_OR_NEWER
var relativeEntitlementPath = project.GetBuildPropertyForConfig(targetGUI, "CODE_SIGN_ENTITLEMENTS");
if (relativeEntitlementPath != null) {
var entitlementPath = path + "/" + relativeEntitlementPath;
if (File.Exists(entitlementPath)) {
return entitlementPath;
}
}
#endif
I think it's really important that anyone writing unity plugins out there does so with the mindset that they will not be the only plugin in the project :)
Thanks!
That's a good suggestion. Logging a ticket to get this into a future sprint.