From cb1a801700fe851a7f5bc1649fb4e70cffe71f41 Mon Sep 17 00:00:00 2001 From: zx Date: Wed, 16 Oct 2024 20:26:54 -0400 Subject: [PATCH] fix: remove url schemes and applinks --- appdupe.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/appdupe.py b/appdupe.py index 98cef55..37a7ee7 100755 --- a/appdupe.py +++ b/appdupe.py @@ -103,11 +103,9 @@ # step 4: modify everything lol plist["CFBundleIdentifier"] = BUNDLE - - try: - del plist["UISupportedDevices"] - except KeyError: - pass # no worries if we don't have it ig + for key in ["UISupportedDevices", "CFBundleURLTypes"]: + if key in plist: + del plist[key] entitlements["application-identifier"] = f"{TEAM_ID}.{BUNDLE}" entitlements["com.apple.developer.team-identifier"] = TEAM_ID @@ -115,6 +113,10 @@ entitlements["com.apple.security.application-groups"] = [ f"group.{BUNDLE_TI}"] + # we don't want duped apps having associated applinks + if "com.apple.developer.associated-domains" in entitlements: + del entitlements["com.apple.developer.associated-domains"] + # step 5: write entitlements back to executable with open(ENT_PATH, "wb") as f: plistlib.dump(entitlements, f) # type: ignore