quick fix
This commit is contained in:
parent
8aa47319f2
commit
53539e5a67
3 changed files with 38 additions and 2 deletions
|
|
@ -8,7 +8,7 @@ import Foundation
|
|||
// Reads/writes playback state via App Group UserDefaults so the widget
|
||||
// can display current song info and the app can receive widget commands.
|
||||
//
|
||||
// App Group: "group.ca.dallasgroot.NavidromePlayer"
|
||||
// App Group: "group.com.navidromeplayer.shared"
|
||||
// Add this App Group capability to BOTH targets in Signing & Capabilities.
|
||||
// ──────────────────────────────────────────────────────────────────────
|
||||
|
||||
|
|
@ -40,7 +40,7 @@ let kWidgetCommandNotification = "ca.dallasgroot.NavidromePlayer.widgetCommand"
|
|||
/// Widget AppIntents call `enqueueCommand(...)` then post a Darwin notification.
|
||||
final class WidgetSharedState {
|
||||
|
||||
static let suiteName = "group.ca.dallasgroot.NavidromePlayer"
|
||||
static let suiteName = "group.com.navidromeplayer.shared"
|
||||
static let shared = WidgetSharedState()
|
||||
|
||||
private let defaults: UserDefaults?
|
||||
|
|
|
|||
10
Widget/NavidromeWidget.entitlements
Normal file
10
Widget/NavidromeWidget.entitlements
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.application-groups</key>
|
||||
<array>
|
||||
<string>group.com.navidromeplayer.shared</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
26
project.yml
26
project.yml
|
|
@ -46,6 +46,8 @@ targets:
|
|||
dependencies:
|
||||
- target: NavidromeWatch
|
||||
embed: true
|
||||
- target: NavidromeWidget
|
||||
embed: true
|
||||
- package: ZIPFoundation
|
||||
|
||||
# ─────────────────────────────────────
|
||||
|
|
@ -69,12 +71,36 @@ targets:
|
|||
WATCHOS_DEPLOYMENT_TARGET: "26.0"
|
||||
SKIP_INSTALL: true
|
||||
|
||||
# ─────────────────────────────────────
|
||||
# Widget Extension
|
||||
# ─────────────────────────────────────
|
||||
NavidromeWidget:
|
||||
type: appExtension
|
||||
platform: iOS
|
||||
deploymentTarget: "17.0"
|
||||
sources:
|
||||
- path: Widget
|
||||
excludes:
|
||||
- "*.entitlements"
|
||||
- path: Shared/Storage/WidgetSharedState.swift
|
||||
settings:
|
||||
base:
|
||||
PRODUCT_BUNDLE_IDENTIFIER: ca.dallasgroot.navidromeplayer.app.widget
|
||||
PRODUCT_NAME: NavidromeWidget
|
||||
GENERATE_INFOPLIST_FILE: YES
|
||||
INFOPLIST_KEY_CFBundleDisplayName: NavidromePlayer
|
||||
INFOPLIST_KEY_NSExtension_NSExtensionPointIdentifier: com.apple.widgetkit-extension
|
||||
CODE_SIGN_ENTITLEMENTS: Widget/NavidromeWidget.entitlements
|
||||
SWIFT_EMIT_LOC_STRINGS: "YES"
|
||||
SKIP_INSTALL: true
|
||||
|
||||
schemes:
|
||||
NavidromePlayer:
|
||||
build:
|
||||
targets:
|
||||
NavidromePlayer: all
|
||||
NavidromeWatch: all
|
||||
NavidromeWidget: all
|
||||
run:
|
||||
config: Debug
|
||||
test:
|
||||
|
|
|
|||
Loading…
Reference in a new issue