peachsim 0.1.2428 → 0.1.2430

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.
Files changed (163) hide show
  1. package/dist-lib/agent-daemon-client.cjs +1 -1
  2. package/dist-lib/agent-events.cjs +1 -1
  3. package/dist-lib/attached-projects.cjs +1 -1
  4. package/dist-lib/auth/shared-session.cjs +1 -1
  5. package/dist-lib/backend-origin.cjs +1 -1
  6. package/dist-lib/beta.cjs +1 -1
  7. package/dist-lib/beta.mjs +1 -1
  8. package/dist-lib/bridge-constants.cjs +1 -1
  9. package/dist-lib/bridge-contract-input.cjs +1 -1
  10. package/dist-lib/bridge-contract-input.mjs +1 -1
  11. package/dist-lib/bridge-contract.cjs +1 -1
  12. package/dist-lib/bridge-contract.mjs +1 -1
  13. package/dist-lib/bundle-channel.cjs +200 -92
  14. package/dist-lib/capture-contract.cjs +1 -1
  15. package/dist-lib/capture-contract.mjs +1 -1
  16. package/dist-lib/cloud-contract.cjs +1 -1
  17. package/dist-lib/cloud-contract.mjs +1 -1
  18. package/dist-lib/cloud-test-args.cjs +1 -1
  19. package/dist-lib/cloud-test-args.mjs +1 -1
  20. package/dist-lib/cloud.cjs +1 -1
  21. package/dist-lib/cloud.mjs +1 -1
  22. package/dist-lib/config.cjs +1 -1
  23. package/dist-lib/config.mjs +1 -1
  24. package/dist-lib/detox/index.cjs +2 -2
  25. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  26. package/dist-lib/expo-swift-bundle.cjs +164 -56
  27. package/dist-lib/expo-swift-metadata.cjs +1 -1
  28. package/dist-lib/expo-swift-metadata.mjs +1 -1
  29. package/dist-lib/home-paths.cjs +1 -1
  30. package/dist-lib/host/bridge-host.cjs +182 -74
  31. package/dist-lib/host/fetch-proxy-handler.cjs +7 -6
  32. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  33. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  34. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  35. package/dist-lib/host/websocket-proxy.cjs +1 -1
  36. package/dist-lib/index.cjs +10 -6
  37. package/dist-lib/jump-to-source-babel.cjs +1 -1
  38. package/dist-lib/jump-to-source-native.cjs +1 -1
  39. package/dist-lib/kotlin-host.cjs +1 -1
  40. package/dist-lib/menu.cjs +1 -1
  41. package/dist-lib/menu.mjs +1 -1
  42. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  43. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  44. package/dist-lib/metro-production-bundle.cjs +1 -1
  45. package/dist-lib/metro-production-bundle.mjs +1 -1
  46. package/dist-lib/metro.cjs +10 -6
  47. package/dist-lib/native-app-identity-project.cjs +6 -3
  48. package/dist-lib/native-app-identity-project.mjs +6 -3
  49. package/dist-lib/native-app-identity.cjs +1 -1
  50. package/dist-lib/native-app-identity.mjs +1 -1
  51. package/dist-lib/native-firebase-metadata.cjs +1 -1
  52. package/dist-lib/native-firebase-metadata.mjs +1 -1
  53. package/dist-lib/pdfium-raster.cjs +1 -1
  54. package/dist-lib/pdfium-raster.mjs +1 -1
  55. package/dist-lib/plist.cjs +1 -1
  56. package/dist-lib/plist.mjs +1 -1
  57. package/dist-lib/profiles.cjs +1 -1
  58. package/dist-lib/public-brand.cjs +1 -1
  59. package/dist-lib/public-origins-lib-esm.json +24 -24
  60. package/dist-lib/public-origins-lib.json +55 -55
  61. package/dist-lib/react-native-host-modules.cjs +1 -1
  62. package/dist-lib/react-native-host-modules.mjs +1 -1
  63. package/dist-lib/reap-browser.cjs +1 -1
  64. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  65. package/dist-lib/sdk.cjs +1 -1
  66. package/dist-lib/sdk.mjs +1 -1
  67. package/dist-lib/skills.cjs +195 -85
  68. package/dist-lib/swift-compile.cjs +35 -22
  69. package/dist-lib/swift-compile.mjs +35 -22
  70. package/dist-lib/swift-package.cjs +1 -1
  71. package/dist-lib/swift-package.mjs +1 -1
  72. package/dist-lib/swift-submit.cjs +1 -1
  73. package/dist-lib/swift-submit.mjs +1 -1
  74. package/dist-lib/swift-toolchain.cjs +1 -1
  75. package/dist-lib/swift.cjs +1 -1
  76. package/dist-lib/vite-swift.cjs +180 -73
  77. package/dist-lib/vite.cjs +7 -6
  78. package/dist-lib/worklet-executable.cjs +1 -1
  79. package/dist-lib/worklet-executable.mjs +1 -1
  80. package/dist-types/packages/peach-engine/src/remote-stream/cloud-display.d.ts +2 -2
  81. package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +7 -0
  82. package/dist-types/packages/peach-globals/src/globalsContract.d.ts +2 -0
  83. package/dist-types/packages/peach-globals/src/index.d.ts +1 -0
  84. package/dist-types/packages/peach-globals/src/locationBridgeContract.d.ts +20 -0
  85. package/package.json +1 -1
  86. package/runtime-companion.json +1 -1
  87. package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/CoreData.h +3 -0
  88. package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSEntityMigrationPolicy.h +17 -0
  89. package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSManagedObject.h +2 -0
  90. package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSManagedObjectContext.h +6 -0
  91. package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSPersistentContainer.h +15 -0
  92. package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSPersistentStoreDescription.h +10 -0
  93. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationManagerDelegate.h +1 -1
  94. package/sdk/ios/System/Library/Frameworks/CoreServices.framework/Modules/module.modulemap +5 -0
  95. package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSBase.h +28 -0
  96. package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSImportExtension.h +21 -0
  97. package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSIndexExtensionRequestHandler.h +17 -0
  98. package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSPerson.h +28 -0
  99. package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchQuery.h +77 -0
  100. package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableIndex.h +154 -0
  101. package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableIndexDescription.h +19 -0
  102. package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableItem.h +86 -0
  103. package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableItemAttributeSet.h +95 -0
  104. package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableItemAttributeSet_Categories.h +19 -0
  105. package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableItemAttributeSet_Documents.h +71 -0
  106. package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableItemAttributeSet_Events.h +34 -0
  107. package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableItemAttributeSet_General.h +138 -0
  108. package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableItemAttributeSet_Images.h +116 -0
  109. package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableItemAttributeSet_Media.h +235 -0
  110. package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableItemAttributeSet_Messaging.h +99 -0
  111. package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSearchableItemAttributeSet_Places.h +96 -0
  112. package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSSuggestion.h +37 -0
  113. package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CSUserQuery.h +73 -0
  114. package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CoreSpotlight.apinotes +26 -0
  115. package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Headers/CoreSpotlight.h +29 -0
  116. package/sdk/ios/System/Library/Frameworks/CoreSpotlight.framework/Modules/module.modulemap +5 -0
  117. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIScrollView.h +1 -1
  118. package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotificationSettings.h +1 -1
  119. package/sdk/ios/System/Library/Frameworks/UserNotifications.framework/Headers/UNUserNotificationCenter.h +1 -1
  120. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKBackForwardList.h +1 -1
  121. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKBackForwardListItem.h +1 -1
  122. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKContentRuleList.h +1 -1
  123. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKContentRuleListStore.h +1 -1
  124. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKContentWorld.h +1 -1
  125. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKContentWorldConfiguration.h +1 -1
  126. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKContextMenuElementInfo.h +1 -1
  127. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKDOMNodeSnapshot.h +1 -1
  128. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKDownload.h +1 -1
  129. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKFindConfiguration.h +1 -1
  130. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKFindResult.h +1 -1
  131. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKFormInfo.h +1 -1
  132. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKFrameInfo.h +1 -1
  133. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKHTTPCookieStore.h +1 -1
  134. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKJSHandle.h +1 -1
  135. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKNavigation.h +1 -1
  136. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKNavigationAction.h +1 -1
  137. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKNavigationResponse.h +1 -1
  138. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKOpenPanelParameters.h +1 -1
  139. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKPDFConfiguration.h +1 -1
  140. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKPreferences.h +1 -1
  141. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKPreviewElementInfo.h +1 -1
  142. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKProcessPool.h +1 -1
  143. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKScriptMessage.h +1 -1
  144. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKSecurityOrigin.h +1 -1
  145. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKSnapshotConfiguration.h +1 -1
  146. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKUserContentController.h +1 -1
  147. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKUserScript.h +1 -1
  148. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtension.h +1 -1
  149. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionContext.h +1 -1
  150. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionController.h +1 -1
  151. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionControllerConfiguration.h +1 -1
  152. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebExtensionMatchPattern.h +1 -1
  153. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebView.h +2 -2
  154. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebViewConfiguration.h +1 -1
  155. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebpagePreferences.h +1 -1
  156. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebsiteDataRecord.h +1 -1
  157. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWebsiteDataStore.h +1 -1
  158. package/sdk/ios/System/Library/Frameworks/WebKit.framework/Headers/WKWindowFeatures.h +1 -1
  159. package/sdk/ios/System/Library/Frameworks/_LocationEssentials.framework/Headers/CLLocationEssentials.h +3 -3
  160. package/src/core-data-model.ts +112 -5
  161. package/src/swift-compile.ts +34 -11
  162. package/src/swift-objc-import.ts +19 -13
  163. package/src/xcode-project.ts +5 -0
@@ -32,6 +32,7 @@ import type { WorkerStorageSyncMessage } from './worker-storage.d.ts';
32
32
  import type { WorkletPeerEpoch } from './worklet-runtime.d.ts';
33
33
  import type { UiRpcMailboxes } from './worklet-sab.d.ts';
34
34
  import type { WorkletMessage } from './worklet-wire.d.ts';
35
+ import type { SootSimLocationFix } from '../../../peach-globals/src/index.d.ts';
35
36
  import type { SootsimBootMark } from '../../../peach-globals/src/index.d.ts';
36
37
  import type { PeachPageServingAuthority, SootSimAccessibilityInput } from '../../../peach-globals/src/index.d.ts';
37
38
  import type { SootSimAgentActionDetail, SootSimLaunchArguments } from '../../../peach-globals/src/index.d.ts';
@@ -195,6 +196,9 @@ export type HostToWorker = {
195
196
  } | {
196
197
  type: 'setReactNativeConfiguration';
197
198
  configuration: ReactNativeConfigurationSnapshot;
199
+ } | {
200
+ type: 'setSimulatedLocation';
201
+ location: SootSimLocationFix | null;
198
202
  } | {
199
203
  type: 'dispatchWindowEvent';
200
204
  eventType: ForwardedWindowEventType;
@@ -737,6 +741,9 @@ export type WorkerToHost = {
737
741
  type: 'remoteDeviceConfiguration';
738
742
  configuration: ReactNativeConfigurationSnapshot;
739
743
  systemColorScheme: 'light' | 'dark';
744
+ } | {
745
+ type: 'remoteDeviceLocation';
746
+ location: SootSimLocationFix | null;
740
747
  } | {
741
748
  type: 'replayDevice';
742
749
  posture: DevicePosture | null;
@@ -12,6 +12,7 @@ import type { SootSimHostStorageBridge } from './hostStorageBridgeContract.d.ts'
12
12
  import type { SootSimImagePickerBridge, SootSimImageCropperBridge } from './imagePickerBridgeContract.d.ts';
13
13
  import type { SootSimInteractBridge } from './interactionBridgeContract.d.ts';
14
14
  import type { SootSimKeyboardBridge } from './keyboardBridgeContract.d.ts';
15
+ import type { SootSimLocationBridge } from './locationBridgeContract.d.ts';
15
16
  import type { SootSimLockstepCaptureBridge } from './lockstepCaptureBridgeContract.d.ts';
16
17
  import type { SootSimNavigationRoutesBridge, SootSimLinkingDispatcherBridge } from './navigationBridgeContract.d.ts';
17
18
  import type { SootSimInspectInfo, SootSimDeviceSpec } from './nodeContract.d.ts';
@@ -116,6 +117,7 @@ export interface SootSimBridges {
116
117
  previewRecorder: SootSimPreviewRecorder | null;
117
118
  portalManager: SootSimPortalManager | null;
118
119
  settings: SootSimSettingsBridge | null;
120
+ location: SootSimLocationBridge | null;
119
121
  windowScale: SootSimWindowScaleBridge | null;
120
122
  electron: SootSimElectronBridge | null;
121
123
  shellHost: SootSimShellHostBridge | null;
@@ -40,6 +40,7 @@ export type { LockstepFramePosition, PointerDeliveryTarget, PointerDeliveryPendi
40
40
  export type { SootSimLaunchArguments, SootSimExternalAppLifecycleOptions, SootSimStorageResetStrategy, SootSimExternalAppResetOptions, SootSimExternalAppResetResult, SootSimExternalAppStorageClearOptions, SootSimWebStorageName, SootSimHotRemountBridge, } from './appLifecycleBridgeContract.d.ts';
41
41
  export { PEACH_FINAL_LAUNCH_GLOBAL } from './appLifecycleBridgeContract.d.ts';
42
42
  export type { SootSimSettingsBridge } from './settingsBridgeContract.d.ts';
43
+ export type { SootSimLocationFix, SootSimLocationResult, SootSimLocationBridge, } from './locationBridgeContract.d.ts';
43
44
  export { SOOTSIM_CAPTURE_IMAGE_QUALITY, sootsimCaptureIsFlat, } from './captureBridgeContract.d.ts';
44
45
  export type { SootSimCaptureFilter, SootSimCaptureOptions } from './captureBridgeContract.d.ts';
45
46
  export { SOOTSIM_TIMELINE_KINDS, isTimelineKind, isTimelineEvent, } from './timelineBridgeContract.d.ts';
@@ -0,0 +1,20 @@
1
+ export interface SootSimLocationFix {
2
+ latitude: number;
3
+ longitude: number;
4
+ altitude?: number;
5
+ accuracy?: number;
6
+ heading?: number;
7
+ speed?: number;
8
+ }
9
+ export interface SootSimLocationResult {
10
+ ok: boolean;
11
+ source: 'custom' | 'default';
12
+ fix?: SootSimLocationFix;
13
+ error?: string;
14
+ }
15
+ export interface SootSimLocationBridge {
16
+ get(): SootSimLocationResult;
17
+ set(fix: SootSimLocationFix): SootSimLocationResult;
18
+ clear(): SootSimLocationResult;
19
+ subscribe(listener: (status: SootSimLocationResult) => void): () => void;
20
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "peachsim",
3
- "version": "0.1.2428",
3
+ "version": "0.1.2430",
4
4
  "description": "Vite and Metro plugins, testing drivers, and SDK exports for peach.",
5
5
  "author": "Tamagui LLC",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -1 +1 @@
1
- {"abi":1,"sha256":"50f7ba9b5269b150a6bd2189f202e3cde6ecd829f705d24a70a88f13e6a92474","file":"node/cli-50f7ba9b5269b150a6bd2189f202e3cde6ecd829f705d24a70a88f13e6a92474.cjs"}
1
+ {"abi":1,"sha256":"c3e71b5eaf9166fc3fdc4333c354332e1ff41e1a6c71b6814afebe7c7d14bf9b","file":"node/cli-c3e71b5eaf9166fc3fdc4333c354332e1ff41e1a6c71b6814afebe7c7d14bf9b.cjs"}
@@ -10,6 +10,9 @@
10
10
  #import <CoreData/NSExpressionDescription.h>
11
11
  #import <CoreData/NSFetchIndexDescription.h>
12
12
  #import <CoreData/NSFetchIndexElementDescription.h>
13
+ #import <CoreData/NSEntityMigrationPolicy.h>
13
14
  #import <CoreData/NSMergePolicy.h>
14
15
  #import <CoreData/NSFetchRequest.h>
15
16
  #import <CoreData/NSFetchedResultsController.h>
17
+ #import <CoreData/NSPersistentStoreDescription.h>
18
+ #import <CoreData/NSPersistentContainer.h>
@@ -0,0 +1,17 @@
1
+ #pragma once
2
+ #import <Foundation/Foundation.h>
3
+ NS_ASSUME_NONNULL_BEGIN
4
+ @class NSManagedObject;
5
+ @class NSEntityMapping;
6
+ @class NSMigrationManager;
7
+ __attribute__((availability(ios,introduced=3.0)))
8
+ PEACH_SWIFT_CLASS(CoreData) @interface NSEntityMigrationPolicy : NSObject
9
+ - (BOOL)beginEntityMapping:(NSEntityMapping *)mapping manager:(NSMigrationManager *)manager error:(NSError **)error;
10
+ - (BOOL)createDestinationInstancesForSourceInstance:(NSManagedObject *)sInstance entityMapping:(NSEntityMapping *)mapping manager:(NSMigrationManager *)manager error:(NSError **)error;
11
+ - (BOOL)endInstanceCreationForEntityMapping:(NSEntityMapping *)mapping manager:(NSMigrationManager *)manager error:(NSError **)error;
12
+ - (BOOL)createRelationshipsForDestinationInstance:(NSManagedObject *)dInstance entityMapping:(NSEntityMapping *)mapping manager:(NSMigrationManager *)manager error:(NSError **)error;
13
+ - (BOOL)endRelationshipCreationForEntityMapping:(NSEntityMapping *)mapping manager:(NSMigrationManager *)manager error:(NSError **)error;
14
+ - (BOOL)performCustomValidationForEntityMapping:(NSEntityMapping *)mapping manager:(NSMigrationManager *)manager error:(NSError **)error;
15
+ - (BOOL)endEntityMapping:(NSEntityMapping *)mapping manager:(NSMigrationManager *)manager error:(NSError **)error;
16
+ @end
17
+ NS_ASSUME_NONNULL_END
@@ -6,6 +6,8 @@
6
6
  NS_ASSUME_NONNULL_BEGIN
7
7
  __attribute__((availability(ios,introduced=3.0))) NS_SWIFT_NONISOLATED NS_SWIFT_NONSENDABLE __attribute__((objc_requires_property_definitions))
8
8
  PEACH_SWIFT_CLASS(CoreData) @interface NSManagedObject : NSObject
9
+ - (__kindof NSManagedObject *)initWithEntity:(NSEntityDescription *)entity insertIntoManagedObjectContext:(nullable NSManagedObjectContext *)context NS_DESIGNATED_INITIALIZER;
10
+ - (instancetype)initWithContext:(NSManagedObjectContext *)moc API_AVAILABLE(ios(10.0));
9
11
  @property (nullable, nonatomic, readonly, assign) NSManagedObjectContext *managedObjectContext;
10
12
  @property (nonatomic, readonly, strong) NSEntityDescription *entity;
11
13
  @property (nonatomic, readonly, strong) NSManagedObjectID *objectID;
@@ -10,6 +10,9 @@ extern NSString * const NSManagedObjectContextObjectsDidChangeNotification __att
10
10
  extern NSString * const NSInsertedObjectsKey __attribute__((availability(ios,introduced=3.0)));
11
11
  extern NSString * const NSUpdatedObjectsKey __attribute__((availability(ios,introduced=3.0)));
12
12
  extern NSString * const NSDeletedObjectsKey __attribute__((availability(ios,introduced=3.0)));
13
+ extern NSString * const NSRefreshedObjectsKey __attribute__((availability(ios,introduced=3.0)));
14
+ extern NSString * const NSInvalidatedObjectsKey __attribute__((availability(ios,introduced=3.0)));
15
+ extern NSString * const NSInvalidatedAllObjectsKey __attribute__((availability(ios,introduced=3.0)));
13
16
  typedef NS_ENUM(NSUInteger, NSManagedObjectContextConcurrencyType) {
14
17
  NSConfinementConcurrencyType __attribute__((availability(ios,introduced=3.0,deprecated=9.0))) = 0x00,
15
18
  NSPrivateQueueConcurrencyType = 0x01,
@@ -31,13 +34,16 @@ PEACH_SWIFT_CLASS(CoreData) @interface NSManagedObjectContext : NSObject <NSCodi
31
34
  - (NSUInteger)countForFetchRequest:(NSFetchRequest *)request error:(NSError **)error __attribute__((availability(ios,introduced=3.0))) __attribute__((swift_error(nonnull_error)));
32
35
  - (void)deleteObject:(NSManagedObject *)object;
33
36
  - (void)refreshObject:(NSManagedObject *)object mergeChanges:(BOOL)flag;
37
+ - (void)reset;
34
38
  @property (nonatomic, readonly, strong) NSSet<__kindof NSManagedObject *> *insertedObjects;
35
39
  @property (nonatomic, readonly, strong) NSSet<__kindof NSManagedObject *> *updatedObjects;
36
40
  @property (nonatomic, readonly, strong) NSSet<__kindof NSManagedObject *> *deletedObjects;
37
41
  - (BOOL)save:(NSError **)error;
38
42
  @property (strong) id mergePolicy;
43
+ @property (nonatomic) BOOL automaticallyMergesChangesFromParent __attribute__((availability(ios,introduced=10.0)));
39
44
  - (BOOL)obtainPermanentIDsForObjects:(NSArray<NSManagedObject *> *)objects error:(NSError **)error __attribute__((availability(ios,introduced=3.0)));
40
45
  - (void)mergeChangesFromContextDidSaveNotification:(NSNotification *)notification __attribute__((availability(ios,introduced=3.0)));
46
+ + (void)mergeChangesFromRemoteContextSave:(NSDictionary *)changeNotificationData intoContexts:(NSArray<NSManagedObjectContext *> *)contexts __attribute__((availability(ios,introduced=9.0)));
41
47
  - (nullable __kindof NSManagedObject *)existingObjectWithID:(NSManagedObjectID *)objectID error:(NSError **)error __attribute__((availability(ios,introduced=3.0)));
42
48
  @end
43
49
  NS_ASSUME_NONNULL_END
@@ -0,0 +1,15 @@
1
+ #pragma once
2
+ #import <Foundation/Foundation.h>
3
+ #import <CoreData/NSManagedObjectContext.h>
4
+ #import <CoreData/NSPersistentStoreDescription.h>
5
+ @class NSManagedObjectModel;
6
+ NS_ASSUME_NONNULL_BEGIN
7
+ __attribute__((availability(ios,introduced=10.0))) NS_SWIFT_SENDABLE
8
+ PEACH_SWIFT_CLASS(CoreData) @interface NSPersistentContainer : NSObject
9
+ @property (strong, readonly) NSManagedObjectContext *viewContext;
10
+ @property (copy) NSArray<NSPersistentStoreDescription *> *persistentStoreDescriptions;
11
+ - (instancetype)initWithName:(NSString *)name managedObjectModel:(NSManagedObjectModel *)model NS_DESIGNATED_INITIALIZER;
12
+ - (void)loadPersistentStoresWithCompletionHandler:(void (^)(NSPersistentStoreDescription *, NSError * _Nullable))block NS_SWIFT_DISABLE_ASYNC;
13
+ - (NSManagedObjectContext *)newBackgroundContext NS_RETURNS_RETAINED;
14
+ @end
15
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,10 @@
1
+ #pragma once
2
+ #import <Foundation/Foundation.h>
3
+ NS_ASSUME_NONNULL_BEGIN
4
+ __attribute__((availability(ios,introduced=10.0)))
5
+ PEACH_SWIFT_CLASS(CoreData) @interface NSPersistentStoreDescription : NSObject <NSCopying>
6
+ - (void)setOption:(nullable NSObject *)option forKey:(NSString *)key;
7
+ @property BOOL shouldAddStoreAsynchronously;
8
+ - (instancetype)initWithURL:(NSURL *)url NS_DESIGNATED_INITIALIZER;
9
+ @end
10
+ NS_ASSUME_NONNULL_END
@@ -25,7 +25,7 @@ NS_ASSUME_NONNULL_BEGIN
25
25
  * Discussion:
26
26
  * Delegate for CLLocationManager.
27
27
  */
28
- @protocol CLLocationManagerDelegate<NSObject>
28
+ PEACH_SWIFT_CLASS(CoreLocation) @protocol CLLocationManagerDelegate<NSObject>
29
29
 
30
30
  @optional
31
31
 
@@ -0,0 +1,5 @@
1
+ framework module CoreServices [extern_c] [system] {
2
+ umbrella header "CoreServices.h"
3
+ export *
4
+ module * { export * }
5
+ }
@@ -0,0 +1,28 @@
1
+ //
2
+ // CSBase.h
3
+ // CoreSpotlight
4
+ //
5
+ // Copyright © 2015 Apple Inc. All rights reserved.
6
+ //
7
+
8
+ #import <Foundation/Foundation.h>
9
+
10
+ #if !defined(CORESPOTLIGHT_EXPORT)
11
+ #define CORESPOTLIGHT_EXPORT extern
12
+ #endif
13
+
14
+ #ifndef CS_AVAILABLE
15
+ #define CS_AVAILABLE(mac, ios) NS_AVAILABLE(mac, ios)
16
+ #endif
17
+
18
+ #ifndef CS_CLASS_AVAILABLE
19
+ #define CS_CLASS_AVAILABLE(mac, ios) NS_CLASS_AVAILABLE(mac, ios)
20
+ #endif
21
+
22
+ #ifndef CS_DEPRECATED
23
+ #define CS_DEPRECATED(_macIntro, _macDep, _iosIntro, _iosDep, ...) NS_DEPRECATED(_macIntro, _macDep, _iosIntro, _iosDep, __VA_ARGS__)
24
+ #endif
25
+
26
+ #ifndef CS_TVOS_UNAVAILABLE
27
+ #define CS_TVOS_UNAVAILABLE __TVOS_PROHIBITED
28
+ #endif
@@ -0,0 +1,21 @@
1
+ //
2
+ // CSImportExtension.h
3
+ // CoreSpotlight
4
+ //
5
+ // Copyright © 2020–2026 Apple Inc. All rights reserved.
6
+ //
7
+
8
+ #import <CoreSpotlight/CSSearchableItemAttributeSet.h>
9
+
10
+ #import <Foundation/Foundation.h>
11
+
12
+ API_AVAILABLE(macos(12.0), ios(15.0), visionos(1.0))
13
+ API_UNAVAILABLE(tvos, watchos)
14
+ PEACH_SWIFT_CLASS(SwiftUI) @interface CSImportExtension : NSObject <NSExtensionRequestHandling>
15
+
16
+ // The developer should implement this method to import the file located at contentURL, and update the provided attributes.
17
+ - (BOOL)updateAttributes:(CSSearchableItemAttributeSet * _Nonnull)attributes
18
+ forFileAtURL:(NSURL * _Nonnull)contentURL
19
+ error:(NSError * _Nullable * _Nonnull)error;
20
+
21
+ @end
@@ -0,0 +1,17 @@
1
+ //
2
+ // CSIndexExtensionRequestHandler.h
3
+ // CoreSpotlight
4
+ //
5
+ // Copyright © 2015–2026 Apple Inc. All rights reserved.
6
+ //
7
+
8
+ #import <CoreSpotlight/CSSearchableIndex.h>
9
+
10
+ #import <Foundation/Foundation.h>
11
+
12
+ __attribute__((visibility("default")))
13
+ API_AVAILABLE(macos(10.11), ios(9.0), visionos(1.0))
14
+ API_UNAVAILABLE(tvos, watchos)
15
+ PEACH_SWIFT_CLASS(SwiftUI) @interface CSIndexExtensionRequestHandler : NSObject <NSExtensionRequestHandling,CSSearchableIndexDelegate>
16
+
17
+ @end
@@ -0,0 +1,28 @@
1
+ //
2
+ // CSPerson.h
3
+ // CoreSpotlight
4
+ //
5
+ // Copyright © 2015–2026 Apple Inc. All rights reserved.
6
+ //
7
+
8
+ #import <Foundation/Foundation.h>
9
+
10
+ NS_ASSUME_NONNULL_BEGIN
11
+
12
+ API_AVAILABLE(macos(10.11), ios(9.0), visionos(1.0))
13
+ API_UNAVAILABLE(tvos, watchos)
14
+ PEACH_SWIFT_CLASS(SwiftUI) @interface CSPerson : NSObject <NSSecureCoding,NSCopying>
15
+
16
+ - (instancetype)initWithDisplayName:(nullable NSString *)displayName handles:(NSArray<NSString*> *)handles handleIdentifier:(NSString *)handleIdentifier;
17
+
18
+ @property (readonly,nullable) NSString *displayName; //An optional display name for displaying this recipient
19
+
20
+ @property (readonly) NSArray<NSString*> *handles; //An array of contact handles, e.g. phone numbers
21
+
22
+ @property (readonly) NSString *handleIdentifier; //A CNContactPropertyKey to identify the type of of handle, e.g. CNContactPhoneNumbersKey
23
+
24
+ @property (copy,nullable) NSString *contactIdentifier; //If the property has already been resolved, the identifier for the Contact
25
+
26
+ @end
27
+
28
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,77 @@
1
+ //
2
+ // CSSearchQuery.h
3
+ // CoreSpotlight
4
+ //
5
+ // Copyright © 2015–2026 Apple Inc. All rights reserved.
6
+ //
7
+
8
+ #import <Foundation/Foundation.h>
9
+
10
+ NS_ASSUME_NONNULL_BEGIN
11
+
12
+ extern NSErrorDomain const CSSearchQueryErrorDomain API_AVAILABLE(macos(10.12), ios(10.0), visionos(1.0)) API_UNAVAILABLE(tvos, watchos);
13
+
14
+ typedef NS_ENUM(NSInteger, CSSearchQueryErrorCode) {
15
+ CSSearchQueryErrorCodeUnknown = -2000,
16
+ CSSearchQueryErrorCodeIndexUnreachable = -2001,
17
+ CSSearchQueryErrorCodeInvalidQuery = -2002,
18
+ CSSearchQueryErrorCodeCancelled = -2003,
19
+ } API_AVAILABLE(macos(10.12), ios(10.0), visionos(1.0)) API_UNAVAILABLE(tvos, watchos);
20
+
21
+ typedef NS_OPTIONS(NSUInteger, CSSearchQuerySourceOptions) {
22
+ CSSearchQuerySourceOptionDefault = 0,
23
+ CSSearchQuerySourceOptionAllowMail = 1 << 0, // com.apple.corespotlight.search.allow.mail entitlement
24
+ } NS_SWIFT_NAME(CSSearchQueryContext.SourceOptions) API_AVAILABLE(macos(13.0)) API_UNAVAILABLE(ios, tvos, watchos, visionos);
25
+
26
+ @class CSSearchableItem;
27
+
28
+ API_AVAILABLE(macos(13.0), ios(16.0), visionos(1.0))
29
+ API_UNAVAILABLE(tvos, watchos)
30
+ PEACH_SWIFT_CLASS(SwiftUI) @interface CSSearchQueryContext : NSObject<NSSecureCoding, NSCopying>
31
+
32
+ @property (nonatomic, strong) NSArray<NSString *> *fetchAttributes;
33
+ @property (nonatomic, copy) NSArray<NSString *> *filterQueries;
34
+ @property (nullable, nonatomic, strong) NSString *keyboardLanguage;
35
+
36
+ @property (nonatomic, assign) CSSearchQuerySourceOptions sourceOptions API_UNAVAILABLE(ios, tvos, watchos, visionos);
37
+
38
+ @end
39
+
40
+ API_AVAILABLE(macos(10.12), ios(10.0), visionos(1.0))
41
+ API_UNAVAILABLE(tvos, watchos)
42
+ PEACH_SWIFT_CLASS(SwiftUI) @interface CSSearchQuery : NSObject
43
+
44
+ - (instancetype)init NS_UNAVAILABLE;
45
+
46
+ // queryString: The query string (e.g., 'contentType == "public.email-message" && subject != "Re:*"')
47
+ - (instancetype)initWithQueryString:(NSString * _Nonnull)queryString queryContext:(CSSearchQueryContext * _Nullable)queryContext NS_DESIGNATED_INITIALIZER API_AVAILABLE(macos(13.0), ios(16.0), visionos(1.0)) API_UNAVAILABLE(tvos, watchos);
48
+
49
+ // queryString: The query string (e.g., 'contentType == "public.email-message" && subject != "Re:*"')
50
+ // attributes: The attributes to be fetched for the searchable items
51
+ - (instancetype)initWithQueryString:(NSString *)queryString attributes:(NSArray<NSString *> * _Nullable)attributes API_DEPRECATED("Use initWithQueryString:queryContext instead", macos(10.12, 13.0), ios(10.0, 16.0), visionos(1.0, 1.0)) API_UNAVAILABLE(tvos, watchos);
52
+
53
+ @property (readonly, getter=isCancelled) BOOL cancelled;
54
+
55
+ // The query will update the count before each foundItemsHandler invocation to reflect
56
+ // the number of items found so far; if foundItemsHandler is nil then the count will
57
+ // contain the total number of found items when the query completes.
58
+ @property (readonly) NSUInteger foundItemCount;
59
+
60
+ // The foundItemsHandler will be invoked repeatedly with a new batch of searchable items.
61
+ // The query serializes all the foundItemsHandler invocations.
62
+ @property (nullable, copy) void (^foundItemsHandler)(NSArray<CSSearchableItem *> *items);
63
+
64
+ @property (nullable, copy) void (^completionHandler)(NSError * _Nullable error);
65
+
66
+ // An array of NSFileProtectionComplete, NSFileProtectionCompleteUnlessOpen,
67
+ // or NSFileProtectionCompleteUntilFirstUserAuthentication.
68
+ // By default the data protection will be read from the "com.apple.developer.default-data-protection"
69
+ // entitlement if any or NSFileProtectionCompleteUntilFirstUserAuthentication will be used otherwise.
70
+ @property (copy) NSArray<NSFileProtectionType> *protectionClasses;
71
+
72
+ - (void)start;
73
+ - (void)cancel;
74
+
75
+ @end
76
+
77
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,154 @@
1
+ //
2
+ // CSSearchableIndex.h
3
+ // CoreSpotlight
4
+ //
5
+ // Copyright © 2015–2026 Apple Inc. All rights reserved.
6
+ //
7
+
8
+ #import <CoreSpotlight/CSSearchableItem.h>
9
+
10
+ #import <Foundation/Foundation.h>
11
+
12
+ NS_ASSUME_NONNULL_BEGIN
13
+
14
+ extern NSString * const CSIndexErrorDomain API_AVAILABLE(macos(10.11), ios(9.0), visionos(1.0)) API_UNAVAILABLE(tvos, watchos);
15
+
16
+ typedef NS_ENUM(NSInteger, CSIndexErrorCode) {
17
+ CSIndexErrorCodeUnknownError = -1,
18
+ CSIndexErrorCodeIndexUnavailableError = -1000, //The indexer was unavailable
19
+ CSIndexErrorCodeInvalidItemError = -1001, //The CSSearchableItem is invalid for some reason
20
+ CSIndexErrorCodeInvalidClientStateError = -1002, //The provided clientState was not valid for some reason
21
+ CSIndexErrorCodeRemoteConnectionError = -1003, //There was an error trying to communicate with the remote process
22
+ CSIndexErrorCodeQuotaExceeded = -1004, //Quota for bundle was exceeded
23
+ CSIndexErrorCodeIndexingUnsupported = -1005, //Indexing isn't supported on this device
24
+ CSIndexErrorCodeMismatchedClientState API_AVAILABLE(macos(15.0), ios(18.0), visionos(2.0)) API_UNAVAILABLE(tvos, watchos) = -1006, //The expected client state did not match the indexed one.
25
+ } API_AVAILABLE(macos(10.11), ios(9.0), visionos(1.0)) API_UNAVAILABLE(tvos, watchos);
26
+
27
+ @protocol CSSearchableIndexDelegate;
28
+
29
+ API_AVAILABLE(macos(10.11), ios(9.0), visionos(1.0))
30
+ API_UNAVAILABLE(tvos, watchos)
31
+ PEACH_SWIFT_CLASS(SwiftUI) @interface CSSearchableIndex : NSObject
32
+
33
+ @property (weak,nullable) id<CSSearchableIndexDelegate> indexDelegate;
34
+
35
+ @property (nonatomic, readonly) NSFileProtectionType protectionClass API_AVAILABLE(macos(27.0), ios(27.0), visionos(27.0)) API_UNAVAILABLE(tvos, watchos);
36
+
37
+ // Not all devices support indexing. Call this method to check if indexing is supported on the current device.
38
+ + (BOOL)isIndexingAvailable;
39
+
40
+ + (instancetype)defaultSearchableIndex;
41
+
42
+ // Apps can set a name for the index instance. This name is used as a handle for the client state used with the batch API, allowing a single client to have multiple client states; you have to retrieve the client state for an index instance with the same name as you used when setting the client state.
43
+ - (instancetype)initWithName:(NSString *)name;
44
+
45
+ // Apps can set a default protection class for items in their entitlements. You can alternately create an instance with a custom protection class to use on iOS. It should be one of NSFileProtectionComplete, NSFileProtectionCompleteUnlessOpen, or NSFileProtectionCompleteUntilFirstUserAuthentication.
46
+ - (instancetype)initWithName:(NSString *)name protectionClass:(nullable NSFileProtectionType)protectionClass;
47
+
48
+ // Call this method to add or update items in the index.
49
+ // Completion handlers will be called once the data has been journaled by the index. If the completion handler returns an error, the client should retry, as it was not journaled correctly.
50
+ // reindexSearchableItemsWithIdentifiers will be called if the journaling completed successfully but the data was not able to be indexed for some reason.
51
+ - (void)indexSearchableItems:(NSArray<CSSearchableItem *> *)items completionHandler:(void (^ __nullable)(NSError * __nullable error))completionHandler;
52
+
53
+ // Call this method to remove items with the given identifiers from the index.
54
+ // Completion handlers will be called once the data has been journaled by the index. If the completion handler returns an error, the client should retry, as it was not journaled correctly.
55
+ // reindexSearchableItemsWithIdentifiers will be called if the journaling completed successfully but the data was not able to be indexed for some reason.
56
+ - (void)deleteSearchableItemsWithIdentifiers:(NSArray<NSString *> *)identifiers completionHandler:(void (^ __nullable)(NSError * __nullable error))completionHandler;
57
+
58
+ // Call this method on the index to remove any items from the index with the given domain identifiers.
59
+ // The delete is recursive so if domain identifiers are of the form <account-id>.<mailbox-id>, for example,
60
+ // calling delete with <account-id> will delete all the searchable items with that account and any mailbox.
61
+ - (void)deleteSearchableItemsWithDomainIdentifiers:(NSArray<NSString *> *)domainIdentifiers completionHandler:(void (^ __nullable)(NSError * __nullable error))completionHandler;
62
+
63
+ // Call this method to delete all searchable items from the index.
64
+ - (void)deleteAllSearchableItemsWithCompletionHandler:(void (^ __nullable)(NSError * __nullable error))completionHandler;
65
+
66
+ @end
67
+
68
+ API_AVAILABLE(macos(10.11), ios(9.0), visionos(1.0))
69
+ API_UNAVAILABLE(tvos, watchos)
70
+ @interface CSSearchableIndex (CSOptionalBatching)
71
+
72
+ // Batching:
73
+
74
+ // For some clients, it may be beneficial to batch updates to the index. Those clients can use batching and persist client state information (< 250 bytes) in the index. That state information can be used to determine where indexing needs to resume from in case of a client crash or jetsam. Batching is supported for indexSearchableItems deleteSearchableItemsWithIdentifiers. Persisted client state will be reset whenever deleteAllSearchableItemsWithCompletionHandler is called.
75
+
76
+ // Note: Batching is unsupported for the CSSearchableIndex returned by the defaultSearchableIndex method
77
+
78
+ // Thread safety: In batch mode, the client takes responsibility for protecting the private CSSearchableIndex instance from concurrent access from multiple threads. Concurrent calls to the index instance will have undefined results. beginIndexBatch must not be called again before endIndexBatchWithClientState:completionHandler: has returned (it is however safe to call before the completionHandler passed to endIndexBatchWithClientState:completionHandler has been called).
79
+
80
+
81
+ // Begin a batch of index adds, updates, or deletes.
82
+ - (void)beginIndexBatch;
83
+
84
+ // End a batch passing in expected client state information to be persisted in the index, along with new client state for the current batch. The completion handler will be called once the client state has been persisted. If the client state does not match expected, an error of CSIndexErrorCodeMismatchedClientState will be returned.
85
+ - (void)endIndexBatchWithExpectedClientState:(nullable NSData *)expectedClientState newClientState:(NSData *)newClientState completionHandler:(void (^ __nullable)(NSError * __nullable error))completionHandler NS_SWIFT_NAME(endIndexBatch(expectedClientState:newClientState:completionHandler:)) API_AVAILABLE(macos(15.0), ios(18.0), visionos(2.0)) API_UNAVAILABLE(tvos, watchos);
86
+
87
+ // End a batch passing in client state information to be persisted in the index. The completion handler will be called once the client state has been persisted.
88
+ - (void)endIndexBatchWithClientState:(NSData *)clientState completionHandler:(void (^ __nullable)(NSError * __nullable error))completionHandler;
89
+
90
+ // Async fetches the app's last stored client state information.
91
+ - (void)fetchLastClientStateWithCompletionHandler:(void (^)(NSData * __nullable clientState,NSError * __nullable error))completionHandler;
92
+
93
+ @end
94
+
95
+ API_AVAILABLE(macos(13.0))
96
+ API_UNAVAILABLE(ios, tvos, watchos, visionos)
97
+ @interface CSSearchableIndex (CSExternalProvider)
98
+
99
+ - (void)fetchDataForBundleIdentifier:(NSString *)bundleIdentifier
100
+ itemIdentifier:(NSString *)itemIdentifier
101
+ contentType:(UTType *)contentType
102
+ completionHandler:(void (^)(NSData * _Nullable, NSError * _Nullable))completionHandler;
103
+
104
+ @end
105
+
106
+
107
+ // An application that is long running should provide a CSSearchableIndexDelegate conforming object to handle communication from the index.
108
+ // Alternatively, an app can provide an extension whose request handler conforms to this protocol and the extension will be called if the app isn't running.
109
+ API_AVAILABLE(macos(10.11), ios(9.0), visionos(1.0))
110
+ API_UNAVAILABLE(tvos, watchos)
111
+ @protocol CSSearchableIndexDelegate <NSObject>
112
+
113
+ @required
114
+
115
+ // The index requests that the delegate should reindex all of its searchable data and clear any local state that it might have persisted because the index has been lost.
116
+ // The app or extension should call indexSearchableItems on the passed in CSSearchableIndex.
117
+ // The app or extension must call the acknowledgement handler once any client state information has been persisted, that way, in case of a crash, the indexer can call this again.
118
+ // If the app passes clientState information in a batch, the acknowledgement can be called right away.
119
+ // The passed in index shouldn't be used in an extension if a custom protection class is needed.
120
+ - (void)searchableIndex:(CSSearchableIndex *)searchableIndex reindexAllSearchableItemsWithAcknowledgementHandler:(void (^)(void))acknowledgementHandler;
121
+
122
+ // The index requests that the delegate should reindex the searchable data with the provided identifiers.
123
+ // The app or extension should call indexSearchableItems:completionHandler on the passed in index CSSearchableIndex to update the items' states.
124
+ // The app or extension must call the acknowledgement handler once any client state information has been persisted, that way, in case of a crash, the indexer can call this again.
125
+ // If the app passes clientState information in a batch, the acknowledgement can be called right away.
126
+ // The passed in index shouldn't be used in an extension if a custom protection class is needed.
127
+ - (void)searchableIndex:(CSSearchableIndex *)searchableIndex reindexSearchableItemsWithIdentifiers:(NSArray <NSString *> *)identifiers
128
+ acknowledgementHandler:(void (^)(void))acknowledgementHandler;
129
+
130
+ @optional
131
+
132
+ // When on battery power, it is possible for indexing to slowed down to prevent battery drain.
133
+ // The developer may want to optionally implement these methods to receive notice that indexing is being throttled and react accordingly (e.g. by priortizing indexing of more important content).
134
+ - (void)searchableIndexDidThrottle:(CSSearchableIndex *)searchableIndex;
135
+ - (void)searchableIndexDidFinishThrottle:(CSSearchableIndex *)searchableIndex;
136
+
137
+ // The developer may provide a NSData representation if type was specified in providerDataTypeIdentifiers property.
138
+ - (nullable NSData *)dataForSearchableIndex:(CSSearchableIndex *)searchableIndex itemIdentifier:(NSString *)itemIdentifier typeIdentifier:(NSString *)typeIdentifier error:(out NSError ** __nullable)outError API_AVAILABLE(macos(10.13), ios(11.0), visionos(1.0)) API_UNAVAILABLE(tvos, watchos);
139
+
140
+ // The developer may provide a NSURL to file representation representation if type was specified from providerDataTypeIdentifiers or providerInPlaceFileTypeIdentifiers property.
141
+ - (nullable NSURL *)fileURLForSearchableIndex:(CSSearchableIndex *)searchableIndex itemIdentifier:(NSString *)itemIdentifier typeIdentifier:(NSString *)typeIdentifier inPlace:(BOOL)inPlace error:(out NSError ** __nullable)outError API_AVAILABLE(macos(10.13), ios(11.0), visionos(1.0)) API_UNAVAILABLE(tvos, watchos);
142
+
143
+ // The index requests that the delegate provide searchable items for the provided identifiers with the default protection class
144
+ - (void)searchableItemsForIdentifiers:(NSArray <NSString *> *)identifiers searchableItemsHandler:(void (^)(NSArray<CSSearchableItem *> *items))searchableItemsHandler NS_SWIFT_ASYNC(2) API_AVAILABLE(macos(15.4), ios(18.4), visionos(2.4)) API_UNAVAILABLE(tvos, watchos);
145
+
146
+ // The index requests that the delegate provide searchable items for the provided identifiers in the specified protection class
147
+ - (void)searchableItemsForIdentifiers:(NSArray <NSString *> *)identifiers protectionClass:(NSFileProtectionType)protectionClass searchableItemsHandler:(void (^)(NSArray<CSSearchableItem *> *items))searchableItemsHandler NS_SWIFT_ASYNC(3) API_AVAILABLE(macos(27.0), ios(27.0), visionos(27.0)) API_UNAVAILABLE(tvos, watchos);
148
+
149
+ // The developer may want to be notified when an item has been updated with specific attributes (see: CSSearchableItemUpdateListenerOptions for Apple Intelligence attributes)
150
+ - (void)searchableItemsDidUpdate:(NSArray<CSSearchableItem *> *)items API_AVAILABLE(macos(15.4), ios(18.4), visionos(2.4)) API_UNAVAILABLE(tvos, watchos);
151
+
152
+ @end
153
+
154
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,19 @@
1
+ //
2
+ // CSSearchableIndexDescription.h
3
+ // CoreSpotlight
4
+ //
5
+ // Copyright © 2026 Apple Inc. All rights reserved.
6
+ //
7
+
8
+ #import <Foundation/Foundation.h>
9
+
10
+ NS_ASSUME_NONNULL_BEGIN
11
+
12
+ API_AVAILABLE(macos(27.0), ios(27.0), visionos(27.0))
13
+ API_UNAVAILABLE(tvos, watchos)
14
+ PEACH_SWIFT_CLASS(SwiftUI) @interface CSSearchableIndexDescription : NSObject <NSSecureCoding, NSCopying>
15
+
16
+ @property (nonatomic, readonly, nullable) NSFileProtectionType protectionClass;
17
+ @end
18
+
19
+ NS_ASSUME_NONNULL_END