@bacons/apple-targets 3.0.7 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/target.js CHANGED
@@ -1,66 +1,280 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getAuxiliaryTargets = exports.getMainAppTarget = exports.isNativeTargetOfType = exports.getFrameworksForType = exports.needsEmbeddedSwift = exports.productTypeForType = exports.getTargetInfoPlistForType = exports.SHOULD_USE_APP_GROUPS_BY_DEFAULT = exports.KNOWN_EXTENSION_POINT_IDENTIFIERS = void 0;
4
- exports.KNOWN_EXTENSION_POINT_IDENTIFIERS = {
5
- "com.apple.message-payload-provider": "imessage",
6
- "com.apple.widgetkit-extension": "widget",
7
- "com.apple.usernotifications.content-extension": "notification-content",
8
- "com.apple.share-services": "share",
9
- "com.apple.usernotifications.service": "notification-service",
10
- "com.apple.spotlight.import": "spotlight",
11
- "com.apple.intents-service": "intent",
12
- "com.apple.intents-ui-service": "intent-ui",
13
- "com.apple.Safari.web-extension": "safari",
14
- "com.apple.background-asset-downloader-extension": "bg-download",
15
- "com.apple.matter.support.extension.device-setup": "matter",
16
- "com.apple.quicklook.thumbnail": "quicklook-thumbnail",
17
- "com.apple.location.push.service": "location-push",
18
- "com.apple.authentication-services-credential-provider-ui": "credentials-provider",
19
- "com.apple.authentication-services-account-authentication-modification-ui": "account-auth",
20
- "com.apple.services": "action",
21
- "com.apple.appintents-extension": "app-intent",
22
- "com.apple.deviceactivity.monitor-extension": "device-activity-monitor",
23
- // "com.apple.intents-service": "intents",
24
- "com.apple.networkextension.packet-tunnel": "network-packet-tunnel",
25
- "com.apple.networkextension.app-proxy": "network-app-proxy",
26
- "com.apple.networkextension.dns-proxy": "network-dns-proxy",
27
- "com.apple.networkextension.filter-data": "network-filter-data",
28
- "com.apple.keyboard-service": "keyboard",
29
- // "com.apple.intents-service": "intents",
30
- };
31
- // An exhaustive list of extension types that should sync app groups from the main target by default when
32
- // no app groups are specified.
33
- exports.SHOULD_USE_APP_GROUPS_BY_DEFAULT = {
34
- share: true,
35
- "bg-download": true,
36
- clip: true,
37
- widget: true,
38
- keyboard: true,
39
- "account-auth": false,
40
- "credentials-provider": false,
41
- "device-activity-monitor": false,
42
- "app-intent": false,
43
- "intent-ui": false,
44
- "location-push": false,
45
- "notification-content": false,
46
- "notification-service": false,
47
- "quicklook-thumbnail": false,
48
- action: false,
49
- imessage: false,
50
- intent: false,
51
- matter: false,
52
- safari: false,
53
- spotlight: false,
54
- watch: false,
55
- "network-packet-tunnel": false,
56
- "network-app-proxy": false,
57
- "network-dns-proxy": false,
58
- "network-filter-data": false,
3
+ exports.getAuxiliaryTargets = exports.getMainAppTarget = exports.isNativeTargetOfType = exports.getTargetInfoPlistForType = exports.getFrameworksForType = exports.needsEmbeddedSwift = exports.productTypeForType = exports.SHOULD_USE_APP_GROUPS_BY_DEFAULT = exports.KNOWN_EXTENSION_POINT_IDENTIFIERS = exports.TARGET_REGISTRY = void 0;
4
+ exports.TARGET_REGISTRY = {
5
+ widget: {
6
+ extensionPointIdentifier: "com.apple.widgetkit-extension",
7
+ frameworks: ["WidgetKit", "SwiftUI", "ActivityKit", "AppIntents"],
8
+ appGroupsByDefault: true,
9
+ displayName: "Widget",
10
+ description: "Home screen widget",
11
+ },
12
+ "notification-content": {
13
+ extensionPointIdentifier: "com.apple.usernotifications.content-extension",
14
+ frameworks: ["UserNotifications", "UserNotificationsUI"],
15
+ displayName: "Notification Content",
16
+ },
17
+ "notification-service": {
18
+ extensionPointIdentifier: "com.apple.usernotifications.service",
19
+ displayName: "Notification Service",
20
+ },
21
+ share: {
22
+ extensionPointIdentifier: "com.apple.share-services",
23
+ needsEmbeddedSwift: true,
24
+ appGroupsByDefault: true,
25
+ displayName: "Share Extension",
26
+ },
27
+ intent: {
28
+ extensionPointIdentifier: "com.apple.intents-service",
29
+ needsEmbeddedSwift: true,
30
+ frameworks: ["Intents"],
31
+ displayName: "Siri Intent",
32
+ },
33
+ "bg-download": {
34
+ extensionPointIdentifier: "com.apple.background-asset-downloader-extension",
35
+ needsEmbeddedSwift: true,
36
+ appGroupsByDefault: true,
37
+ displayName: "Background Download",
38
+ },
39
+ "intent-ui": {
40
+ extensionPointIdentifier: "com.apple.intents-ui-service",
41
+ needsEmbeddedSwift: true,
42
+ frameworks: ["IntentsUI"],
43
+ displayName: "Siri Intent UI",
44
+ },
45
+ spotlight: {
46
+ extensionPointIdentifier: "com.apple.spotlight.import",
47
+ needsEmbeddedSwift: true,
48
+ displayName: "Spotlight",
49
+ },
50
+ matter: {
51
+ extensionPointIdentifier: "com.apple.matter.support.extension.device-setup",
52
+ needsEmbeddedSwift: true,
53
+ displayName: "Matter",
54
+ },
55
+ "quicklook-thumbnail": {
56
+ extensionPointIdentifier: "com.apple.quicklook.thumbnail",
57
+ needsEmbeddedSwift: true,
58
+ frameworks: ["QuickLookThumbnailing"],
59
+ displayName: "Quicklook Thumbnail",
60
+ },
61
+ imessage: {
62
+ extensionPointIdentifier: "com.apple.message-payload-provider",
63
+ hasNoTemplate: true,
64
+ displayName: "iMessage",
65
+ },
66
+ clip: {
67
+ productType: "com.apple.product-type.application.on-demand-install-capable",
68
+ needsEmbeddedSwift: true,
69
+ appGroupsByDefault: true,
70
+ displayName: "App Clip",
71
+ description: "Instantly open your app without installing",
72
+ },
73
+ watch: {
74
+ productType: "com.apple.product-type.application",
75
+ needsEmbeddedSwift: true,
76
+ displayName: "Watch",
77
+ },
78
+ "location-push": {
79
+ extensionPointIdentifier: "com.apple.location.push.service",
80
+ displayName: "Location Push",
81
+ },
82
+ "credentials-provider": {
83
+ extensionPointIdentifier: "com.apple.authentication-services-credential-provider-ui",
84
+ displayName: "Credentials Provider",
85
+ },
86
+ "account-auth": {
87
+ extensionPointIdentifier: "com.apple.authentication-services-account-authentication-modification-ui",
88
+ displayName: "Account Auth",
89
+ },
90
+ action: {
91
+ extensionPointIdentifier: "com.apple.services",
92
+ displayName: "Action",
93
+ description: "Headless action that appears in share sheets",
94
+ },
95
+ safari: {
96
+ extensionPointIdentifier: "com.apple.Safari.web-extension",
97
+ displayName: "Safari Extension",
98
+ },
99
+ "app-intent": {
100
+ extensionPointIdentifier: "com.apple.appintents-extension",
101
+ productType: "com.apple.product-type.extensionkit-extension",
102
+ frameworks: ["AppIntents"],
103
+ displayName: "App Intent",
104
+ },
105
+ "device-activity-monitor": {
106
+ extensionPointIdentifier: "com.apple.deviceactivity.monitor-extension",
107
+ frameworks: ["DeviceActivity"],
108
+ displayName: "Device Activity Monitor",
109
+ },
110
+ "network-packet-tunnel": {
111
+ extensionPointIdentifier: "com.apple.networkextension.packet-tunnel",
112
+ needsEmbeddedSwift: true,
113
+ frameworks: ["NetworkExtension"],
114
+ displayName: "Network Extension: Packet Tunnel Provider",
115
+ },
116
+ "network-app-proxy": {
117
+ extensionPointIdentifier: "com.apple.networkextension.app-proxy",
118
+ needsEmbeddedSwift: true,
119
+ frameworks: ["NetworkExtension"],
120
+ displayName: "Network Extension: App Proxy",
121
+ },
122
+ "network-filter-data": {
123
+ extensionPointIdentifier: "com.apple.networkextension.filter-data",
124
+ needsEmbeddedSwift: true,
125
+ frameworks: ["NetworkExtension"],
126
+ displayName: "Network Extension: Filter Data",
127
+ },
128
+ "network-dns-proxy": {
129
+ extensionPointIdentifier: "com.apple.networkextension.dns-proxy",
130
+ needsEmbeddedSwift: true,
131
+ frameworks: ["NetworkExtension"],
132
+ displayName: "Network Extension: DNS Proxy",
133
+ },
134
+ keyboard: {
135
+ extensionPointIdentifier: "com.apple.keyboard-service",
136
+ needsEmbeddedSwift: true,
137
+ appGroupsByDefault: true,
138
+ displayName: "Keyboard Extension",
139
+ description: "Custom system keyboard",
140
+ },
141
+ "content-blocker": {
142
+ extensionPointIdentifier: "com.apple.Safari.content-blocker",
143
+ displayName: "Content Blocker",
144
+ description: "Safari content blocker extension",
145
+ },
146
+ "file-provider": {
147
+ extensionPointIdentifier: "com.apple.fileprovider-nonui",
148
+ frameworks: ["UniformTypeIdentifiers"],
149
+ appGroupsByDefault: true,
150
+ displayName: "File Provider",
151
+ },
152
+ "broadcast-upload": {
153
+ extensionPointIdentifier: "com.apple.broadcast-services-upload",
154
+ frameworks: ["ReplayKit"],
155
+ displayName: "Broadcast Upload",
156
+ },
157
+ "call-directory": {
158
+ extensionPointIdentifier: "com.apple.callkit.call-directory",
159
+ frameworks: ["CallKit"],
160
+ displayName: "Call Directory",
161
+ },
162
+ "message-filter": {
163
+ extensionPointIdentifier: "com.apple.identitylookup.message-filter",
164
+ frameworks: ["IdentityLookup"],
165
+ displayName: "Message Filter",
166
+ },
167
+ "file-provider-ui": {
168
+ extensionPointIdentifier: "com.apple.fileprovider-actionsui",
169
+ frameworks: ["FileProviderUI"],
170
+ displayName: "File Provider UI",
171
+ },
172
+ "broadcast-setup-ui": {
173
+ extensionPointIdentifier: "com.apple.broadcast-services-setupui",
174
+ frameworks: ["ReplayKit"],
175
+ displayName: "Broadcast Setup UI",
176
+ },
177
+ "classkit-context": {
178
+ extensionPointIdentifier: "com.apple.classkit.context-provider",
179
+ frameworks: ["ClassKit"],
180
+ displayName: "ClassKit Context Provider",
181
+ },
182
+ "unwanted-communication": {
183
+ extensionPointIdentifier: "com.apple.identitylookup.classification-ui",
184
+ frameworks: ["IdentityLookup", "IdentityLookupUI"],
185
+ displayName: "Unwanted Communication Reporting",
186
+ },
187
+ "photo-editing": {
188
+ extensionPointIdentifier: "com.apple.photo-editing",
189
+ frameworks: ["Photos", "PhotosUI"],
190
+ displayName: "Photo Editing",
191
+ },
192
+ "quicklook-preview": {
193
+ extensionPointIdentifier: "com.apple.quicklook.preview",
194
+ needsEmbeddedSwift: true,
195
+ frameworks: ["QuickLook"],
196
+ displayName: "Quick Look Preview",
197
+ },
198
+ "spotlight-delegate": {
199
+ extensionPointIdentifier: "com.apple.spotlight.index",
200
+ frameworks: ["CoreSpotlight"],
201
+ displayName: "CoreSpotlight Delegate",
202
+ },
203
+ "virtual-conference": {
204
+ extensionPointIdentifier: "com.apple.calendar.virtualconference",
205
+ displayName: "Virtual Conference Provider",
206
+ },
207
+ "shield-action": {
208
+ extensionPointIdentifier: "com.apple.ManagedSettings.shield-action-service",
209
+ frameworks: ["ManagedSettings"],
210
+ displayName: "Shield Action",
211
+ },
212
+ "shield-config": {
213
+ extensionPointIdentifier: "com.apple.ManagedSettingsUI.shield-configuration-service",
214
+ frameworks: ["ManagedSettings", "ManagedSettingsUI"],
215
+ displayName: "Shield Configuration",
216
+ },
217
+ "print-service": {
218
+ extensionPointIdentifier: "com.apple.printing.discovery",
219
+ displayName: "Print Service",
220
+ },
221
+ "smart-card": {
222
+ extensionPointIdentifier: "com.apple.ctk-tokens",
223
+ frameworks: ["CryptoTokenKit"],
224
+ displayName: "Smart Card",
225
+ description: "Persistent token / smart card extension",
226
+ },
227
+ "authentication-services": {
228
+ extensionPointIdentifier: "com.apple.AppSSO.idp-extension",
229
+ frameworks: ["AuthenticationServices"],
230
+ displayName: "Authentication Services",
231
+ description: "Single sign-on extension",
232
+ },
59
233
  };
234
+ // ---------------------------------------------------------------------------
235
+ // Derived maps — kept as exports for backward compatibility. All sourced
236
+ // from TARGET_REGISTRY so they never go out of sync.
237
+ // ---------------------------------------------------------------------------
238
+ /** Maps Apple extension point identifiers to ExtensionType values. */
239
+ exports.KNOWN_EXTENSION_POINT_IDENTIFIERS = Object.fromEntries(Object.entries(exports.TARGET_REGISTRY)
240
+ .filter(([, def]) => def.extensionPointIdentifier)
241
+ .map(([type, def]) => [def.extensionPointIdentifier, type]));
242
+ /** Whether app groups should sync from the main target by default. */
243
+ exports.SHOULD_USE_APP_GROUPS_BY_DEFAULT = Object.fromEntries(Object.keys(exports.TARGET_REGISTRY).map((type) => {
244
+ var _a;
245
+ return [
246
+ type,
247
+ (_a = getEntry(type).appGroupsByDefault) !== null && _a !== void 0 ? _a : false,
248
+ ];
249
+ }));
250
+ // ---------------------------------------------------------------------------
251
+ // Helper functions — signatures unchanged for backward compatibility.
252
+ // ---------------------------------------------------------------------------
253
+ function getEntry(type) {
254
+ return exports.TARGET_REGISTRY[type];
255
+ }
256
+ function productTypeForType(type) {
257
+ var _a;
258
+ return (_a = getEntry(type).productType) !== null && _a !== void 0 ? _a : "com.apple.product-type.app-extension";
259
+ }
260
+ exports.productTypeForType = productTypeForType;
261
+ function needsEmbeddedSwift(type) {
262
+ var _a;
263
+ return (_a = getEntry(type).needsEmbeddedSwift) !== null && _a !== void 0 ? _a : false;
264
+ }
265
+ exports.needsEmbeddedSwift = needsEmbeddedSwift;
266
+ function getFrameworksForType(type) {
267
+ var _a;
268
+ return [...((_a = getEntry(type).frameworks) !== null && _a !== void 0 ? _a : [])];
269
+ }
270
+ exports.getFrameworksForType = getFrameworksForType;
271
+ // ---------------------------------------------------------------------------
272
+ // Info.plist generation — stays as a switch because each type has a unique
273
+ // plist shape that can't be reasonably data-driven.
274
+ // ---------------------------------------------------------------------------
60
275
  // TODO: Maybe we can replace `NSExtensionPrincipalClass` with the `@main` annotation that newer extensions use?
61
276
  function getTargetInfoPlistForType(type) {
62
- // TODO: Use exhaustive switch to ensure external contributors don't forget to add this.
63
- const NSExtensionPointIdentifier = Object.keys(exports.KNOWN_EXTENSION_POINT_IDENTIFIERS).find((key) => exports.KNOWN_EXTENSION_POINT_IDENTIFIERS[key] === type);
277
+ const NSExtensionPointIdentifier = getEntry(type).extensionPointIdentifier;
64
278
  switch (type) {
65
279
  case "watch":
66
280
  return {};
@@ -152,15 +366,20 @@ function getTargetInfoPlistForType(type) {
152
366
  },
153
367
  },
154
368
  };
369
+ case "content-blocker":
370
+ return {
371
+ NSExtension: {
372
+ NSExtensionPrincipalClass: "$(PRODUCT_MODULE_NAME).ContentBlockerRequestHandler",
373
+ NSExtensionPointIdentifier,
374
+ },
375
+ };
155
376
  case "notification-service":
156
377
  return {
157
378
  NSExtension: {
158
379
  NSExtensionAttributes: {
159
380
  NSExtensionActivationRule: "TRUEPREDICATE",
160
381
  },
161
- // TODO: Update `NotificationService` dynamically
162
382
  NSExtensionPrincipalClass: "$(PRODUCT_MODULE_NAME).NotificationService",
163
- // NSExtensionMainStoryboard: 'MainInterface',
164
383
  NSExtensionPointIdentifier,
165
384
  },
166
385
  };
@@ -182,9 +401,7 @@ function getTargetInfoPlistForType(type) {
182
401
  NSExtensionAttributes: {
183
402
  CSSupportedContentTypes: ["com.example.plain-text"],
184
403
  },
185
- // TODO: Update `ImportExtension` dynamically
186
404
  NSExtensionPrincipalClass: "$(PRODUCT_MODULE_NAME).ImportExtension",
187
- // NSExtensionMainStoryboard: 'MainInterface',
188
405
  NSExtensionPointIdentifier,
189
406
  },
190
407
  };
@@ -194,9 +411,7 @@ function getTargetInfoPlistForType(type) {
194
411
  NSExtensionAttributes: {
195
412
  NSExtensionActivationRule: "TRUEPREDICATE",
196
413
  },
197
- // TODO: Update `ShareViewController` dynamically
198
414
  NSExtensionPrincipalClass: "$(PRODUCT_MODULE_NAME).ShareViewController",
199
- // NSExtensionMainStoryboard: 'MainInterface',
200
415
  NSExtensionPointIdentifier,
201
416
  },
202
417
  };
@@ -206,7 +421,6 @@ function getTargetInfoPlistForType(type) {
206
421
  NSExtensionAttributes: {
207
422
  IntentsSupported: ["INSendMessageIntent"],
208
423
  },
209
- // TODO: Update `IntentViewController` dynamically
210
424
  NSExtensionPrincipalClass: "$(PRODUCT_MODULE_NAME).IntentViewController",
211
425
  NSExtensionPointIdentifier,
212
426
  },
@@ -222,7 +436,6 @@ function getTargetInfoPlistForType(type) {
222
436
  "INSetMessageAttributeIntent",
223
437
  ],
224
438
  },
225
- // TODO: Update `IntentHandler` dynamically
226
439
  NSExtensionPrincipalClass: "$(PRODUCT_MODULE_NAME).IntentHandler",
227
440
  NSExtensionPointIdentifier,
228
441
  },
@@ -244,9 +457,7 @@ function getTargetInfoPlistForType(type) {
244
457
  case "safari":
245
458
  return {
246
459
  NSExtension: {
247
- // TODO: Update `SafariWebExtensionHandler` dynamically
248
460
  NSExtensionPrincipalClass: "$(PRODUCT_MODULE_NAME).SafariWebExtensionHandler",
249
- // NSExtensionMainStoryboard: 'MainInterface',
250
461
  NSExtensionPointIdentifier,
251
462
  },
252
463
  };
@@ -257,9 +468,7 @@ function getTargetInfoPlistForType(type) {
257
468
  UNNotificationExtensionCategory: "myNotificationCategory",
258
469
  UNNotificationExtensionInitialContentSizeRatio: 1,
259
470
  },
260
- // TODO: Update `NotificationViewController` dynamically
261
471
  NSExtensionPrincipalClass: "$(PRODUCT_MODULE_NAME).NotificationViewController",
262
- // NSExtensionMainStoryboard: 'MainInterface',
263
472
  NSExtensionPointIdentifier,
264
473
  },
265
474
  };
@@ -291,6 +500,133 @@ function getTargetInfoPlistForType(type) {
291
500
  NSExtensionPrincipalClass: "$(PRODUCT_MODULE_NAME).FilterDataProvider",
292
501
  },
293
502
  };
503
+ case "file-provider":
504
+ return {
505
+ NSExtension: {
506
+ NSExtensionPointIdentifier,
507
+ NSExtensionPrincipalClass: "$(PRODUCT_MODULE_NAME).FileProviderExtension",
508
+ NSExtensionFileProviderSupportsEnumeration: true,
509
+ },
510
+ };
511
+ case "broadcast-upload":
512
+ return {
513
+ NSExtension: {
514
+ NSExtensionPointIdentifier,
515
+ NSExtensionPrincipalClass: "$(PRODUCT_MODULE_NAME).SampleHandler",
516
+ RPBroadcastProcessMode: "RPBroadcastProcessModeSampleBuffer",
517
+ },
518
+ };
519
+ case "call-directory":
520
+ return {
521
+ NSExtension: {
522
+ NSExtensionPointIdentifier,
523
+ NSExtensionPrincipalClass: "$(PRODUCT_MODULE_NAME).CallDirectoryHandler",
524
+ },
525
+ };
526
+ case "message-filter":
527
+ return {
528
+ NSExtension: {
529
+ NSExtensionPointIdentifier,
530
+ NSExtensionPrincipalClass: "$(PRODUCT_MODULE_NAME).MessageFilterExtension",
531
+ },
532
+ };
533
+ case "file-provider-ui":
534
+ return {
535
+ NSExtension: {
536
+ NSExtensionPointIdentifier,
537
+ NSExtensionPrincipalClass: "$(PRODUCT_MODULE_NAME).FileProviderUIController",
538
+ },
539
+ };
540
+ case "broadcast-setup-ui":
541
+ return {
542
+ NSExtension: {
543
+ NSExtensionPointIdentifier,
544
+ NSExtensionPrincipalClass: "$(PRODUCT_MODULE_NAME).BroadcastSetupViewController",
545
+ },
546
+ };
547
+ case "classkit-context":
548
+ return {
549
+ NSExtension: {
550
+ NSExtensionPointIdentifier,
551
+ NSExtensionPrincipalClass: "$(PRODUCT_MODULE_NAME).ContextProvider",
552
+ },
553
+ };
554
+ case "unwanted-communication":
555
+ return {
556
+ NSExtension: {
557
+ NSExtensionPointIdentifier,
558
+ NSExtensionPrincipalClass: "$(PRODUCT_MODULE_NAME).ClassificationViewController",
559
+ },
560
+ };
561
+ case "photo-editing":
562
+ return {
563
+ NSExtension: {
564
+ NSExtensionPointIdentifier,
565
+ NSExtensionPrincipalClass: "$(PRODUCT_MODULE_NAME).PhotoEditingViewController",
566
+ NSExtensionAttributes: {
567
+ PHSupportedMediaTypes: ["Image"],
568
+ },
569
+ },
570
+ };
571
+ case "quicklook-preview":
572
+ return {
573
+ NSExtension: {
574
+ NSExtensionAttributes: {
575
+ QLSupportedContentTypes: [],
576
+ },
577
+ NSExtensionPrincipalClass: "$(PRODUCT_MODULE_NAME).PreviewViewController",
578
+ NSExtensionPointIdentifier,
579
+ },
580
+ };
581
+ case "spotlight-delegate":
582
+ return {
583
+ NSExtension: {
584
+ NSExtensionPointIdentifier,
585
+ NSExtensionPrincipalClass: "$(PRODUCT_MODULE_NAME).IndexRequestHandler",
586
+ },
587
+ };
588
+ case "virtual-conference":
589
+ return {
590
+ NSExtension: {
591
+ NSExtensionPointIdentifier,
592
+ NSExtensionPrincipalClass: "$(PRODUCT_MODULE_NAME).VirtualConferenceProvider",
593
+ },
594
+ };
595
+ case "shield-action":
596
+ return {
597
+ NSExtension: {
598
+ NSExtensionPointIdentifier,
599
+ NSExtensionPrincipalClass: "$(PRODUCT_MODULE_NAME).ShieldActionExtension",
600
+ },
601
+ };
602
+ case "shield-config":
603
+ return {
604
+ NSExtension: {
605
+ NSExtensionPointIdentifier,
606
+ NSExtensionPrincipalClass: "$(PRODUCT_MODULE_NAME).ShieldConfigurationExtension",
607
+ },
608
+ };
609
+ case "print-service":
610
+ return {
611
+ NSExtension: {
612
+ NSExtensionPointIdentifier,
613
+ NSExtensionPrincipalClass: "$(PRODUCT_MODULE_NAME).PrintServiceExtension",
614
+ },
615
+ };
616
+ case "smart-card":
617
+ return {
618
+ NSExtension: {
619
+ NSExtensionPointIdentifier,
620
+ NSExtensionPrincipalClass: "$(PRODUCT_MODULE_NAME).TokenExtension",
621
+ },
622
+ };
623
+ case "authentication-services":
624
+ return {
625
+ NSExtension: {
626
+ NSExtensionPointIdentifier,
627
+ NSExtensionPrincipalClass: "$(PRODUCT_MODULE_NAME).AuthenticationExtension",
628
+ },
629
+ };
294
630
  default:
295
631
  // Default: used for widget and bg-download
296
632
  return {
@@ -301,75 +637,9 @@ function getTargetInfoPlistForType(type) {
301
637
  }
302
638
  }
303
639
  exports.getTargetInfoPlistForType = getTargetInfoPlistForType;
304
- function productTypeForType(type) {
305
- switch (type) {
306
- case "clip":
307
- return "com.apple.product-type.application.on-demand-install-capable";
308
- case "watch":
309
- return "com.apple.product-type.application";
310
- case "app-intent":
311
- return "com.apple.product-type.extensionkit-extension";
312
- default:
313
- return "com.apple.product-type.app-extension";
314
- }
315
- }
316
- exports.productTypeForType = productTypeForType;
317
- function needsEmbeddedSwift(type) {
318
- return [
319
- "watch",
320
- "spotlight",
321
- "share",
322
- "intent",
323
- "intent-ui",
324
- "bg-download",
325
- "quicklook-thumbnail",
326
- "matter",
327
- "clip",
328
- "network-packet-tunnel",
329
- "network-app-proxy",
330
- "network-dns-proxy",
331
- "network-filter-data",
332
- "keyboard",
333
- ].includes(type);
334
- }
335
- exports.needsEmbeddedSwift = needsEmbeddedSwift;
336
- function getFrameworksForType(type) {
337
- switch (type) {
338
- case "widget":
339
- return [
340
- // CD07060B2A2EBE2E009C1192 /* WidgetKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WidgetKit.framework; path = System/Library/Frameworks/WidgetKit.framework; sourceTree = SDKROOT; };
341
- "WidgetKit",
342
- // CD07060D2A2EBE2E009C1192 /* SwiftUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftUI.framework; path = System/Library/Frameworks/SwiftUI.framework; sourceTree = SDKROOT; };
343
- "SwiftUI",
344
- "ActivityKit",
345
- "AppIntents",
346
- ];
347
- case "intent":
348
- return ["Intents"];
349
- case "intent-ui":
350
- return ["IntentsUI"];
351
- case "quicklook-thumbnail":
352
- return ["QuickLookThumbnailing"];
353
- case "notification-content":
354
- return ["UserNotifications", "UserNotificationsUI"];
355
- case "app-intent":
356
- return ["AppIntents"];
357
- case "device-activity-monitor":
358
- return ["DeviceActivity"];
359
- case "action":
360
- return [
361
- // "UniformTypeIdentifiers"
362
- ];
363
- case "network-packet-tunnel":
364
- case "network-app-proxy":
365
- case "network-dns-proxy":
366
- case "network-filter-data":
367
- return ["NetworkExtension"];
368
- default:
369
- return [];
370
- }
371
- }
372
- exports.getFrameworksForType = getFrameworksForType;
640
+ // ---------------------------------------------------------------------------
641
+ // Target detection & utilities
642
+ // ---------------------------------------------------------------------------
373
643
  function isNativeTargetOfType(target, type) {
374
644
  var _a;
375
645
  if (type === "watch" &&
package/build/util.d.ts CHANGED
@@ -1,11 +1,5 @@
1
- export declare const warnOnce: {
2
- (...data: any[]): void;
3
- (message?: any, ...optionalParams: any[]): void;
4
- };
5
- export declare const logOnce: {
6
- (...data: any[]): void;
7
- (message?: any, ...optionalParams: any[]): void;
8
- };
1
+ export declare const warnOnce: (message?: any, ...optionalParams: any[]) => void;
2
+ export declare const logOnce: (message?: any, ...optionalParams: any[]) => void;
9
3
  export declare function createLogQueue(): {
10
4
  add: (fn: Function) => void;
11
5
  flush: () => void;
@@ -1,4 +1,4 @@
1
1
  import { XcodeProject } from "@bacons/xcode";
2
- import { ConfigPlugin, Mod } from "@expo/config-plugins";
2
+ import { ConfigPlugin, Mod } from "expo/config-plugins";
3
3
  export declare const withXcodeProjectBeta: ConfigPlugin<Mod<XcodeProject>>;
4
4
  export declare const withXcodeProjectBetaBaseMod: ConfigPlugin<void>;
@@ -29,7 +29,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.withXcodeProjectBetaBaseMod = exports.withXcodeProjectBeta = void 0;
30
30
  const xcode_1 = require("@bacons/xcode");
31
31
  const xcodeParse = __importStar(require("@bacons/xcode/json"));
32
- const config_plugins_1 = require("@expo/config-plugins");
32
+ const config_plugins_1 = require("expo/config-plugins");
33
33
  const fs_1 = __importDefault(require("fs"));
34
34
  const customModName = "xcodeProjectBeta2";
35
35
  const withXcodeProjectBeta = (config, action) => {
@@ -1,10 +1,10 @@
1
1
  import { XcodeProject } from "@bacons/xcode";
2
- import { ConfigPlugin } from "expo/config-plugins";
2
+ import type { ConfigPlugin } from "expo/config-plugins";
3
3
  import { Entitlements } from "./config";
4
4
  export declare const withEASTargets: ConfigPlugin<{
5
5
  bundleIdentifier: string;
6
6
  targetName: string;
7
- entitlements?: Record<string, any>;
7
+ entitlements?: Record<string, unknown>;
8
8
  }>;
9
9
  type EASCredentials = {
10
10
  targetName: string;