peachsim 0.1.1830 → 0.1.1832

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 (130) 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 +20 -9
  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 +1 -1
  25. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  26. package/dist-lib/expo-swift-bundle.cjs +3 -3
  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 +20 -9
  31. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  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 +2 -2
  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 +2 -2
  47. package/dist-lib/native-app-identity-project.cjs +2 -2
  48. package/dist-lib/native-app-identity-project.mjs +2 -2
  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 +53 -53
  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 +20 -9
  68. package/dist-lib/swift-compile.cjs +2 -2
  69. package/dist-lib/swift-compile.mjs +2 -2
  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 +3 -3
  77. package/dist-lib/vite.cjs +1 -1
  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/render-worker/resilient-frame-clock.d.ts +1 -0
  81. package/package.json +1 -1
  82. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHAdjustmentData.h +28 -0
  83. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHAsset.h +129 -0
  84. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHAssetChangeRequest.h +143 -0
  85. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHAssetCollection.h +67 -0
  86. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHAssetCollectionChangeRequest.h +60 -0
  87. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHAssetCreationRequest.h +55 -0
  88. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHAssetExtendedMetadata.h +33 -0
  89. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHAssetResource.h +67 -0
  90. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHAssetResourceManager.h +55 -0
  91. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHAssetResourceUploadJob.h +79 -0
  92. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHAssetResourceUploadJobChangeRequest.h +94 -0
  93. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHAssetResourceUploadJobOptions.h +23 -0
  94. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHChange.h +91 -0
  95. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHChangeRequest.h +12 -0
  96. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHCloudIdentifier.h +133 -0
  97. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHCollection.h +68 -0
  98. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHCollectionList.h +59 -0
  99. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHCollectionListChangeRequest.h +95 -0
  100. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHContentEditingInput.h +55 -0
  101. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHContentEditingOutput.h +37 -0
  102. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHError.h +56 -0
  103. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHFetchOptions.h +48 -0
  104. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHFetchResult.h +43 -0
  105. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHImageManager.h +251 -0
  106. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHLivePhoto.h +52 -0
  107. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHLivePhotoEditingContext.h +131 -0
  108. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHObject.h +32 -0
  109. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHPersistentChange.h +29 -0
  110. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHPersistentChangeFetchResult.h +26 -0
  111. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHPersistentChangeToken.h +21 -0
  112. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHPersistentObjectChangeDetails.h +30 -0
  113. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHPhotoLibrary.h +174 -0
  114. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHProject.h +35 -0
  115. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PHProjectChangeRequest.h +66 -0
  116. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/Photos.apinotes +12 -0
  117. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/Photos.h +58 -0
  118. package/sdk/ios/System/Library/Frameworks/Photos.framework/Headers/PhotosTypes.h +332 -0
  119. package/sdk/ios/System/Library/Frameworks/Photos.framework/Modules/module.modulemap +5 -0
  120. package/sdk/ios/System/Library/Frameworks/PhotosUI.framework/Headers/PHContentEditingController.h +48 -0
  121. package/sdk/ios/System/Library/Frameworks/PhotosUI.framework/Headers/PHLivePhotoView.h +117 -0
  122. package/sdk/ios/System/Library/Frameworks/PhotosUI.framework/Headers/PHPhotoLibrary+PhotosUISupport.h +56 -0
  123. package/sdk/ios/System/Library/Frameworks/PhotosUI.framework/Headers/PHPicker.h +311 -0
  124. package/sdk/ios/System/Library/Frameworks/PhotosUI.framework/Headers/PHSharedAlbumCreationViewController.h +112 -0
  125. package/sdk/ios/System/Library/Frameworks/PhotosUI.framework/Headers/PHSharedAlbumCustomizationViewController.h +76 -0
  126. package/sdk/ios/System/Library/Frameworks/PhotosUI.framework/Headers/PHSharedAlbumPostingViewController.h +72 -0
  127. package/sdk/ios/System/Library/Frameworks/PhotosUI.framework/Headers/PhotosUI.h +38 -0
  128. package/sdk/ios/System/Library/Frameworks/PhotosUI.framework/Modules/module.modulemap +6 -0
  129. package/src/nitro-dependencies.ts +3 -3
  130. package/src/turbo-source.ts +15 -2
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1830 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1832 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1830 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1832 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -12153,7 +12153,7 @@ var darwinRecordsRegion = (quoted) => quoted.length ? ["-Wl,--start-lib", ...quo
12153
12153
  var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
12154
12154
  var MULTI_MANIFEST_VERSION = 65;
12155
12155
  var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
12156
- var compilerSourceDigest = true ? "3d055fb169dadbe3931422242039d4edc7f595c6301256776bac390c04b04fff" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
12156
+ var compilerSourceDigest = true ? "43ef0206978ba7dbec8813f77e45d2d7d0306805c31b29aacf761ef88f539a37" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
12157
12157
  function swiftArtifactHash(input, release, moduleRoot) {
12158
12158
  const hash = (0, import_node_crypto8.createHash)("sha256");
12159
12159
  hash.update(`swift-compile
@@ -24869,7 +24869,7 @@ function standinSourceDigest(srcDir = __sootsim_import_meta_dirname) {
24869
24869
  }
24870
24870
  return hash.digest("hex");
24871
24871
  }
24872
- var STANDIN_SOURCE_DIGEST = true ? "79ad68bba9361725e7fb6e0ceebb6c8c4dcfc875b2bc35481536c804a131453d" : standinSourceDigest();
24872
+ var STANDIN_SOURCE_DIGEST = true ? "8ba9cb730f03c9e119cdb9f8d3e1fa3f379c529c09e79b4e9c61d30fa5f81bf1" : standinSourceDigest();
24873
24873
 
24874
24874
  // src/swift-standins.ts
24875
24875
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
package/dist-lib/vite.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1830 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1832 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1830 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1832 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1830 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1832 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/worklet-executable.ts
4
4
  import { parse } from "acorn";
@@ -18,5 +18,6 @@ export interface ResilientFrameClock {
18
18
  getStats(): ResilientFrameClockStats;
19
19
  resetStats(): void;
20
20
  dispose(): void;
21
+ nextDisplayAfter(t: number): number | null;
21
22
  }
22
23
  export declare function createResilientFrameClock(options: ResilientFrameClockOptions): ResilientFrameClock;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "peachsim",
3
- "version": "0.1.1830",
3
+ "version": "0.1.1832",
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",
@@ -0,0 +1,28 @@
1
+ //
2
+ // PHAdjustmentData.h
3
+ // Photos
4
+ //
5
+ // Copyright (c) 2014 Apple Inc. All rights reserved.
6
+ //
7
+
8
+ #import <Foundation/Foundation.h>
9
+
10
+ NS_ASSUME_NONNULL_BEGIN
11
+ API_AVAILABLE_BEGIN(macos(10.11), ios(8), tvos(10))
12
+
13
+ OS_EXPORT
14
+ @interface PHAdjustmentData : NSObject
15
+
16
+ - (instancetype)initWithFormatIdentifier:(NSString *)formatIdentifier formatVersion:(NSString *)formatVersion data:(NSData *)data;
17
+
18
+ // Used to identify the format of the data blob (e.g. identifier "com.apple.myapp" and version "1.0")
19
+ @property (readonly, copy) NSString *formatIdentifier;
20
+ @property (readonly, copy) NSString *formatVersion;
21
+
22
+ // Binary blob that describes the adjustments applied to the asset.
23
+ @property (readonly, strong) NSData *data;
24
+
25
+ @end
26
+
27
+ API_AVAILABLE_END
28
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,129 @@
1
+ //
2
+ // PHAsset.h
3
+ // Photos
4
+ //
5
+ // Copyright (c) 2017 Apple Inc. All rights reserved.
6
+ //
7
+
8
+ #import <Photos/PHObject.h>
9
+ #import <Photos/PhotosTypes.h>
10
+ #import <Photos/PHFetchResult.h>
11
+ #import <Photos/PHPhotoLibrary.h>
12
+
13
+ #import <ImageIO/ImageIO.h>
14
+ #import <CoreLocation/CLLocation.h>
15
+
16
+ @class UTType;
17
+ @class PHFetchOptions;
18
+ @class PHAssetCollection;
19
+ @class PHAssetExtendedMetadata;
20
+
21
+ NS_ASSUME_NONNULL_BEGIN
22
+ API_AVAILABLE_BEGIN(macos(10.13), ios(8), tvos(10))
23
+
24
+ OS_EXPORT
25
+ NS_SWIFT_SENDABLE
26
+ PEACH_SWIFT_CLASS(SwiftUI) @interface PHAsset : PHObject
27
+
28
+ #pragma mark - Properties
29
+
30
+ // Playback style describes how the asset should be presented to the user (regardless of the backing media for that asset). Use this value to choose the type of view and the appropriate APIs on the PHImageManager to display this asset
31
+ @property (nonatomic, assign, readonly) PHAssetPlaybackStyle playbackStyle API_AVAILABLE(macos(10.15), ios(11), tvos(11));
32
+
33
+ /// The Live Photo playback variation for the asset.
34
+ ///
35
+ /// Use this value to determine whether a Live Photo plays back as a Long Exposure, Mirror (Bounce), or
36
+ /// Autoloop (Loop):
37
+ /// - `PHAssetPlaybackVariationNone`: the asset is not a Live Photo, or uses the default Live Photo presentation.
38
+ /// - `PHAssetPlaybackVariationAutoloop`: the Live Photo plays back as a Loop.
39
+ /// - `PHAssetPlaybackVariationMirror`: the Live Photo plays back as a Bounce.
40
+ /// - `PHAssetPlaybackVariationLongExposure`: the Live Photo plays back as a Long Exposure.
41
+ @property (nonatomic, assign, readonly) PHAssetPlaybackVariation playbackVariation API_AVAILABLE(macos(10.15), ios(11), tvos(11));
42
+
43
+ @property (nonatomic, assign, readonly) PHAssetMediaType mediaType;
44
+ @property (nonatomic, assign, readonly) PHAssetMediaSubtype mediaSubtypes;
45
+
46
+ /// The type of image or video data that is presented for the asset
47
+ @property (nonatomic, copy, readonly) UTType *contentType API_AVAILABLE(macos(26.0), ios(26.0), tvos(26.0), visionos(26.0));
48
+
49
+ @property (nonatomic, assign, readonly) NSUInteger pixelWidth;
50
+ @property (nonatomic, assign, readonly) NSUInteger pixelHeight;
51
+
52
+ /// The date and time of this asset's creation (can be updated by the user)
53
+ @property (nonatomic, strong, readonly, nullable) NSDate *creationDate;
54
+
55
+ /// The date and time of the last modification to this asset or one of its properties
56
+ @property (nonatomic, strong, readonly, nullable) NSDate *modificationDate;
57
+
58
+ /// The date and time this asset was added to the photo library (from the device that was used to add this asset)
59
+ @property (nonatomic, strong, readonly, nullable) NSDate *addedDate API_AVAILABLE(macos(26.0), ios(26.0), tvos(26.0), visionos(26.0));
60
+
61
+ @property (nonatomic, strong, readonly, nullable) CLLocation *location;
62
+
63
+ @property (nonatomic, assign, readonly) NSTimeInterval duration;
64
+
65
+ // a hidden asset will be excluded from moment collections, but may still be included in other smart or regular album collections
66
+ @property (nonatomic, assign, readonly, getter=isHidden) BOOL hidden;
67
+
68
+ @property (nonatomic, assign, readonly, getter=isFavorite) BOOL favorite;
69
+
70
+ /// The rating of this PHAsset.
71
+ @property (nonatomic, assign, readonly) PHAssetRating rating API_AVAILABLE(macos(27), ios(27), tvos(27), visionos(27));
72
+
73
+ // deprecated, will always return NO for now.
74
+ @property (nonatomic, assign, readonly, getter=isSyncFailureHidden) BOOL syncFailureHidden API_DEPRECATED("No longer supported", macos(10.14, 10.15)) API_UNAVAILABLE(ios, tvos, watchos);
75
+
76
+ @property (nonatomic, strong, readonly, nullable) NSString *burstIdentifier API_AVAILABLE(macos(10.15));
77
+ @property (nonatomic, assign, readonly) PHAssetBurstSelectionType burstSelectionTypes API_AVAILABLE(macos(10.15));
78
+ @property (nonatomic, assign, readonly) BOOL representsBurst API_AVAILABLE(macos(10.15));
79
+
80
+ @property (nonatomic, assign, readonly) PHAssetSourceType sourceType API_AVAILABLE(ios(9));
81
+
82
+ @property (nonatomic, assign, readonly) BOOL hasAdjustments API_AVAILABLE(macos(12), ios(15), tvos(15));
83
+ // only applies to adjusted assets
84
+ @property (nonatomic, copy, readonly, nullable) NSString *adjustmentFormatIdentifier API_AVAILABLE(macos(12), ios(15), tvos(15));
85
+
86
+ /// The original resource used as the basis for rendering this asset's derivatives.
87
+ ///
88
+ /// This value is only meaningful for assets that have a RAW alternate, such as
89
+ /// RAW+JPEG assets, where it indicates whether the RAW or the compressed resource
90
+ /// serves as the unadjusted base. For all other assets the value is
91
+ /// ``PHOriginalResourceChoice/PHOriginalResourceChoiceCompressed``.
92
+ @property (nonatomic, assign, readonly) PHOriginalResourceChoice originalResourceChoice API_AVAILABLE(macos(27), ios(27), tvos(27), visionos(27));
93
+
94
+ /// An accessor to other asset properties.
95
+ ///
96
+ /// By default these properties are fetched on demand. They can be prefetched by
97
+ /// toggling `PHFetchOptions.prefetchAssetExtendedMetadata`.
98
+ @property (strong, readonly) PHAssetExtendedMetadata *extendedMetadata API_AVAILABLE(macos(27), ios(27), tvos(27), visionos(27));
99
+
100
+ @property (nonatomic, assign, readonly) PHAssetAdjustmentsState adjustmentsState API_AVAILABLE(macos(15), ios(18), tvos(18), visionos(2));
101
+
102
+ /// The date when the asset was last edited.
103
+ ///
104
+ /// If the asset has never been edited, then this property is nil.
105
+ /// If the asset was edited and later reverted, such that hasAdjustments is false, then `adjustmentTimestamp` is the timestamp of the revert operation.
106
+ @property (nonatomic, strong, readonly, nullable) NSDate *adjustmentTimestamp API_AVAILABLE(macos(15), ios(18), tvos(18), visionos(2));
107
+
108
+ #pragma mark - Capabilities
109
+
110
+ - (BOOL)canPerformEditOperation:(PHAssetEditOperation)editOperation API_AVAILABLE(macos(10.15));
111
+
112
+ #pragma mark - Fetching assets
113
+
114
+ + (PHFetchResult<PHAsset *> *)fetchAssetsInAssetCollection:(PHAssetCollection *)assetCollection options:(nullable PHFetchOptions *)options;
115
+ + (PHFetchResult<PHAsset *> *)fetchAssetsWithLocalIdentifiers:(NSArray<NSString *> *)identifiers options:(nullable PHFetchOptions *)options; // includes hidden assets by default
116
+ + (nullable PHFetchResult<PHAsset *> *)fetchKeyAssetsInAssetCollection:(PHAssetCollection *)assetCollection options:(nullable PHFetchOptions *)options;
117
+ + (PHFetchResult<PHAsset *> *)fetchAssetsWithBurstIdentifier:(NSString *)burstIdentifier options:(nullable PHFetchOptions *)options API_AVAILABLE(macos(10.15));
118
+
119
+ // Fetches PHAssetSourceTypeUserLibrary assets by default (use includeAssetSourceTypes option to override)
120
+ + (PHFetchResult<PHAsset *> *)fetchAssetsWithOptions:(nullable PHFetchOptions *)options API_AVAILABLE(macos(10.15));
121
+ + (PHFetchResult<PHAsset *> *)fetchAssetsWithMediaType:(PHAssetMediaType)mediaType options:(nullable PHFetchOptions *)options API_AVAILABLE(macos(10.15));
122
+
123
+ // assetURLs are URLs retrieved from ALAsset's ALAssetPropertyAssetURL
124
+ + (PHFetchResult<PHAsset *> *)fetchAssetsWithALAssetURLs:(NSArray<NSURL *> *)assetURLs options:(nullable PHFetchOptions *)options API_DEPRECATED("Will be removed in a future release", ios(8, 11), tvos(8, 11)) API_UNAVAILABLE(macos);
125
+
126
+ @end
127
+
128
+ API_AVAILABLE_END
129
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,143 @@
1
+ //
2
+ // PHAssetChangeRequest.h
3
+ // Photos
4
+ //
5
+ // Copyright (c) 2013 Apple Inc. All rights reserved.
6
+ //
7
+
8
+ #import <Foundation/Foundation.h>
9
+
10
+ #import <Photos/PHAsset.h>
11
+ #import <Photos/PHChangeRequest.h>
12
+ #import <Photos/PHContentEditingOutput.h>
13
+
14
+ @class UIImage;
15
+ @class CLLocation;
16
+ @class PHAssetResource;
17
+ @class PHObjectPlaceholder;
18
+ @class PHContentEditingInputRequestOptions;
19
+
20
+ NS_ASSUME_NONNULL_BEGIN
21
+ API_AVAILABLE_BEGIN(macos(10.15), ios(8), tvos(10))
22
+
23
+ // PHAssetChangeRequest can only be created or used within a -[PHPhotoLibrary performChanges:] or -[PHPhotoLibrary performChangesAndWait:] block.
24
+ OS_EXPORT
25
+ @interface PHAssetChangeRequest : PHChangeRequest
26
+
27
+ #pragma mark - Creating Assets
28
+
29
+ // Basic asset creation. For finer-grained control, see PHAssetCreationRequest.
30
+ + (instancetype)creationRequestForAssetFromImage:(UIImage *)image;
31
+ + (nullable instancetype)creationRequestForAssetFromImageAtFileURL:(NSURL *)fileURL;
32
+ + (nullable instancetype)creationRequestForAssetFromVideoAtFileURL:(NSURL *)fileURL;
33
+
34
+ // This can be used to fetch the newly created asset after the change block has completed by using -localIdentifier
35
+ // It can also be added directly to collections within the current change block
36
+ @property (nonatomic, strong, readonly, nullable) PHObjectPlaceholder *placeholderForCreatedAsset;
37
+
38
+ /// The rating for this asset
39
+ @property (nonatomic, assign, readwrite) PHAssetRating rating API_AVAILABLE(macos(27), ios(27), tvos(27), visionos(27));
40
+
41
+ /// An asset description to change to.
42
+ /// Set to nil or an empty string to clear the caption.
43
+ @property (nonatomic, copy, readwrite, nullable) NSString *caption API_AVAILABLE(ios(27), macos(27), tvos(27), visionos(27));
44
+
45
+ #pragma mark - Deleting Assets
46
+
47
+ + (void)deleteAssets:(id<NSFastEnumeration>)assets;
48
+
49
+
50
+
51
+ #pragma mark - Modifying Assets
52
+
53
+ // if the asset does not allow the type of change requested, these methods will raise an exception, call canPerformEditOperation: on the asset to determine if the type of edit operation is allowed.
54
+ + (instancetype)changeRequestForAsset:(PHAsset *)asset;
55
+
56
+ @property (nonatomic, strong, readwrite, nullable) NSDate *creationDate;
57
+ @property (nonatomic, strong, readwrite, nullable) CLLocation *location;
58
+ @property (nonatomic, assign, readwrite, getter=isFavorite) BOOL favorite;
59
+
60
+ // a hidden asset will be excluded from moment collections, but may still be included in other smart or regular album collections
61
+ @property (nonatomic, assign, readwrite, getter=isHidden) BOOL hidden;
62
+
63
+ /// Disable or enable the video part of a Live Photo so it just appears as a still image (disabled) or a Live Photo (enabled)
64
+ ///
65
+ /// Applies to Live Photos only.
66
+ - (void)setLivePhotoVideoPlaybackEnabled:(BOOL)enabled API_AVAILABLE(macos(27), ios(27), tvos(27), visionos(27));
67
+
68
+ /// Add or remove a keyword associated with this asset
69
+ /// Adding a keyword that is already associated (or removing a keyword that is not) will be silently ignored
70
+ - (void)addKeyword:(NSString *)keyword API_AVAILABLE(macos(27), ios(27), tvos(27), visionos(27));
71
+ - (void)removeKeyword:(NSString *)keyword API_AVAILABLE(macos(27), ios(27), tvos(27), visionos(27));
72
+
73
+ #pragma mark - Editing Asset Contents
74
+
75
+ @property (nonatomic, strong, readwrite, nullable) PHContentEditingOutput *contentEditingOutput;
76
+
77
+ // Reverts the asset's content to its original camera-captured state, preserving any adjustments applied by the camera pipeline at capture time (e.g. Portrait bokeh, Night mode). User edits are removed.
78
+ // Reverting requires that all original resources are downloaded to the device first and this must be performed manually by the client if the original resources aren't already local.
79
+ // Use PHAssetResourceManager to ensure that original asset content is downloaded to the current device before making this request.
80
+ - (void)revertAssetContentToOriginal;
81
+
82
+ /// Reverts the asset's content to its original, choosing which original resource to use as the unadjusted base for all renders.
83
+ ///
84
+ /// In addition to reverting all adjustments, this selects either the RAW
85
+ /// (``PHOriginalResourceChoice/PHOriginalResourceChoiceRaw``) or the compressed
86
+ /// (``PHOriginalResourceChoice/PHOriginalResourceChoiceCompressed``) resource as the source for all renders.
87
+ /// This applies to RAW+JPEG assets only. Using this with other types of assets is not supported.
88
+ ///
89
+ /// - Parameter choice: The original resource to use as the unadjusted base after reverting.
90
+ - (void)revertAssetContentToOriginalResourceChoice:(PHOriginalResourceChoice)choice API_AVAILABLE(macos(27), ios(27), tvos(27), visionos(27));
91
+
92
+ @end
93
+
94
+
95
+ typedef NSUInteger PHContentEditingInputRequestID;
96
+
97
+ OS_EXPORT
98
+ @interface PHContentEditingInputRequestOptions : NSObject
99
+
100
+ // Block to be provided by the client, used to determine if the given adjustment data can be handled (i.e. can be decoded and rendered).
101
+ @property (nonatomic, copy) BOOL (^canHandleAdjustmentData)(PHAdjustmentData *adjustmentData);
102
+
103
+ // Used if data is not available locally and needs to be retrieved from iCloud.
104
+ @property (nonatomic, assign, getter = isNetworkAccessAllowed) BOOL networkAccessAllowed;
105
+ @property (nonatomic, copy, nullable) void (^progressHandler)(double progress, BOOL *stop);
106
+
107
+ /// Set this value to `true` if you don't want a `displaySizeImage` on the `PHContentEditingInput`. This can give performance wins when the image will not be used.
108
+ @property (nonatomic, assign) BOOL skipsDisplaySizeImage API_AVAILABLE(macos(27), ios(27), tvos(27), visionos(27));
109
+
110
+ /// The original resource to use as the unadjusted base when fulfilling the request.
111
+ ///
112
+ /// When set, the content editing input request is fulfilled as though the asset's
113
+ /// original resource choice were the value specified here. This property applies to
114
+ /// RAW+JPEG assets only, and is intended for switching between the RAW and compressed
115
+ /// resource of such an asset. Setting it for an asset that has only a RAW resource is an error.
116
+ @property (nonatomic, assign) PHOriginalResourceChoice originalResourceChoice API_AVAILABLE(macos(27), ios(27), tvos(27), visionos(27));
117
+
118
+ @end
119
+
120
+
121
+ @interface PHAsset (PHContentEditingInput)
122
+
123
+ // Completion and progress handlers are called on an arbitrary serial queue.
124
+ - (PHContentEditingInputRequestID)requestContentEditingInputWithOptions:(nullable PHContentEditingInputRequestOptions *)options completionHandler:(void (^)(PHContentEditingInput *__nullable contentEditingInput, NSDictionary *info))completionHandler;
125
+ - (void)cancelContentEditingInputRequest:(PHContentEditingInputRequestID)requestID;
126
+
127
+ @end
128
+
129
+ // Completion handler info dictionary keys
130
+ extern NSString *const PHContentEditingInputResultIsInCloudKey;
131
+ extern NSString *const PHContentEditingInputCancelledKey;
132
+ extern NSString *const PHContentEditingInputErrorKey;
133
+
134
+
135
+ @interface PHContentEditingOutput (PHAssetChangeRequest)
136
+
137
+ // Create a PHContentEditingOutput from a newly created asset within the change request block
138
+ - (instancetype)initWithPlaceholderForCreatedAsset:(PHObjectPlaceholder *)placeholderForCreatedAsset;
139
+
140
+ @end
141
+
142
+ API_AVAILABLE_END
143
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,67 @@
1
+ //
2
+ // PHAssetCollection.h
3
+ // Photos
4
+ //
5
+ // Copyright (c) 2013-2025 Apple Inc. All rights reserved.
6
+ //
7
+
8
+ #import <Photos/PHCollection.h>
9
+ #import <Photos/PhotosTypes.h>
10
+
11
+ @class PHAsset, PHCollectionList, PHFetchResult, PHFetchOptions;
12
+ @class CLLocation;
13
+
14
+ NS_ASSUME_NONNULL_BEGIN
15
+ API_AVAILABLE_BEGIN(macos(10.15), ios(8), tvos(10))
16
+
17
+ OS_EXPORT API_AVAILABLE(macos(10.13))
18
+ NS_SWIFT_SENDABLE
19
+ @interface PHAssetCollection : PHCollection
20
+
21
+ @property (nonatomic, assign, readonly) PHAssetCollectionType assetCollectionType;
22
+ @property (nonatomic, assign, readonly) PHAssetCollectionSubtype assetCollectionSubtype;
23
+
24
+ // These counts are just estimates; the actual count of objects returned from a fetch should be used if you care about accuracy. Returns NSNotFound if a count cannot be quickly returned.
25
+ @property (nonatomic, assign, readonly) NSUInteger estimatedAssetCount;
26
+
27
+ @property (nonatomic, strong, readonly, nullable) NSDate *startDate;
28
+ @property (nonatomic, strong, readonly, nullable) NSDate *endDate;
29
+
30
+ @property (nonatomic, strong, readonly, nullable) CLLocation *approximateLocation;
31
+ @property (nonatomic, strong, readonly) NSArray<NSString *> *localizedLocationNames;
32
+
33
+
34
+ #pragma mark - Fetching asset collections
35
+
36
+ // Fetch asset collections of a single type matching the provided local identifiers (type is inferred from the local identifiers)
37
+ + (PHFetchResult<PHAssetCollection *> *)fetchAssetCollectionsWithLocalIdentifiers:(NSArray<NSString *> *)identifiers options:(nullable PHFetchOptions *)options;
38
+
39
+ // Fetch asset collections of a single type and subtype provided (use PHAssetCollectionSubtypeAny to match all subtypes)
40
+ + (PHFetchResult<PHAssetCollection *> *)fetchAssetCollectionsWithType:(PHAssetCollectionType)type subtype:(PHAssetCollectionSubtype)subtype options:(nullable PHFetchOptions *)options;
41
+
42
+ // Smart Albums are not supported, only Albums and Moments
43
+ + (PHFetchResult<PHAssetCollection *> *)fetchAssetCollectionsContainingAsset:(PHAsset *)asset withType:(PHAssetCollectionType)type options:(nullable PHFetchOptions *)options;
44
+
45
+ // assetGroupURLs are URLs retrieved from ALAssetGroup's ALAssetsGroupPropertyURL
46
+ + (PHFetchResult<PHAssetCollection *> *)fetchAssetCollectionsWithALAssetGroupURLs:(NSArray<NSURL *> *)assetGroupURLs options:(nullable PHFetchOptions *)options API_DEPRECATED("Will be removed in a future release", ios(8,16), tvos(10,16), macos(10.15,13));
47
+
48
+
49
+ #pragma mark - Fetching moment asset collections (Deprecated)
50
+
51
+
52
+ + (PHFetchResult<PHAssetCollection *> *)fetchMomentsInMomentList:(PHCollectionList *)momentList options:(nullable PHFetchOptions *)options API_DEPRECATED("Will be removed in a future release", ios(8, 13), tvos(10, 13)) API_UNAVAILABLE(macos);
53
+ + (PHFetchResult<PHAssetCollection *> *)fetchMomentsWithOptions:(nullable PHFetchOptions *)options API_DEPRECATED("Will be removed in a future release", ios(8, 13), tvos(10, 13)) API_UNAVAILABLE(macos);
54
+
55
+
56
+
57
+ #pragma mark - Transient asset collections
58
+ // These asset collections are only in-memory and are not persisted to disk
59
+
60
+ + (PHAssetCollection *)transientAssetCollectionWithAssets:(NSArray<PHAsset *> *)assets title:(nullable NSString *)title;
61
+ + (PHAssetCollection *)transientAssetCollectionWithAssetFetchResult:(PHFetchResult<PHAsset *> *)fetchResult title:(nullable NSString *)title;
62
+
63
+
64
+ @end
65
+
66
+ API_AVAILABLE_END
67
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,60 @@
1
+ //
2
+ // PHAssetCollectionChangeRequest.h
3
+ // Photos
4
+ //
5
+ // Copyright (c) 2013 Apple Inc. All rights reserved.
6
+ //
7
+
8
+ #import <Foundation/Foundation.h>
9
+ #import <Photos/PHChangeRequest.h>
10
+ #import <Photos/PHFetchResult.h>
11
+
12
+ @class PHAsset;
13
+ @class PHAssetCollection;
14
+ @class PHObjectPlaceholder;
15
+
16
+ NS_ASSUME_NONNULL_BEGIN
17
+ API_AVAILABLE_BEGIN(macos(10.15), ios(8), tvos(10))
18
+
19
+ // PHAssetCollectionChangeRequest can only be created or used within a -[PHPhotoLibrary performChanges:] or -[PHPhotoLibrary performChangesAndWait:] block.
20
+ OS_EXPORT
21
+ @interface PHAssetCollectionChangeRequest : PHChangeRequest
22
+
23
+ #pragma mark - Creating Asset Collections
24
+
25
+ + (instancetype)creationRequestForAssetCollectionWithTitle:(NSString *)title;
26
+
27
+ // This can be used to fetch the newly created asset collection after the change block has completed by using -localIdentifier
28
+ // It can also be added directly to collection lists within the current change block
29
+ @property (nonatomic, strong, readonly) PHObjectPlaceholder *placeholderForCreatedAssetCollection;
30
+
31
+ #pragma mark - Deleting Asset Collections
32
+
33
+ // requests that the specified asset collections be deleted
34
+ + (void)deleteAssetCollections:(id<NSFastEnumeration>)assetCollections;
35
+
36
+
37
+
38
+ #pragma mark - Modifying Asset Collections
39
+
40
+ // if the asset collection does not allow the type of change requested, these methods will raise an exception, call canPerformEditOperation: on the asset collection to determine if the type of edit operation is allowed.
41
+ + (nullable instancetype)changeRequestForAssetCollection:(PHAssetCollection *)assetCollection;
42
+
43
+ // to add, remove or rearrange assets in a collection, passing in the fetched assets in that collection will ensure that the asset positions are tracked correctly in the case that the collection has been externally edited after the fetch, but before this change is applied
44
+ + (nullable instancetype)changeRequestForAssetCollection:(PHAssetCollection *)assetCollection assets:(nullable PHFetchResult<PHAsset *> *)assets;
45
+
46
+ @property (nonatomic, strong, readwrite) NSString *title;
47
+
48
+ - (void)addAssets:(id<NSFastEnumeration>)assets;
49
+ - (void)insertAssets:(id<NSFastEnumeration>)assets atIndexes:(NSIndexSet *)indexes;
50
+ - (void)removeAssets:(id<NSFastEnumeration>)assets;
51
+ - (void)removeAssetsAtIndexes:(NSIndexSet *)indexes;
52
+ - (void)replaceAssetsAtIndexes:(NSIndexSet *)indexes withAssets:(id<NSFastEnumeration>)assets;
53
+
54
+ // The move removes the assets at fromIndexes first then inserts those assets at the toIndex, so toIndex should point to a location based on the updated indexes after having removed the assets at fromIndexes
55
+ - (void)moveAssetsAtIndexes:(NSIndexSet *)fromIndexes toIndex:(NSUInteger)toIndex;
56
+
57
+ @end
58
+
59
+ API_AVAILABLE_END
60
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,55 @@
1
+ //
2
+ // PHAssetCreationRequest.h
3
+ // PhotoKit
4
+ //
5
+ // Copyright © 2015 Apple Inc. All rights reserved.
6
+ //
7
+
8
+ #import <Photos/PhotosTypes.h>
9
+ #import <Photos/PHAssetChangeRequest.h>
10
+
11
+ #import <Foundation/Foundation.h>
12
+
13
+ NS_ASSUME_NONNULL_BEGIN
14
+ API_AVAILABLE_BEGIN(macos(10.15), ios(9), tvos(10))
15
+
16
+ OS_EXPORT
17
+ @interface PHAssetResourceCreationOptions : NSObject <NSCopying>
18
+
19
+ // The filename for the resource. If not specified, one will be inferred from a fileURL if available, or else generated.
20
+ @property (nonatomic, copy, nullable) NSString *originalFilename;
21
+
22
+ /// The type of data being provided for this asset resource. If not specified, one will be inferred from the PHAssetResourceType or file URL extension (if provided).
23
+ @property (nonatomic, copy, nullable) UTType *contentType API_AVAILABLE(macos(26.0), ios(26.0), tvos(26.0), visionos(26.0));
24
+ @property (nonatomic, copy, nullable) NSString *uniformTypeIdentifier API_DEPRECATED("Use contentType instead", ios(9, API_TO_BE_DEPRECATED), macos(10.15, API_TO_BE_DEPRECATED), tvos(10, API_TO_BE_DEPRECATED), visionos(1, API_TO_BE_DEPRECATED));
25
+
26
+ // When enabled, the file passed to the creation request will be moved into the photo library without duplicating the file data (the original file is removed if the asset is created successfully), otherwise a copy of the file is created from the original. Defaults to NO. Attempting to move a file that is open or hardlinked will fail.
27
+ @property (nonatomic, assign) BOOL shouldMoveFile;
28
+
29
+ @end
30
+
31
+
32
+ // PHAssetCreationRequest can only be created or used within a -[PHPhotoLibrary performChanges:] or -[PHPhotoLibrary performChangesAndWait:] block.
33
+ OS_EXPORT
34
+ @interface PHAssetCreationRequest : PHAssetChangeRequest
35
+
36
+ + (instancetype)creationRequestForAsset;
37
+
38
+ /// The original resource to use as the unadjusted base for rendering derivatives of the new asset.
39
+ ///
40
+ /// This property applies to RAW+JPEG assets only, where it selects whether the RAW or the compressed resource serves as the original.
41
+ /// Setting it on assets that have only a single original resource is an error.
42
+ @property (nonatomic, assign, readwrite) PHOriginalResourceChoice originalResourceChoice API_AVAILABLE(macos(27), ios(27), tvos(27), visionos(27));
43
+
44
+ // Whether we support a given combination of PHAssetResourceTypes.
45
+ // Note: Adding resources to a creation request always succeeds; validation of the request is performed later, and any errors are reported after the performChanges block.
46
+ + (BOOL)supportsAssetResourceTypes:(NSArray<NSNumber *> *)types;
47
+
48
+ - (void)addResourceWithType:(PHAssetResourceType)type fileURL:(NSURL *)fileURL options:(nullable PHAssetResourceCreationOptions *)options;
49
+
50
+ - (void)addResourceWithType:(PHAssetResourceType)type data:(NSData *)data options:(nullable PHAssetResourceCreationOptions *)options;
51
+
52
+ @end
53
+
54
+ API_AVAILABLE_END
55
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,33 @@
1
+ //
2
+ // PHAssetExtendedMetadata.h
3
+ // Photos
4
+ //
5
+ // Copyright (c) 2026 Apple Inc. All rights reserved.
6
+ //
7
+
8
+ #import <Foundation/Foundation.h>
9
+ #import <Photos/PHAsset.h>
10
+
11
+ NS_ASSUME_NONNULL_BEGIN
12
+
13
+ /// Represents other asset attributes that are not included when fetching `PHAsset` directly.
14
+ ///
15
+ /// When ``/Photos/PHAsset/extendedMetadata`` is called, these properties are fetched. They can be
16
+ /// prefetched by toggling ``/Photos/PHFetchOptions/prefetchAssetExtendedMetadata`` when fetching ``/Photos/PHAsset``.
17
+ API_AVAILABLE(macos(27), ios(27), tvos(27), visionos(27))
18
+ OS_EXPORT
19
+ NS_SWIFT_SENDABLE
20
+ @interface PHAssetExtendedMetadata : NSObject
21
+
22
+ /// The compact description for this asset.
23
+ @property (copy, readonly, nullable) NSString *caption;
24
+
25
+ /// The original file name of this asset.
26
+ @property (copy, readonly, nullable) NSString *originalFilename;
27
+
28
+ /// The keywords associated with this asset
29
+ @property (copy, readonly) NSArray<NSString *> *keywords;
30
+
31
+ @end
32
+
33
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,67 @@
1
+ //
2
+ // PHAssetResource.h
3
+ // Photos
4
+ //
5
+ // Copyright © 2015 Apple Inc. All rights reserved.
6
+ //
7
+
8
+ #import <Photos/PhotosTypes.h>
9
+
10
+ @class PHAsset;
11
+ @class PHAssetResourceUploadJob;
12
+ @class PHLivePhoto;
13
+ @class UTType;
14
+
15
+
16
+ NS_ASSUME_NONNULL_BEGIN
17
+ API_AVAILABLE_BEGIN(macos(10.15), ios(9), tvos(10))
18
+
19
+ OS_EXPORT
20
+ PEACH_SWIFT_CLASS(SwiftUI) @interface PHAssetResource : NSObject
21
+
22
+ /// Describes the type of asset resource represented by this object, e.g. `photo`
23
+ @property (nonatomic, assign, readonly) PHAssetResourceType type;
24
+
25
+ /// The local identifier of the asset associated with this asset resource
26
+ @property (nonatomic, copy, readonly) NSString *assetLocalIdentifier;
27
+
28
+
29
+ @property (nonatomic, copy, readonly) NSString *originalFilename API_DEPRECATED("Use filename instead", ios(9, 27), macos(10.15, 27), tvos(10, 27), visionos(1, 27));
30
+
31
+
32
+ /// The filename associated with this asset resource (if any)
33
+ @property (nonatomic, copy, readonly, nullable) NSString *filename API_AVAILABLE(macos(27), ios(27), tvos(27), visionos(27));
34
+
35
+ /// The content type of the data associated with this asset resource (the data can be retrieved via `PHAssetResourceManager`)
36
+ @property (nonatomic, copy, readonly) UTType *contentType API_AVAILABLE(macos(26.0), ios(26.0), tvos(26.0), visionos(26.0));
37
+ @property (nonatomic, copy, readonly) NSString *uniformTypeIdentifier API_DEPRECATED("Use contentType instead", ios(9, API_TO_BE_DEPRECATED), macos(10.15, API_TO_BE_DEPRECATED), tvos(10, API_TO_BE_DEPRECATED), visionos(1, API_TO_BE_DEPRECATED));
38
+
39
+ @property (nonatomic, assign, readonly) NSInteger pixelWidth API_AVAILABLE(macos(13), ios(16), tvos(16));
40
+ @property (nonatomic, assign, readonly) NSInteger pixelHeight API_AVAILABLE(macos(13), ios(16), tvos(16));
41
+
42
+ /// The size of the resource in bytes if known, `nil` if unavailable (may not be available until resource download/processing is complete)
43
+ @property (nonatomic, copy, readonly, nullable) NSNumber *dataSize NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(27), ios(27), tvos(27), visionos(27));
44
+
45
+ #pragma mark - Getting resources
46
+
47
+
48
+ + (NSArray<PHAssetResource *> *)assetResourcesForAsset:(PHAsset *)asset;
49
+ + (NSArray<PHAssetResource *> *)assetResourcesForLivePhoto:(PHLivePhoto *)livePhoto API_AVAILABLE(ios(9.1));
50
+
51
+
52
+ /*!
53
+ Returns the asset resource associated with the given upload job.
54
+
55
+ - Parameters:
56
+ - job: the upload job whose associated asset resource is returned
57
+
58
+ - Returns: The asset resource associated with the upload job, or nil if the resource cannot be found.
59
+ */
60
+ + (nullable PHAssetResource *)assetResourceForUploadJob:(PHAssetResourceUploadJob *)job NS_SWIFT_NAME(assetResource(forUploadJob:)) API_AVAILABLE(ios(27), macCatalyst(27), macos(27)) API_UNAVAILABLE(tvos, visionos, watchos);
61
+
62
+ @end
63
+
64
+ API_AVAILABLE_END
65
+ NS_ASSUME_NONNULL_END
66
+
67
+