SCCameraKitLensRepository
Objective-C
@protocol SCCameraKitLensRepository <NSObject>
Swift
protocol LensRepository : NSObjectProtocol
Lens Repository for listing lenses, getting lenses, etc.
-
Add an observer to receive updates to a lens group
Note
you should expect to receive at least one call to the observer after you add it (either success with list of lenses or failure with error)Note
after you add an observer for a lens group you will receive updates for all lenses in that group (ie. you do not have to add an observer for specific lenses in the group)Declaration
Objective-C
- (void)addObserver:(nonnull id<SCCameraKitLensRepositoryGroupObserver>)observer forGroupID:(nonnull NSString *)groupID;
Parameters
observer
observer to receive updates
groupID
id of lens group to observe
-
Remove an observer from receiving updates for a lens group
Declaration
Objective-C
- (void)removeObserver: (nonnull id<SCCameraKitLensRepositoryGroupObserver>)observer forGroupID:(nonnull NSString *)groupID;
Parameters
observer
observer to remove from receiving updates
groupID
id of lens group to stop observing
-
Add an observer to receive updates for a specific lens in a group
Note
you should expect to receive at least one call to the observer after you add it (either success with lens obj or failure with error)Declaration
Objective-C
- (void)addObserver: (nonnull id<SCCameraKitLensRepositorySpecificObserver>)observer forSpecificLensID:(nonnull NSString *)lensID inGroupID:(nonnull NSString *)groupID;
Parameters
observer
observer to receive updates
lensID
id of lens to receive updates for
groupID
id of group which lens is in that you want to receive updates for
-
Remove an observer from receiving updates for a specific lens in a group
Declaration
Objective-C
- (void)removeObserver: (nonnull id<SCCameraKitLensRepositorySpecificObserver>)observer forSpecificLensID:(nonnull NSString *)lensID inGroupID:(nonnull NSString *)groupID;
Parameters
observer
observer to remove from receiving updates
lensID
id of lens to stop observing
groupID
if of group which lens is in that you want to stop observing
-
Any available lenses for the group ID specified.
Note
this method will not return any lenses until the user has expressed interest in a group by calling beginObservingGroupID:Note
for updates on when the return value of this method changes, add a observer in addObserver:Declaration
Objective-C
- (nonnull NSArray<id<SCCameraKitLens>> *)lensesForGroupID: (nonnull NSString *)groupID;
Parameters
groupID
the group ID containing the desired lenses.
-
Specific lens in group ID specified
Note
this method will not return any lenses until the user has expressed interest in a group by calling beginObservingGroupID: or beginObservingLens:inGroup:Note
for updates on when the return value of this method changes, add a observer in addObserver:Declaration
Objective-C
- (nullable id<SCCameraKitLens>)lensWithID:(nonnull NSString *)lensID inGroupID:(nonnull NSString *)groupID;
Parameters
lensID
id of lens
groupID
id of group lens is in