Skip to content

Photos iOS xcode27.0 b2

Alex Soto edited this page Jun 23, 2026 · 1 revision

#Photos.framework

diff -ruN /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Photos.framework/Headers/PHCloudIdentifier.h /Applications/Xcode_27.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Photos.framework/Headers/PHCloudIdentifier.h
--- /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Photos.framework/Headers/PHCloudIdentifier.h	2026-05-30 22:50:16
+++ /Applications/Xcode_27.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Photos.framework/Headers/PHCloudIdentifier.h	2026-06-16 01:05:34
@@ -14,6 +14,13 @@
 
 OS_EXPORT
 NS_SWIFT_SENDABLE
+/*!
+ A representation of a globally unique identifier for a PHAsset or PHCollection that can be used to identify the same asset or collection across different devices and photo libraries.
+
+ Cloud identifiers are designed to work best when used with an account that has iCloud Photos enabled, but they also work on libraries that are not synced via iCloud Photos, including on devices that have never been signed in to an iCloud account. Use ``PHPhotoLibrary/cloudIdentifierMappingsForLocalIdentifiers:`` and ``PHPhotoLibrary/localIdentifierMappingsForCloudIdentifiers:`` to map between cloud identifiers and local identifiers.
+
+ When resolving a cloud identifier to a local identifier, ``PHPhotoLibrary/localIdentifierMappingsForCloudIdentifiers:`` first looks for a record synced through iCloud Photos. If no synced record is found — for example, when resolving cloud identifiers between libraries on devices that do not have iCloud Photos enabled — it falls back to matching on media content, which may return more than one local identifier for a single cloud identifier (see `PHPhotosErrorMultipleLocalIdentifiersFound`). To skip the media-content fallback and only resolve identifiers backed by iCloud Photos synced records, use ``PHPhotoLibrary/localIdentifierMappingsForSyncedCloudIdentifiers:``.
+ */
 @interface PHCloudIdentifier : NSObject <NSSecureCoding>
 
 /// DEPRECATED: If there is a failure to determine the global identifier for a local identifier, the notFoundIdentifier is provided in that array slot.
diff -ruN /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Photos.framework/Headers/PHCollection.h /Applications/Xcode_27.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Photos.framework/Headers/PHCollection.h
--- /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Photos.framework/Headers/PHCollection.h	2026-05-30 22:36:23
+++ /Applications/Xcode_27.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Photos.framework/Headers/PHCollection.h	2026-06-16 01:05:35
@@ -9,7 +9,7 @@
 #import <Photos/PHFetchResult.h>
 #import <Photos/PhotosTypes.h>
 
-@class PHAsset, PHCollectionList, PHFetchResult, PHFetchOptions;
+@class PHCollectionList, PHFetchResult, PHFetchOptions;
 @class CLLocation;
 
 NS_ASSUME_NONNULL_BEGIN
@@ -33,7 +33,29 @@
 
 #pragma mark - Fetching collections
 
+/*!
+ Retrieves collections from the specified collection list
+ 
+ By default, the returned `PHFetchResult` object contains all collections in the specified collection list. To retrieve a more specific set of assets, provide a `PHFetchOptions` object that contains a filter predicate.
+
+ - Parameters:
+ - collectionList: The collection list from which to fetch collections
+ - options: Options that specify a filter predicate and sort order for the fetched collections, or nil to use default options
+
+ - Returns: A fetch result that contains the requested `PHCollection` objects, or an empty fetch result if no objects match the request.
+ */
 + (PHFetchResult<PHCollection *> *)fetchCollectionsInCollectionList:(PHCollectionList *)collectionList options:(nullable PHFetchOptions *)options;
+
+/*!
+ Retrieves collections from the root of the photo library’s hierarchy of user-created albums and folders
+ 
+ This is the equivalent to calling `fetchCollectionsInCollectionList:options:` with the collection list matching the type `PHCollectionListTypeFolder` and subtype `PHCollectionListSubtypeRootFolder`
+ 
+ - Parameters:
+ - options: Options that specify a filter predicate and sort order for the fetched collections, or nil to use default options
+ 
+ - Returns: A fetch result containing the matching collection lists, in the library's natural order.
+ */
 + (PHFetchResult<PHCollection *> *)fetchTopLevelUserCollectionsWithOptions:(nullable PHFetchOptions *)options;
 
 @end
diff -ruN /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Photos.framework/Headers/PHCollectionListChangeRequest.h /Applications/Xcode_27.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Photos.framework/Headers/PHCollectionListChangeRequest.h
--- /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Photos.framework/Headers/PHCollectionListChangeRequest.h	2026-05-30 22:36:23
+++ /Applications/Xcode_27.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Photos.framework/Headers/PHCollectionListChangeRequest.h	2026-06-15 23:55:21
@@ -36,13 +36,43 @@
 
 #pragma mark - Modifying Collection Lists
 
-// if the collection list does not allow the type of change requested, these methods will raise an exception, call canPerformEditOperation: on the collection list to determine if the type of edit operation is allowed.
+/*!
+ Creates a request for modifying the specified collection list.
+
+ After you create a change request within a photo library change block, propose changes to the collection’s title or list of child collections with the properties and instance methods of the change request. After Photos runs your change block, the collection list reflects your changes. For details on change blocks, see PHPhotoLibrary.
+ 
+ Use this method when you you don’t need to work with indexes in the list of child collections. If you need to insert, remove, or rearrange collections at specified indexes in the collection list, use the `changeRequestForCollectionList:childCollections:` method instead.
+
+ Use `canPerformEditOperation:` on the collection list to determine if the type of change is allowed. If the collection list does not allow the type of change requested the changes request will fail and an error is returned.
+
+ - Parameters:
+ - collectionList: the collection list being modified
+ */
 + (nullable instancetype)changeRequestForCollectionList:(PHCollectionList *)collectionList;
 
-// to add, remove or rearrange child collections in a collection list, passing in the fetched collections in that collection list will ensure that the child collection positions are tracked correctly in the case that the collection list has been externally edited after the fetch, but before this change is applied
+/*!
+ Creates a request for modifying the specified collection list, with a fetch result for tracking changes.
+  
+ Use this method when you need to insert, remove, or rearrange collections at specified indexes in the collection list. By passing in a fetch result reflecting what your app sees as the current state of the collection’s membership, the Photos framework can ensure that the indexes you specify are valid even if the collection has changed since you last fetched it. If you don’t need to work with indexes in the list of child collections, you can use the `changeRequestForCollectionList:` method instead.
+
+ Call `canPerformEditOperation:` on the collection list to determine if the type of change is allowed. If the collection list does not allow the type of change requested, the .
+
+ - Parameters:
+ - collectionList: the collection list being modified
+ - childCollections: the child collections to modify (see `fetchCollectionsInCollectionList:options:`)
+ */
 + (nullable instancetype)changeRequestForCollectionList:(PHCollectionList *)collectionList childCollections:(PHFetchResult<__kindof PHCollection *> *)childCollections;
 
-// to add, remove or rearrange child collections in the TOP LEVEL collection list, passing in the fetched collections in that collection list will ensure that the child collection positions are tracked correctly in the case that the collection list has been externally edited after the fetch, but before this change is applied
+/*!
+ Creates a request to add, remove, or rearrange child collections in the top-level collection list.
+ 
+ To add, remove or rearrange child collections in the top-level collection list, passing in the fetched collections in that collection list will ensure that the child collection positions are tracked correctly in the case that the collection list has been externally edited after the fetch, but before this change is applied
+ 
+ This is the equivalent to calling `changeRequestForCollectionList:childCollections:` with the collection list matching the type `PHCollectionListTypeFolder` and subtype `PHCollectionListSubtypeRootFolder`
+ 
+ - Parameters:
+ - childCollections: the child collections to modify (see `fetchTopLevelUserCollections:options:`)
+ */
 + (nullable instancetype)changeRequestForTopLevelCollectionListUserCollections:(PHFetchResult<__kindof PHCollection *> *)childCollections API_AVAILABLE(macos(11), ios(14.2), tvos(14));
 
 @property (nonatomic, strong, readwrite) NSString *title;
diff -ruN /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Photos.framework/Headers/PhotosTypes.h /Applications/Xcode_27.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Photos.framework/Headers/PhotosTypes.h
--- /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Photos.framework/Headers/PhotosTypes.h	2026-05-30 22:36:24
+++ /Applications/Xcode_27.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Photos.framework/Headers/PhotosTypes.h	2026-06-15 23:56:54
@@ -37,8 +37,13 @@
     PHCollectionListSubtypeMomentListYear       API_DEPRECATED("Will be removed in a future release", ios(8, 13), tvos(10, 13)) API_UNAVAILABLE(macos) = 2,
 
     // PHCollectionListTypeFolder subtypes
+
+    /// A user-configurable, regular folder that can be created, or modified via `PHCollectionListChangeRequest`
     PHCollectionListSubtypeRegularFolder        = 100,
-    
+
+    /// The collection list that contains the top-level user collections, there is always one root folder in the library and does not allow `PHCollectionEditOperationRename` or `PHCollectionEditOperationDelete`
+    PHCollectionListSubtypeRootFolder           API_AVAILABLE(macos(27), ios(27), tvos(27), visionos(27)) = 101,
+
     // PHCollectionListTypeSmartFolder subtypes
     PHCollectionListSubtypeSmartFolderEvents    = 200,
     PHCollectionListSubtypeSmartFolderFaces     = 201,
@@ -194,6 +199,17 @@
 
 #pragma mark - PHAssetResourceType
 
+/// Identifies a specific type of resource associated with a photo or video asset.
+///
+/// The set of resource types may expand in future OS releases. Additionally, assets synced from a device running
+/// a newer OS may contain resource types that are not defined in the SDK version your app was built with.
+///
+/// When switching over resource type values, always include an `@unknown default` case that handles
+/// unrecognized types gracefully — for example, by skipping the resource or preserving it as opaque data.
+/// Do not use `fatalError` or other trapping assertions for unknown values.
+///
+/// If your app performs backup and restore of photo library assets, preserve all resources including those with
+/// unrecognized types to maintain full fidelity when restoring to a device that may understand those types.
 typedef NS_ENUM(NSInteger, PHAssetResourceType) {
     PHAssetResourceTypePhoto                             = 1,
     PHAssetResourceTypeVideo                             = 2,

Clone this wiki locally