SCCameraKitDataProviderComponent
Objective-C
@interface SCCameraKitDataProviderComponent : NSObject
Swift
class DataProviderComponent : NSObject
Component for user’s custom data providers
-
Device motion data provider
Declaration
Objective-C
@property (nonatomic, strong, nullable) id<SCCameraKitDeviceMotionDataProvider> deviceMotion;
Swift
var deviceMotion: (any SCCameraKitDeviceMotionDataProvider)? { get set }
-
User data provider
Declaration
Objective-C
@property (nonatomic, strong, nullable) id<SCCameraKitUserDataProvider> userData;
Swift
var userData: (any SCCameraKitUserDataProvider)? { get set }
-
Lens hint provider to provide lens hint localizations
Declaration
Objective-C
@property (nonatomic, strong, nullable) id<SCCameraKitLensHintProvider> lensHint;
Swift
var lensHint: (any SCCameraKitLensHintProvider)? { get set }
-
Location data provider
Declaration
Objective-C
@property (nonatomic, strong, nullable) id<SCCameraKitLocationDataProvider> location;
Swift
var location: (any SCCameraKitLocationDataProvider)? { get set }
-
Media picker provider for selecting and loading external images and video into lenses.
Declaration
Objective-C
@property (nonatomic, strong, nullable) id<SCCameraKitLensMediaPickerProvider> mediaPicker;
Swift
var mediaPicker: (any SCCameraKitLensMediaPickerProvider)? { get set }
-
Http handler to handle http requests made by lenses.
Declaration
Objective-C
@property (nonatomic, strong, nullable) id<SCCameraKitLensHttpHandler> lensHttpHandler;
Swift
var lensHttpHandler: (any SCCameraKitLensHttpHandler)? { get set }
-
List of remote api service providers to handle remote api requests sent by lenses.
Declaration
Objective-C
@property (nonatomic, copy) NSArray<id<SCCameraKitLensRemoteApiServiceProvider>> *_Nonnull remoteApiServiceProviders;
Swift
var remoteApiServiceProviders: [any SCCameraKitLensRemoteApiServiceProvider] { get set }
-
-initWithDeviceMotion:
userData: lensHint: location: mediaPicker: remoteApiServiceProviders: lensHttpHandler: Designated init to pass in user data providers If nil is passed in for a specific data provider, CameraKit will create and handle the data provider by default
Declaration
Objective-C
- (nonnull instancetype) initWithDeviceMotion: (nullable id<SCCameraKitDeviceMotionDataProvider>)deviceMotion userData:(nullable id<SCCameraKitUserDataProvider>)userData lensHint:(nullable id<SCCameraKitLensHintProvider>)lensHint location: (nullable id<SCCameraKitLocationDataProvider>)location mediaPicker:(nullable id<SCCameraKitLensMediaPickerProvider>) mediaPicker remoteApiServiceProviders: (nonnull NSArray<id<SCCameraKitLensRemoteApiServiceProvider>> *) remoteApiServiceProviders lensHttpHandler: (nullable id<SCCameraKitLensHttpHandler>)lensHttpHandler;
Swift
init(deviceMotion: (any SCCameraKitDeviceMotionDataProvider)?, userData: (any SCCameraKitUserDataProvider)?, lensHint: (any SCCameraKitLensHintProvider)?, location: (any SCCameraKitLocationDataProvider)?, mediaPicker: (any SCCameraKitLensMediaPickerProvider)?, remoteApiServiceProviders: [any SCCameraKitLensRemoteApiServiceProvider], lensHttpHandler: (any SCCameraKitLensHttpHandler)?)
Parameters
deviceMotion
device motion data provider instance
userData
user data provider instance
lensHint
lens hint provider instance
location
location provider instance
mediaPicker
Media picker provider for selecting and loading external images and video into lenses.
remoteApiServiceProviders
List of remote api service providers to handle remote api requests sent by lenses.
lensHttpHandler
Http handler to handle http requests made by lenses.
-
Convenience init to mantain API compatibility
Declaration
Objective-C
- (nonnull instancetype) initWithDeviceMotion: (nullable id<SCCameraKitDeviceMotionDataProvider>)deviceMotion userData:(nullable id<SCCameraKitUserDataProvider>)userData;
Swift
convenience init(deviceMotion: (any SCCameraKitDeviceMotionDataProvider)?, userData: (any SCCameraKitUserDataProvider)?)
Parameters
deviceMotion
device motion data provider instance
userData
user data provider instance
-
Convenience init to mantain API compatibility
Declaration
Objective-C
- (nonnull instancetype) initWithDeviceMotion: (nullable id<SCCameraKitDeviceMotionDataProvider>)deviceMotion userData:(nullable id<SCCameraKitUserDataProvider>)userData lensHint:(nullable id<SCCameraKitLensHintProvider>)lensHint;
Swift
convenience init(deviceMotion: (any SCCameraKitDeviceMotionDataProvider)?, userData: (any SCCameraKitUserDataProvider)?, lensHint: (any SCCameraKitLensHintProvider)?)
Parameters
deviceMotion
device motion data provider instance
userData
user data provider instance
lensHint
lens hint provider instance
-
Convenience init to mantain API compatibility If nil is passed in for a specific data provider, CameraKit will create and handle the data provider by default
Declaration
Objective-C
- (nonnull instancetype) initWithDeviceMotion: (nullable id<SCCameraKitDeviceMotionDataProvider>)deviceMotion userData:(nullable id<SCCameraKitUserDataProvider>)userData lensHint:(nullable id<SCCameraKitLensHintProvider>)lensHint location:(nullable id<SCCameraKitLocationDataProvider>)location;
Swift
convenience init(deviceMotion: (any SCCameraKitDeviceMotionDataProvider)?, userData: (any SCCameraKitUserDataProvider)?, lensHint: (any SCCameraKitLensHintProvider)?, location: (any SCCameraKitLocationDataProvider)?)
Parameters
deviceMotion
device motion data provider instance
userData
user data provider instance
lensHint
lens hint provider instance
location
location provider instance
-
Convenience init to mantain API compatibility
Declaration
Objective-C
- (nonnull instancetype) initWithDeviceMotion: (nullable id<SCCameraKitDeviceMotionDataProvider>)deviceMotion userData:(nullable id<SCCameraKitUserDataProvider>)userData lensHint:(nullable id<SCCameraKitLensHintProvider>)lensHint location:(nullable id<SCCameraKitLocationDataProvider>)location mediaPicker: (nullable id<SCCameraKitLensMediaPickerProvider>)mediaPicker;
Swift
convenience init(deviceMotion: (any SCCameraKitDeviceMotionDataProvider)?, userData: (any SCCameraKitUserDataProvider)?, lensHint: (any SCCameraKitLensHintProvider)?, location: (any SCCameraKitLocationDataProvider)?, mediaPicker: (any SCCameraKitLensMediaPickerProvider)?)
Parameters
deviceMotion
device motion data provider instance
userData
user data provider instance
lensHint
lens hint provider instance
location
location provider instance
mediaPicker
Media picker provider for selecting and loading external images and video into lenses.
-
Convenience init to mantain API compatibility
Declaration
Objective-C
- (nonnull instancetype) initWithDeviceMotion: (nullable id<SCCameraKitDeviceMotionDataProvider>)deviceMotion userData:(nullable id<SCCameraKitUserDataProvider>)userData lensHint:(nullable id<SCCameraKitLensHintProvider>)lensHint location: (nullable id<SCCameraKitLocationDataProvider>)location mediaPicker:(nullable id<SCCameraKitLensMediaPickerProvider>) mediaPicker remoteApiServiceProviders: (nonnull NSArray<id<SCCameraKitLensRemoteApiServiceProvider>> *) remoteApiServiceProviders;
Swift
convenience init(deviceMotion: (any SCCameraKitDeviceMotionDataProvider)?, userData: (any SCCameraKitUserDataProvider)?, lensHint: (any SCCameraKitLensHintProvider)?, location: (any SCCameraKitLocationDataProvider)?, mediaPicker: (any SCCameraKitLensMediaPickerProvider)?, remoteApiServiceProviders: [any SCCameraKitLensRemoteApiServiceProvider])
Parameters
deviceMotion
device motion data provider instance
userData
user data provider instance
lensHint
lens hint provider instance
location
location provider instance
mediaPicker
Media picker provider for selecting and loading external images and video into lenses.
remoteApiServiceProviders
List of remote api service providers to handle remote api requests sent by lenses.