Conversation
📝 WalkthroughWalkthroughThe PR configures iOS Live Activity entitlements and widget signing to be conditional and parameterizable. The plugin now accepts configuration options to control entitlement registration and team ID, app config conditionally enables this feature based on build environment, and the plugin generates widget-specific entitlements files with proper signing team resolution. ChangesLive Activity Entitlements Configuration
Possibly related PRs
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
app.config.ts (1)
227-233: ⚡ Quick winConsider sourcing
teamIdfrom env instead of hardcoding.Apple Team IDs aren't secret (they're embedded in every signed build), so this isn't a security issue, but everything else in this file reads configuration from
Env/ env vars (Env.BUNDLE_ID,Env.PACKAGE,Env.EAS_PROJECT_ID, …). Hardcoding'QKQVAJMTCN'here breaks that pattern and makes it harder to ship the project under a different Apple team without a code change. The plugin already falls back toprocess.env.EXPO_APPLE_TEAM_ID, so either route works.♻️ Suggested change
[ './plugins/withCheckInLiveActivity.js', { - teamId: 'QKQVAJMTCN', + teamId: Env.APPLE_TEAM_ID ?? process.env.EXPO_APPLE_TEAM_ID, enableLiveActivityEntitlement: Env.APP_ENV === 'production' || Env.APP_ENV === 'internal', }, ],(add
APPLE_TEAM_IDtoenv.js/env.tsalongside the other iOS settings).🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@app.config.ts` around lines 227 - 233, Replace the hardcoded Apple teamId used in the withCheckInLiveActivity plugin entry with a value sourced from environment configuration: change the teamId ('QKQVAJMTCN') to read from Env (e.g., Env.APPLE_TEAM_ID or existing Env variable pattern) and fall back to process.env.EXPO_APPLE_TEAM_ID if Env is not set; update env.js/env.ts to expose APPLE_TEAM_ID alongside other iOS settings so the plugin entry (the array containing './plugins/withCheckInLiveActivity.js' and the teamId property) uses the Env-provided value instead of a literal string.plugins/withCheckInLiveActivity.js (1)
462-483: 💤 Low valueTeam-ID resolution chain is sound; minor DRY opportunity.
Priority
props.teamId → host build setting → EXPO_APPLE_TEAM_IDis the right ordering, and the inline comment about EAS applying credentials after prebuild is exactly the gotcha that justifies the new prop.Optional nit: lines 469–480 re-walk
targetSection[hostTarget.uuid].buildConfigurationListand the first build configuration that you already resolved at lines 441–452 forMARKETING_VERSION/CURRENT_PROJECT_VERSION. You could readDEVELOPMENT_TEAMfrom the samefirstHostConfig.buildSettingsin that earlier block and drop this duplicated traversal.♻️ Sketch: fold team-id lookup into the existing host-config read
if (hostConfigList) { const firstHostConfigUuid = hostConfigList.buildConfigurations[0]?.value; if (firstHostConfigUuid) { const firstHostConfig = project.pbxXCBuildConfigurationSection()[firstHostConfigUuid]; if (firstHostConfig?.buildSettings) { hostMarketingVersion = firstHostConfig.buildSettings.MARKETING_VERSION || null; hostCurrentProjectVersion = firstHostConfig.buildSettings.CURRENT_PROJECT_VERSION || null; + if (!teamId) { + hostDevelopmentTeamFromProject = firstHostConfig.buildSettings.DEVELOPMENT_TEAM || null; + } } } } @@ - let hostDevelopmentTeam = teamId || null; - if (!hostDevelopmentTeam) { - const hostBuildConfigListId = targetSection[hostTarget.uuid].buildConfigurationList; - const hostBuildConfigList = project.pbxXCConfigurationList()[hostBuildConfigListId]; - if (hostBuildConfigList) { - const firstHostConfigUuid = hostBuildConfigList.buildConfigurations[0]?.value; - if (firstHostConfigUuid) { - const firstHostConfig = project.pbxXCBuildConfigurationSection()[firstHostConfigUuid]; - if (firstHostConfig?.buildSettings) { - hostDevelopmentTeam = firstHostConfig.buildSettings.DEVELOPMENT_TEAM || null; - } - } - } - } - if (!hostDevelopmentTeam) { - hostDevelopmentTeam = process.env.EXPO_APPLE_TEAM_ID || null; - } + const hostDevelopmentTeam = + teamId || hostDevelopmentTeamFromProject || process.env.EXPO_APPLE_TEAM_ID || null;(declare
hostDevelopmentTeamFromProjectnext tohostMarketingVersion).🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@plugins/withCheckInLiveActivity.js` around lines 462 - 483, The host DEVELOPMENT_TEAM lookup is duplicated; instead of re-traversing targetSection[hostTarget.uuid].buildConfigurationList, read DEVELOPMENT_TEAM from the same firstHostConfig.buildSettings you already obtained for hostMarketingVersion/currentProjectVersion (the variable names to look for: hostMarketingVersion, firstHostConfig, hostDevelopmentTeam), assign hostDevelopmentTeam = firstHostConfig.buildSettings.DEVELOPMENT_TEAM || null there, and then fall back to process.env.EXPO_APPLE_TEAM_ID only if hostDevelopmentTeam is still falsy; remove the later block that re-reads project.pbxXCConfigurationList()/pbxXCBuildConfigurationSection() to avoid the duplicate traversal.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@app.config.ts`:
- Around line 227-233: Replace the hardcoded Apple teamId used in the
withCheckInLiveActivity plugin entry with a value sourced from environment
configuration: change the teamId ('QKQVAJMTCN') to read from Env (e.g.,
Env.APPLE_TEAM_ID or existing Env variable pattern) and fall back to
process.env.EXPO_APPLE_TEAM_ID if Env is not set; update env.js/env.ts to expose
APPLE_TEAM_ID alongside other iOS settings so the plugin entry (the array
containing './plugins/withCheckInLiveActivity.js' and the teamId property) uses
the Env-provided value instead of a literal string.
In `@plugins/withCheckInLiveActivity.js`:
- Around line 462-483: The host DEVELOPMENT_TEAM lookup is duplicated; instead
of re-traversing targetSection[hostTarget.uuid].buildConfigurationList, read
DEVELOPMENT_TEAM from the same firstHostConfig.buildSettings you already
obtained for hostMarketingVersion/currentProjectVersion (the variable names to
look for: hostMarketingVersion, firstHostConfig, hostDevelopmentTeam), assign
hostDevelopmentTeam = firstHostConfig.buildSettings.DEVELOPMENT_TEAM || null
there, and then fall back to process.env.EXPO_APPLE_TEAM_ID only if
hostDevelopmentTeam is still falsy; remove the later block that re-reads
project.pbxXCConfigurationList()/pbxXCBuildConfigurationSection() to avoid the
duplicate traversal.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: feceef2c-d15b-4dbc-9b1d-efeae87b1ffe
📒 Files selected for processing (3)
.gitignoreapp.config.tsplugins/withCheckInLiveActivity.js
|
Approve |
Summary by CodeRabbit