Documentation Archive Developer
Search

Photos Changes for Objective-C

Photos

PHAsset.h

Declaration
From
+ (PHFetchResult *)fetchAssetsInAssetCollection:(PHAssetCollection *)assetCollection options:(PHFetchOptions *)options
To
+ (PHFetchResult<PHAsset *> * _Nonnull)fetchAssetsInAssetCollection:(PHAssetCollection * _Nonnull)assetCollection options:(PHFetchOptions * _Nullable)options

Declaration
From
+ (PHFetchResult *)fetchAssetsWithALAssetURLs:(NSArray *)assetURLs options:(PHFetchOptions *)options
To
+ (PHFetchResult<PHAsset *> * _Nonnull)fetchAssetsWithALAssetURLs:(NSArray<NSURL *> * _Nonnull)assetURLs options:(PHFetchOptions * _Nullable)options

Declaration
From
+ (PHFetchResult *)fetchAssetsWithBurstIdentifier:(NSString *)burstIdentifier options:(PHFetchOptions *)options
To
+ (PHFetchResult<PHAsset *> * _Nonnull)fetchAssetsWithBurstIdentifier:(NSString * _Nonnull)burstIdentifier options:(PHFetchOptions * _Nullable)options

Declaration
From
+ (PHFetchResult *)fetchAssetsWithLocalIdentifiers:(NSArray *)identifiers options:(PHFetchOptions *)options
To
+ (PHFetchResult<PHAsset *> * _Nonnull)fetchAssetsWithLocalIdentifiers:(NSArray<NSString *> * _Nonnull)identifiers options:(PHFetchOptions * _Nullable)options

Declaration
From
+ (PHFetchResult *)fetchAssetsWithMediaType:(PHAssetMediaType)mediaType options:(PHFetchOptions *)options
To
+ (PHFetchResult<PHAsset *> * _Nonnull)fetchAssetsWithMediaType:(PHAssetMediaType)mediaType options:(PHFetchOptions * _Nullable)options

Declaration
From
+ (PHFetchResult *)fetchAssetsWithOptions:(PHFetchOptions *)options
To
+ (PHFetchResult<PHAsset *> * _Nonnull)fetchAssetsWithOptions:(PHFetchOptions * _Nullable)options

Declaration
From
+ (PHFetchResult *)fetchKeyAssetsInAssetCollection:(PHAssetCollection *)assetCollection options:(PHFetchOptions *)options
To
+ (PHFetchResult<PHAsset *> * _Nullable)fetchKeyAssetsInAssetCollection:(PHAssetCollection * _Nonnull)assetCollection options:(PHFetchOptions * _Nullable)options

PHAssetCreationRequest.h (Added)

PHAssetResource.h (Added)

PHAssetResourceManager.h (Added)

PHChange.h

Declaration
From
+ (instancetype)changeDetailsFromFetchResult:(PHFetchResult *)fromResult toFetchResult:(PHFetchResult *)toResult changedObjects:(NSArray *)changedObjects
To
+ (instancetype _Nonnull)changeDetailsFromFetchResult:(PHFetchResult * _Nonnull)fromResult toFetchResult:(PHFetchResult * _Nonnull)toResult changedObjects:(NSArray<PHObject *> * _Nonnull)changedObjects

Declaration
From
@property(atomic, strong, readonly) NSArray *changedObjects
To
@property(atomic, strong, readonly, nonnull) NSArray<__kindof PHObject *> *changedObjects

Declaration
From
@property(atomic, strong, readonly) NSArray *insertedObjects
To
@property(atomic, strong, readonly, nonnull) NSArray<__kindof PHObject *> *insertedObjects

Declaration
From
@property(atomic, strong, readonly) NSArray *removedObjects
To
@property(atomic, strong, readonly, nonnull) NSArray<__kindof PHObject *> *removedObjects

Declaration
From
@property(atomic, strong, readonly) id objectAfterChanges
To
@property(atomic, strong, readonly, nullable) __kindof PHObject *objectAfterChanges

Declaration
From
@property(atomic, strong, readonly) id objectBeforeChanges
To
@property(atomic, strong, readonly, nonnull) __kindof PHObject *objectBeforeChanges

PHCollection.h

Declaration
From
+ (PHFetchResult *)fetchAssetCollectionsContainingAsset:(PHAsset *)asset withType:(PHAssetCollectionType)type options:(PHFetchOptions *)options
To
+ (PHFetchResult<PHAssetCollection *> * _Nonnull)fetchAssetCollectionsContainingAsset:(PHAsset * _Nonnull)asset withType:(PHAssetCollectionType)type options:(PHFetchOptions * _Nullable)options

Declaration
From
+ (PHFetchResult *)fetchAssetCollectionsWithALAssetGroupURLs:(NSArray *)assetGroupURLs options:(PHFetchOptions *)options
To
+ (PHFetchResult<PHAssetCollection *> * _Nonnull)fetchAssetCollectionsWithALAssetGroupURLs:(NSArray<NSURL *> * _Nonnull)assetGroupURLs options:(PHFetchOptions * _Nullable)options

Declaration
From
+ (PHFetchResult *)fetchAssetCollectionsWithLocalIdentifiers:(NSArray *)identifiers options:(PHFetchOptions *)options
To
+ (PHFetchResult<PHAssetCollection *> * _Nonnull)fetchAssetCollectionsWithLocalIdentifiers:(NSArray<NSString *> * _Nonnull)identifiers options:(PHFetchOptions * _Nullable)options

Declaration
From
+ (PHFetchResult *)fetchAssetCollectionsWithType:(PHAssetCollectionType)type subtype:(PHAssetCollectionSubtype)subtype options:(PHFetchOptions *)options
To
+ (PHFetchResult<PHAssetCollection *> * _Nonnull)fetchAssetCollectionsWithType:(PHAssetCollectionType)type subtype:(PHAssetCollectionSubtype)subtype options:(PHFetchOptions * _Nullable)options

Declaration
From
+ (PHFetchResult *)fetchMomentsInMomentList:(PHCollectionList *)momentList options:(PHFetchOptions *)options
To
+ (PHFetchResult<PHAssetCollection *> * _Nonnull)fetchMomentsInMomentList:(PHCollectionList * _Nonnull)momentList options:(PHFetchOptions * _Nullable)options

Declaration
From
+ (PHFetchResult *)fetchMomentsWithOptions:(PHFetchOptions *)options
To
+ (PHFetchResult<PHAssetCollection *> * _Nonnull)fetchMomentsWithOptions:(PHFetchOptions * _Nullable)options

Declaration
From
@property(nonatomic, strong, readonly) NSArray *localizedLocationNames
To
@property(nonatomic, strong, readonly, nonnull) NSArray<NSString *> *localizedLocationNames

Declaration
From
+ (PHAssetCollection *)transientAssetCollectionWithAssetFetchResult:(PHFetchResult *)fetchResult title:(NSString *)title
To
+ (PHAssetCollection * _Nonnull)transientAssetCollectionWithAssetFetchResult:(PHFetchResult<PHAsset *> * _Nonnull)fetchResult title:(NSString * _Nullable)title

Declaration
From
+ (PHAssetCollection *)transientAssetCollectionWithAssets:(NSArray *)assets title:(NSString *)title
To
+ (PHAssetCollection * _Nonnull)transientAssetCollectionWithAssets:(NSArray<PHAsset *> * _Nonnull)assets title:(NSString * _Nullable)title

Declaration
From
+ (PHFetchResult *)fetchCollectionsInCollectionList:(PHCollectionList *)collectionList options:(PHFetchOptions *)options
To
+ (PHFetchResult<PHCollection *> * _Nonnull)fetchCollectionsInCollectionList:(PHCollectionList * _Nonnull)collectionList options:(PHFetchOptions * _Nullable)options

Declaration
From
+ (PHFetchResult *)fetchTopLevelUserCollectionsWithOptions:(PHFetchOptions *)options
To
+ (PHFetchResult<PHCollection *> * _Nonnull)fetchTopLevelUserCollectionsWithOptions:(PHFetchOptions * _Nullable)options

Declaration
From
+ (PHFetchResult *)fetchCollectionListsContainingCollection:(PHCollection *)collection options:(PHFetchOptions *)options
To
+ (PHFetchResult<PHCollectionList *> * _Nonnull)fetchCollectionListsContainingCollection:(PHCollection * _Nonnull)collection options:(PHFetchOptions * _Nullable)options

Declaration
From
+ (PHFetchResult *)fetchCollectionListsWithLocalIdentifiers:(NSArray *)identifiers options:(PHFetchOptions *)options
To
+ (PHFetchResult<PHCollectionList *> * _Nonnull)fetchCollectionListsWithLocalIdentifiers:(NSArray<NSString *> * _Nonnull)identifiers options:(PHFetchOptions * _Nullable)options

Declaration
From
+ (PHFetchResult *)fetchCollectionListsWithType:(PHCollectionListType)collectionListType subtype:(PHCollectionListSubtype)subtype options:(PHFetchOptions *)options
To
+ (PHFetchResult<PHCollectionList *> * _Nonnull)fetchCollectionListsWithType:(PHCollectionListType)collectionListType subtype:(PHCollectionListSubtype)subtype options:(PHFetchOptions * _Nullable)options

Declaration
From
+ (PHFetchResult *)fetchMomentListsWithSubtype:(PHCollectionListSubtype)momentListSubtype containingMoment:(PHAssetCollection *)moment options:(PHFetchOptions *)options
To
+ (PHFetchResult<PHCollectionList *> * _Nonnull)fetchMomentListsWithSubtype:(PHCollectionListSubtype)momentListSubtype containingMoment:(PHAssetCollection * _Nonnull)moment options:(PHFetchOptions * _Nullable)options

Declaration
From
+ (PHFetchResult *)fetchMomentListsWithSubtype:(PHCollectionListSubtype)momentListSubtype options:(PHFetchOptions *)options
To
+ (PHFetchResult<PHCollectionList *> * _Nonnull)fetchMomentListsWithSubtype:(PHCollectionListSubtype)momentListSubtype options:(PHFetchOptions * _Nullable)options

Declaration
From
@property(nonatomic, strong, readonly) NSArray *localizedLocationNames
To
@property(nonatomic, strong, readonly, nonnull) NSArray<NSString *> *localizedLocationNames

Declaration
From
+ (PHCollectionList *)transientCollectionListWithCollections:(NSArray *)collections title:(NSString *)title
To
+ (PHCollectionList * _Nonnull)transientCollectionListWithCollections:(NSArray<PHCollection *> * _Nonnull)collections title:(NSString * _Nullable)title

Declaration
From
+ (PHCollectionList *)transientCollectionListWithCollectionsFetchResult:(PHFetchResult *)fetchResult title:(NSString *)title
To
+ (PHCollectionList * _Nonnull)transientCollectionListWithCollectionsFetchResult:(PHFetchResult<PHCollection *> * _Nonnull)fetchResult title:(NSString * _Nullable)title

PHContentEditingInput.h

Deprecation
From--
ToiOS 9.0

PHFetchOptions.h

Declaration
From
@property(nonatomic, strong) NSArray *sortDescriptors
To
@property(nonatomic, strong, nullable) NSArray<NSSortDescriptor *> *sortDescriptors

PHFetchResult.h

Declaration
From
- (BOOL)containsObject:(id)anObject
To
- (BOOL)containsObject:(ObjectType _Nonnull)anObject

Declaration
From
- (void)enumerateObjectsAtIndexes:(NSIndexSet *)s options:(NSEnumerationOptions)opts usingBlock:(void (^)(id obj, NSUInteger idx, BOOL *stop))block
To
- (void)enumerateObjectsAtIndexes:(NSIndexSet * _Nonnull)s options:(NSEnumerationOptions)opts usingBlock:(void (^ _Nonnull)(ObjectType _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop))block

Declaration
From
- (void)enumerateObjectsUsingBlock:(void (^)(id obj, NSUInteger idx, BOOL *stop))block
To
- (void)enumerateObjectsUsingBlock:(void (^ _Nonnull)(ObjectType _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop))block

Declaration
From
- (void)enumerateObjectsWithOptions:(NSEnumerationOptions)opts usingBlock:(void (^)(id obj, NSUInteger idx, BOOL *stop))block
To
- (void)enumerateObjectsWithOptions:(NSEnumerationOptions)opts usingBlock:(void (^ _Nonnull)(ObjectType _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop))block

Declaration
From
@property(nonatomic, readonly) id firstObject
To
@property(nonatomic, readonly, nullable) ObjectType firstObject

Declaration
From
- (NSUInteger)indexOfObject:(id)anObject
To
- (NSUInteger)indexOfObject:(ObjectType _Nonnull)anObject

Declaration
From
- (NSUInteger)indexOfObject:(id)anObject inRange:(NSRange)range
To
- (NSUInteger)indexOfObject:(ObjectType _Nonnull)anObject inRange:(NSRange)range

Declaration
From
@property(nonatomic, readonly) id lastObject
To
@property(nonatomic, readonly, nullable) ObjectType lastObject

Declaration
From
- (id)objectAtIndex:(NSUInteger)index
To
- (ObjectType _Nonnull)objectAtIndex:(NSUInteger)index

Declaration
From
- (id)objectAtIndexedSubscript:(NSUInteger)idx
To
- (ObjectType _Nonnull)objectAtIndexedSubscript:(NSUInteger)idx

Declaration
From
- (NSArray *)objectsAtIndexes:(NSIndexSet *)indexes
To
- (NSArray<ObjectType> * _Nonnull)objectsAtIndexes:(NSIndexSet * _Nonnull)indexes

PHImageManager.h

Removed #def PHInvalidImageRequestID
Declaration
From
- (void)startCachingImagesForAssets:(NSArray *)assets targetSize:(CGSize)targetSize contentMode:(PHImageContentMode)contentMode options:(PHImageRequestOptions *)options
To
- (void)startCachingImagesForAssets:(NSArray<PHAsset *> * _Nonnull)assets targetSize:(CGSize)targetSize contentMode:(PHImageContentMode)contentMode options:(PHImageRequestOptions * _Nullable)options

Declaration
From
- (void)stopCachingImagesForAssets:(NSArray *)assets targetSize:(CGSize)targetSize contentMode:(PHImageContentMode)contentMode options:(PHImageRequestOptions *)options
To
- (void)stopCachingImagesForAssets:(NSArray<PHAsset *> * _Nonnull)assets targetSize:(CGSize)targetSize contentMode:(PHImageContentMode)contentMode options:(PHImageRequestOptions * _Nullable)options

PhotosTypes.h