Skip to content

fix(ios-stickers): inherit DEVELOPMENT_TEAM from main app target#303

Merged
hassankhan merged 4 commits intoexpo:mainfrom
safaiyeh:fix/stickers-development-team
Apr 8, 2026
Merged

fix(ios-stickers): inherit DEVELOPMENT_TEAM from main app target#303
hassankhan merged 4 commits intoexpo:mainfrom
safaiyeh:fix/stickers-development-team

Conversation

@safaiyeh
Copy link
Copy Markdown
Contributor

Summary

The sticker pack extension target is created without DEVELOPMENT_TEAM, which means developers have to manually select the development team in Xcode after every npx expo prebuild. This is easy to forget and causes confusing code signing errors.

This PR reads DEVELOPMENT_TEAM from the main app target's build configurations and applies it to the sticker extension target — both in the build settings (XCBuildConfiguration) and in the project-level TargetAttributes. This matches the pattern used by:

  • expo-share-intent — reads main target's DEVELOPMENT_TEAM and applies to share extension
  • @expo/config-plugins DevelopmentTeam module — applies team to all targets

Changes

  • Added getMainTargetDevelopmentTeam() helper that reads DEVELOPMENT_TEAM from the main app target's build configurations (filtering out Extension/Widget/Sticker targets)
  • Set DEVELOPMENT_TEAM in commonBuildSettings when available
  • Set DevelopmentTeam in TargetAttributes when available
  • Gracefully no-ops when no team is found (preserves current behavior)

Test plan

  • Existing tests pass (yarn test)
  • Package builds successfully (yarn build)
  • Verify with a real project: after npx expo prebuild --clean, the sticker extension target should have the correct development team without manual Xcode intervention

🤖 Generated with Claude Code

The sticker pack extension target was created without setting
DEVELOPMENT_TEAM, requiring developers to manually select the
team in Xcode after every prebuild. This follows the same pattern
used by expo-share-intent and Expo's own DevelopmentTeam utilities:
read the team from the main app target's build configurations and
apply it to the extension's build settings and TargetAttributes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@hassankhan
Copy link
Copy Markdown
Member

Hey @safaiyeh, thanks for the PR!

I think we can simplify this quite a bit by using IOSConfig.DevelopmentTeam directly from expo/config-plugins. The getMainTargetDevelopmentTeam() helper that scans build configurations by PRODUCT_NAME seems a bit fragile to me.

Instead, we can use expo/config-plugin's public API in withStickerXcodeTarget.ts:

import { type ConfigPlugin, IOSConfig, withXcodeProject } from "expo/config-plugins";

export const withStickerXcodeTarget: ConfigPlugin<
  Pick<Props, "stickerBundleId">
> = (config, { stickerBundleId }) => {
  return withXcodeProject(config, (config) => {
    ...

    addStickersTarget(
      config.modResults,
      stickerPackName,
      config.ios!.bundleIdentifier!,
      stickerPackName,
      stickerBundleId,
    );

    const teamId = IOSConfig.DevelopmentTeam.getDevelopmentTeam(config);
    if (teamId) {
      IOSConfig.DevelopmentTeam.updateDevelopmentTeamForPbxproj(
        config.modResults,
        teamId,
      );
    }

    ...

  }
}

This would read the team from config.ios.appleTeamId (the canonical source) and apply it to all native targets, including the newly-created sticker target.

@safaiyeh
Copy link
Copy Markdown
Contributor Author

safaiyeh commented Apr 7, 2026

Thanks @hassankhan for the review! I updated to use IOSConfig.DevelopmentTeam and added a unit test as well.

@safaiyeh
Copy link
Copy Markdown
Contributor Author

safaiyeh commented Apr 7, 2026

@hassankhan thanks, updated per your suggestions

@hassankhan hassankhan changed the title fix(ios-stickers): inherit DEVELOPMENT_TEAM from main app target fix(ios-stickers): inherit DEVELOPMENT_TEAM from main app target Apr 7, 2026
@hassankhan hassankhan merged commit 3ea7b43 into expo:main Apr 8, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants