Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions plugins/withCheckInLiveActivity.js
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,12 @@ const withCheckInLiveActivity = (config, props = {}) => {

fs.writeFileSync(path.join(appDir, 'CheckInTimerActivityManager.swift'), ACTIVITY_MANAGER_SWIFT);
fs.writeFileSync(path.join(appDir, 'CheckInTimerActivityBridge.m'), BRIDGE_OBJC);
// The ActivityAttributes type must also be compiled into the MAIN APP target,
// not just the widget extension: CheckInTimerActivityManager.swift (app target)
// references CheckInTimerAttributes to start/update/end the activity. ActivityKit
// matches activities across app and widget by the attributes type name, so an
// identical copy compiled into each target is the supported pattern.
fs.writeFileSync(path.join(appDir, 'CheckInTimerAttributes.swift'), ATTRIBUTES_SWIFT);

return config;
},
Expand Down Expand Up @@ -521,6 +527,10 @@ const withCheckInLiveActivity = (config, props = {}) => {
// so the native module is linked at runtime.
const mainGroupKey = project.findPBXGroupKey({ name: appName });
const BRIDGE_FILES = [
// ActivityAttributes type — must compile into the app target so the
// activity manager can see CheckInTimerAttributes (also a member of the
// widget target via its own copy in CheckInTimerWidget/).
`${appName}/CheckInTimerAttributes.swift`,
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
`${appName}/CheckInTimerActivityManager.swift`,
`${appName}/CheckInTimerActivityBridge.m`,
];
Expand Down
Loading