Skip to content

Commit 8077c08

Browse files
EvanBaconclaude
andcommitted
feat(targets): add file-provider, broadcast-upload, call-directory, message-filter
Add four new Apple extension target types with full registry entries, Info.plist generation, build settings, Swift templates, e2e fixtures, and updated documentation. Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent e316f2a commit 8077c08

16 files changed

Lines changed: 346 additions & 4 deletions

File tree

packages/apple-targets/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,10 @@ Ideally, this would be generated automatically based on a fully qualified Xcode
309309
| network-dns-proxy | DNS Proxy Network Extension |
310310
| network-filter-data | Filter Data Network Extension |
311311
| content-blocker | Safari Content Blocker Extension |
312+
| file-provider | File Provider Extension |
313+
| broadcast-upload | Broadcast Upload Extension |
314+
| call-directory | Call Directory Extension |
315+
| message-filter | Message Filter Extension |
312316

313317

314318
<!-- | imessage | iMessage Extension | -->
@@ -319,13 +323,9 @@ The following iOS extension types exist in Xcode but aren't supported yet. Contr
319323

320324
| Extension Point Identifier | Xcode Template Name |
321325
| --- | --- |
322-
| `com.apple.fileprovider-nonui` | File Provider Extension |
323326
| `com.apple.fileprovider-actionsui` | File Provider UI Extension |
324-
| `com.apple.broadcast-services-upload` | Broadcast Upload Extension |
325327
| `com.apple.broadcast-services-setupui` | Broadcast Setup UI Extension |
326-
| `com.apple.callkit.call-directory` | Call Directory Extension |
327328
| `com.apple.classkit.context-provider` | ClassKit Context Provider Extension |
328-
| `com.apple.identitylookup.message-filter` | Message Filter Extension |
329329
| `com.apple.identitylookup.classification-ui` | Unwanted Communication Reporting Extension |
330330
| `com.apple.photo-editing` | Photo Editing Extension |
331331
| `com.apple.printing.discovery` | Print Service Extension |

packages/apple-targets/e2e/__tests__/build.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,14 @@ const TARGET_REGISTRY: TargetEntry[] = [
9797
"Watch target requires AppIcon asset catalog which is not generated without an icon config",
9898
},
9999
{ type: "widget", dir: "widget", target: "widget" },
100+
{ type: "file-provider", dir: "file-provider", target: "fileprovider" },
101+
{
102+
type: "broadcast-upload",
103+
dir: "broadcast-upload",
104+
target: "broadcastupload",
105+
},
106+
{ type: "call-directory", dir: "call-directory", target: "calldirectory" },
107+
{ type: "message-filter", dir: "message-filter", target: "messagefilter" },
100108
];
101109

102110
// Derived from the central TARGET_REGISTRY — no need to maintain by hand.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{ "type": "broadcast-upload" }
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{ "type": "call-directory" }
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{ "type": "file-provider" }
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{ "type": "message-filter" }

packages/apple-targets/src/configuration-list.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -804,6 +804,10 @@ function getConfigurationListBuildSettingsForType(
804804
case "quicklook-thumbnail":
805805
case "spotlight":
806806
case "content-blocker":
807+
case "file-provider":
808+
case "broadcast-upload":
809+
case "call-directory":
810+
case "message-filter":
807811
return createNotificationContentConfigurationList(props);
808812
default:
809813
const exhaustiveCheck: never = props.type;

packages/apple-targets/src/target.ts

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,27 @@ export const TARGET_REGISTRY = {
170170
displayName: "Content Blocker",
171171
description: "Safari content blocker extension",
172172
},
173+
"file-provider": {
174+
extensionPointIdentifier: "com.apple.fileprovider-nonui",
175+
frameworks: ["UniformTypeIdentifiers"],
176+
appGroupsByDefault: true,
177+
displayName: "File Provider",
178+
},
179+
"broadcast-upload": {
180+
extensionPointIdentifier: "com.apple.broadcast-services-upload",
181+
frameworks: ["ReplayKit"],
182+
displayName: "Broadcast Upload",
183+
},
184+
"call-directory": {
185+
extensionPointIdentifier: "com.apple.callkit.call-directory",
186+
frameworks: ["CallKit"],
187+
displayName: "Call Directory",
188+
},
189+
"message-filter": {
190+
extensionPointIdentifier: "com.apple.identitylookup.message-filter",
191+
frameworks: ["IdentityLookup"],
192+
displayName: "Message Filter",
193+
},
173194
} as const satisfies Record<string, TargetDefinition>;
174195

175196
export type ExtensionType = keyof typeof TARGET_REGISTRY;
@@ -474,6 +495,39 @@ export function getTargetInfoPlistForType(type: ExtensionType) {
474495
"$(PRODUCT_MODULE_NAME).FilterDataProvider",
475496
},
476497
};
498+
case "file-provider":
499+
return {
500+
NSExtension: {
501+
NSExtensionPointIdentifier,
502+
NSExtensionPrincipalClass:
503+
"$(PRODUCT_MODULE_NAME).FileProviderExtension",
504+
NSExtensionFileProviderSupportsEnumeration: true,
505+
},
506+
};
507+
case "broadcast-upload":
508+
return {
509+
NSExtension: {
510+
NSExtensionPointIdentifier,
511+
NSExtensionPrincipalClass: "$(PRODUCT_MODULE_NAME).SampleHandler",
512+
RPBroadcastProcessMode: "RPBroadcastProcessModeSampleBuffer",
513+
},
514+
};
515+
case "call-directory":
516+
return {
517+
NSExtension: {
518+
NSExtensionPointIdentifier,
519+
NSExtensionPrincipalClass:
520+
"$(PRODUCT_MODULE_NAME).CallDirectoryHandler",
521+
},
522+
};
523+
case "message-filter":
524+
return {
525+
NSExtension: {
526+
NSExtensionPointIdentifier,
527+
NSExtensionPrincipalClass:
528+
"$(PRODUCT_MODULE_NAME).MessageFilterExtension",
529+
},
530+
};
477531
default:
478532
// Default: used for widget and bg-download
479533
return {

packages/create-target/src/__tests__/__snapshots__/createAsync.test.ts.snap

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,22 @@ module.exports = config => ({
3434
});"
3535
`;
3636

37+
exports[`getTemplateConfig should return a valid template for broadcast-upload 1`] = `
38+
"/** @type {import('@bacons/apple-targets/app.plugin').ConfigFunction} */
39+
module.exports = config => ({
40+
type: \\"broadcast-upload\\",
41+
entitlements: { /* Add entitlements */ },
42+
});"
43+
`;
44+
45+
exports[`getTemplateConfig should return a valid template for call-directory 1`] = `
46+
"/** @type {import('@bacons/apple-targets/app.plugin').ConfigFunction} */
47+
module.exports = config => ({
48+
type: \\"call-directory\\",
49+
entitlements: { /* Add entitlements */ },
50+
});"
51+
`;
52+
3753
exports[`getTemplateConfig should return a valid template for clip 1`] = `
3854
"/** @type {import('@bacons/apple-targets/app.plugin').ConfigFunction} */
3955
module.exports = config => ({
@@ -59,6 +75,14 @@ module.exports = config => ({
5975
});"
6076
`;
6177

78+
exports[`getTemplateConfig should return a valid template for file-provider 1`] = `
79+
"/** @type {import('@bacons/apple-targets/app.plugin').ConfigFunction} */
80+
module.exports = config => ({
81+
type: \\"file-provider\\",
82+
entitlements: { /* Add entitlements */ },
83+
});"
84+
`;
85+
6286
exports[`getTemplateConfig should return a valid template for intent 1`] = `
6387
"/** @type {import('@bacons/apple-targets/app.plugin').ConfigFunction} */
6488
module.exports = config => ({
@@ -83,6 +107,14 @@ module.exports = config => ({
83107
});"
84108
`;
85109

110+
exports[`getTemplateConfig should return a valid template for message-filter 1`] = `
111+
"/** @type {import('@bacons/apple-targets/app.plugin').ConfigFunction} */
112+
module.exports = config => ({
113+
type: \\"message-filter\\",
114+
entitlements: { /* Add entitlements */ },
115+
});"
116+
`;
117+
86118
exports[`getTemplateConfig should return a valid template for notification-content 1`] = `
87119
"/** @type {import('@bacons/apple-targets/app.plugin').ConfigFunction} */
88120
module.exports = config => ({

packages/create-target/src/__tests__/createAsync.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ const ALL_TARGET_TYPES = [
1919
"credentials-provider",
2020
"account-auth",
2121
"device-activity-monitor",
22+
"file-provider",
23+
"broadcast-upload",
24+
"call-directory",
25+
"message-filter",
2226
];
2327

2428
describe(getTemplateConfig, () => {

0 commit comments

Comments
 (0)