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: SCCameraKitDeviceMotionDataProvider? { get set }
-
User data provider
Declaration
Objective-C
@property (nonatomic, strong, nullable) id<SCCameraKitUserDataProvider> userData;
Swift
var userData: SCCameraKitUserDataProvider? { get set }
-
Lens hint provider to provide lens hint localizations
Declaration
Objective-C
@property (nonatomic, strong, nullable) id<SCCameraKitLensHintProvider> lensHint;
Swift
var lensHint: SCCameraKitLensHintProvider? { get set }
-
Location data provider
Declaration
Objective-C
@property (nonatomic, strong, nullable) id<SCCameraKitLocationDataProvider> location;
Swift
var location: 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: SCCameraKitLensMediaPickerProvider? { 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: [SCCameraKitLensRemoteApiServiceProvider] { get set }
-
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;
Swift
init(deviceMotion: SCCameraKitDeviceMotionDataProvider?, userData: SCCameraKitUserDataProvider?, lensHint: SCCameraKitLensHintProvider?, location: SCCameraKitLocationDataProvider?, mediaPicker: SCCameraKitLensMediaPickerProvider?, remoteApiServiceProviders: [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.
-
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: SCCameraKitDeviceMotionDataProvider?, userData: 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: SCCameraKitDeviceMotionDataProvider?, userData: SCCameraKitUserDataProvider?, lensHint: 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: SCCameraKitDeviceMotionDataProvider?, userData: SCCameraKitUserDataProvider?, lensHint: SCCameraKitLensHintProvider?, location: 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: SCCameraKitDeviceMotionDataProvider?, userData: SCCameraKitUserDataProvider?, lensHint: SCCameraKitLensHintProvider?, location: SCCameraKitLocationDataProvider?, mediaPicker: 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.