From e37ac12565ba1c6b64fa79b0e64af9dae622ba1e Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Fri, 19 Jun 2026 21:59:55 +0200 Subject: [PATCH] Fix macOS distribution entitlements and Sparkle beta defaults - Add macOS-specific entitlements via CODE_SIGN_ENTITLEMENTS[sdk=macosx*]: the iOS aps-environment key is silently dropped from macOS exports, leaving distribution builds without a push entitlement (no CloudKit sync pushes). Release now uses Yattee-macOS.entitlements with com.apple.developer.aps-environment = production. - Release-DeveloperID uses Yattee-macOS-DeveloperID.entitlements, adding the Sparkle mach-lookup temporary exceptions (-spks/-spki) required for the updater to install in a sandboxed app. - Default Sparkle updater to the beta channel while only beta releases exist, so testers receive updates without toggling Advanced settings. - Set NSHumanReadableCopyright for the app target. --- Yattee.xcodeproj/project.pbxproj | 5 ++++ Yattee/Services/Updates/SparkleUpdater.swift | 7 +++-- Yattee/Yattee-macOS-DeveloperID.entitlements | 27 ++++++++++++++++++++ Yattee/Yattee-macOS.entitlements | 22 ++++++++++++++++ 4 files changed, 59 insertions(+), 2 deletions(-) create mode 100644 Yattee/Yattee-macOS-DeveloperID.entitlements create mode 100644 Yattee/Yattee-macOS.entitlements diff --git a/Yattee.xcodeproj/project.pbxproj b/Yattee.xcodeproj/project.pbxproj index 3c00ba53..44ce97de 100644 --- a/Yattee.xcodeproj/project.pbxproj +++ b/Yattee.xcodeproj/project.pbxproj @@ -605,6 +605,7 @@ "INFOPLIST_FILE[sdk=appletvsimulator*]" = "Yattee/Info-tvOS.plist"; INFOPLIST_KEY_CFBundleDisplayName = Yattee; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.video"; + INFOPLIST_KEY_NSHumanReadableCopyright = "© 2026 Arkadiusz Fal"; INFOPLIST_KEY_NSLocalNetworkUsageDescription = "Yattee uses local network to discover and control playback on other Yattee devices."; "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES; @@ -653,6 +654,7 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; AUTOMATION_APPLE_EVENTS = NO; CODE_SIGN_ENTITLEMENTS = Yattee/Yattee.entitlements; + "CODE_SIGN_ENTITLEMENTS[sdk=macosx*]" = "Yattee/Yattee-macOS.entitlements"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 262; DEAD_CODE_STRIPPING = YES; @@ -687,6 +689,7 @@ "INFOPLIST_FILE[sdk=appletvsimulator*]" = "Yattee/Info-tvOS.plist"; INFOPLIST_KEY_CFBundleDisplayName = Yattee; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.video"; + INFOPLIST_KEY_NSHumanReadableCopyright = "© 2026 Arkadiusz Fal"; INFOPLIST_KEY_NSLocalNetworkUsageDescription = "Yattee uses local network to discover and control playback on other Yattee devices."; "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES; @@ -795,6 +798,7 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; AUTOMATION_APPLE_EVENTS = NO; CODE_SIGN_ENTITLEMENTS = Yattee/Yattee.entitlements; + "CODE_SIGN_ENTITLEMENTS[sdk=macosx*]" = "Yattee/Yattee-macOS-DeveloperID.entitlements"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 262; DEAD_CODE_STRIPPING = YES; @@ -829,6 +833,7 @@ "INFOPLIST_FILE[sdk=appletvsimulator*]" = "Yattee/Info-tvOS.plist"; INFOPLIST_KEY_CFBundleDisplayName = Yattee; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.video"; + INFOPLIST_KEY_NSHumanReadableCopyright = "© 2026 Arkadiusz Fal"; INFOPLIST_KEY_NSLocalNetworkUsageDescription = "Yattee uses local network to discover and control playback on other Yattee devices."; "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES; diff --git a/Yattee/Services/Updates/SparkleUpdater.swift b/Yattee/Services/Updates/SparkleUpdater.swift index 7caea2e7..5d6272e5 100644 --- a/Yattee/Services/Updates/SparkleUpdater.swift +++ b/Yattee/Services/Updates/SparkleUpdater.swift @@ -50,8 +50,11 @@ final class AppUpdater { private var observation: NSKeyValueObservation? private init() { - // Load persisted beta preference before constructing the delegate - let wantsBeta = UserDefaults.standard.bool(forKey: Self.wantsBetaKey) + // Load persisted beta preference before constructing the delegate. + // While only beta releases exist, default to the beta channel so + // testers receive updates without hunting for the Advanced toggle. + // Revisit this default once the first stable release ships. + let wantsBeta = UserDefaults.standard.object(forKey: Self.wantsBetaKey) as? Bool ?? true self.wantsBetaChannel = wantsBeta self.delegate.wantsBeta = wantsBeta diff --git a/Yattee/Yattee-macOS-DeveloperID.entitlements b/Yattee/Yattee-macOS-DeveloperID.entitlements new file mode 100644 index 00000000..4a455619 --- /dev/null +++ b/Yattee/Yattee-macOS-DeveloperID.entitlements @@ -0,0 +1,27 @@ + + + + + com.apple.developer.aps-environment + production + com.apple.developer.icloud-container-identifiers + + iCloud.$(CFBundleIdentifier) + + com.apple.developer.icloud-services + + CloudKit + + com.apple.developer.ubiquity-kvstore-identifier + $(TeamIdentifierPrefix)$(CFBundleIdentifier) + com.apple.security.application-groups + + group.stream.yattee.app.shared + + com.apple.security.temporary-exception.mach-lookup.global-name + + $(PRODUCT_BUNDLE_IDENTIFIER)-spks + $(PRODUCT_BUNDLE_IDENTIFIER)-spki + + + diff --git a/Yattee/Yattee-macOS.entitlements b/Yattee/Yattee-macOS.entitlements new file mode 100644 index 00000000..63983a82 --- /dev/null +++ b/Yattee/Yattee-macOS.entitlements @@ -0,0 +1,22 @@ + + + + + com.apple.developer.aps-environment + production + com.apple.developer.icloud-container-identifiers + + iCloud.$(CFBundleIdentifier) + + com.apple.developer.icloud-services + + CloudKit + + com.apple.developer.ubiquity-kvstore-identifier + $(TeamIdentifierPrefix)$(CFBundleIdentifier) + com.apple.security.application-groups + + group.stream.yattee.app.shared + + +