Skip to content

Commit 3ea7b43

Browse files
safaiyehclaude
andauthored
fix(ios-stickers): inherit DEVELOPMENT_TEAM from main app target (#303)
* fix(ios-stickers): inherit DEVELOPMENT_TEAM from main app target 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> * refactor(ios-stickers): use DevelopmentTeam helper * refactor(ios-stickers): simplify development team handling * fix(ios-stickers): satisfy prettier lint --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent d971f37 commit 3ea7b43

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

packages/ios-stickers/src/withStickerXcodeTarget.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
import { type ConfigPlugin, withXcodeProject } from "expo/config-plugins";
1+
import {
2+
type ConfigPlugin,
3+
IOSConfig,
4+
withXcodeProject,
5+
} from "expo/config-plugins";
26

37
import { Props } from "./withStickerAssets";
48
import {
@@ -20,13 +24,16 @@ export const withStickerXcodeTarget: ConfigPlugin<
2024
const stickerPackName = getProjectStickersName(
2125
config.modRequest.projectName!,
2226
);
27+
const teamId =
28+
IOSConfig.DevelopmentTeam.getDevelopmentTeam(config) ?? undefined;
2329

2430
addStickersTarget(
2531
config.modResults,
2632
stickerPackName,
2733
config.ios!.bundleIdentifier!,
2834
stickerPackName,
2935
stickerBundleId,
36+
teamId,
3037
);
3138

3239
const stickersKey = addStickerResourceFile(

packages/ios-stickers/src/xcodeSticker.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ export function addStickersTarget(
9090
bundleId: string,
9191
subfolder: string,
9292
stickerBundleId?: string,
93+
developmentTeam?: string,
9394
) {
9495
// Setup uuid and name of new target
9596
const targetUuid = proj.generateUuid();
@@ -118,7 +119,7 @@ export function addStickersTarget(
118119
stickerBundleId ?? `"${bundleId}.${bundleName}"`;
119120
const INFOPLIST_FILE = `"${subfolder}/Info.plist"`;
120121

121-
const commonBuildSettings = {
122+
const commonBuildSettings: Record<string, string> = {
122123
ASSETCATALOG_COMPILER_APPICON_NAME: '"iMessage App Icon"',
123124
CLANG_ANALYZER_NONNULL: "YES",
124125
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION: "YES_AGGRESSIVE",
@@ -138,6 +139,10 @@ export function addStickersTarget(
138139
SKIP_INSTALL: "YES",
139140
TARGETED_DEVICE_FAMILY: `"1,2"`,
140141
};
142+
143+
if (developmentTeam) {
144+
commonBuildSettings.DEVELOPMENT_TEAM = developmentTeam;
145+
}
141146
// Build Configuration: Create
142147
const buildConfigurationsList = [
143148
{
@@ -268,6 +273,7 @@ export function addStickersTarget(
268273
proj.getFirstProject().uuid
269274
].attributes.TargetAttributes[target.uuid] = {
270275
CreatedOnToolsVersion: "12.5",
276+
...(developmentTeam ? { DevelopmentTeam: developmentTeam } : {}),
271277
ProvisioningStyle: "Automatic",
272278
};
273279

0 commit comments

Comments
 (0)