SCCameraKitLensRepositoryGroupObserver
Objective-C
@protocol SCCameraKitLensRepositoryGroupObserver <NSObject>
Swift
protocol LensRepositoryGroupObserver : NSObjectProtocol
Allows conformers to be notified of changes to lens groups the repository has available.
-
Notifies that an observed group’s lenses have changed.
Note
observers may receive notifications for lens groups they do not care about. Check groupID.Declaration
Objective-C
- (void)repository:(nonnull id<SCCameraKitLensRepository>)repository didUpdateLenses:(nonnull NSArray<id<SCCameraKitLens>> *)lenses forGroupID:(nonnull NSString *)groupID;Swift
func repository(_ repository: any SCCameraKitLensRepository, didUpdateLenses lenses: [any SCCameraKitLens], forGroupID groupID: String)Parameters
repositorythe CameraKit lens repository responsible for the update.
lensesthe updated lenses in the group.
groupIDthe updated group ID.
-
Notifies that an observed group’s lenses failed to be fetched.
Declaration
Objective-C
- (void)repository:(nonnull id<SCCameraKitLensRepository>)repository didFailToUpdateLensesForGroupID:(nonnull NSString *)groupID error:(nullable NSError *)error;Swift
func repository(_ repository: any SCCameraKitLensRepository, didFailToUpdateLensesForGroupID groupID: String, error: (any Error)?)Parameters
repositorythe CameraKit lens repository responsible for the update.
groupIDthe updated group ID.
errora detailed error message of what went wrong, if available.