Feedback#

Defined in framework ScanditCaptureCore

SDCVibration#
@interface SDCVibration : NSObject

Added in version 6.0.0

A vibration, to be emitted for example when a code has been successfully scanned.

defaultVibration#
@property (class, nonatomic, readonly) SDCVibration *defaultVibration

Added in version 6.0.0

The default vibration for a successful scan.

selectionHapticFeedback#
@property (class, nonatomic, readonly) SDCVibration *selectionHapticFeedback

Added in version 6.7.0

It creates haptics to indicate a change in selection. In particular it uses UISelectionFeedbackGenerator. Please note that if the device does not have the Taptic Engine, no vibration will be emitted.

successHapticFeedback#
@property (class, nonatomic, readonly) SDCVibration *successHapticFeedback

Added in version 6.7.0

It creates haptics to communicate successes. This is a notification feedback type, indicating that a task has completed successfully. In particular it uses UINotificationFeedbackGenerator with type UINotificationFeedbackTypeSuccess. Please note that if the device does not have the Taptic Engine, no vibration will be emitted.

impactHapticFeedback#
@property (class, nonatomic, readonly) SDCVibration *impactHapticFeedback

Added in version 6.8.0

It creates haptics to communicate impact. In particular it uses UIImpactFeedbackGenerator. Please note that if the device does not have the Taptic Engine, no vibration will be emitted.

JSONString#
@property (nonatomic, nonnull, readonly) NSString *JSONString

Added in version 6.9.0

Returns the JSON representation of the vibration.

SDCSound#
@interface SDCSound : NSObject

Added in version 6.0.0

A sound, to be played for example when a code has been successfully scanned.

- initWithURL:#
- (nullable instancetype)initWithURL:(nonnull NSURL *)url

Added in version 6.0.0

Creates a new Sound loading the given file.

- initWithResourceName:
- (nullable instancetype)initWithResourceName:(nonnull NSString *)resourceName

Added in version 6.7.0

Creates a new Sound for the given resource name. The resource should be placed in the main application bundle.

defaultSound#
@property (class, nonatomic, readonly) SDCSound *defaultSound

Added in version 6.0.0

The default beep sound for a successful scan.

JSONString#
@property (nonatomic, nonnull, readonly) NSString *JSONString

Added in version 6.9.0

Returns the JSON representation of the sound.

SDCFeedback#
@interface SDCFeedback : NSObject

Added in version 6.0.0

A feedback consisting of a sound and vibration, for example to be provided by a device when a code has been successfully scanned.

+ feedbackFromJSONString:error:#
+ (nullable instancetype)feedbackFromJSONString:(nonnull NSString *)JSONString
                                          error:(NSError **)error

Added in version 6.3.0

Constructs a new feedback with the provided JSON serialization. See Serialization for details.

defaultFeedback#
@property (class, nonatomic, readonly) SDCFeedback *defaultFeedback

Added in version 6.0.0

The default feedback consisting of a default sound and a default vibration.

sound#
@property (nonatomic, nullable, readonly) SDCSound *sound

Added in version 6.0.0

The sound to be played when a feedback is required. If nil, no sound is played. Depending on the device’s ring mode and/or volume settings, no sound may be played even if this property is properly set to a non-nil instance.

vibration#
@property (nonatomic, nullable, readonly) SDCVibration *vibration

Added in version 6.0.0

The vibration to be emitted when a feedback is required. If nil, no vibration is emitted. This property is further influenced by the device’s ring mode: the device may not vibrate even if this property is properly set to a non-nil instance.

- initWithVibration: sound:#
- (instancetype)initWithVibration:(nullable SDCVibration *)vibration sound:(nullable SDCSound *)sound

Added in version 6.0.0

Creates a Feedback that emits the given vibration and plays the given sound.

- emit#
- (void)emit

Added in version 6.0.0

Emits the feedback defined by this object. This method is further influenced by the device’s ring mode and/or volume settings - check sound and vibration for more details.

JSONString#
@property (nonatomic, nonnull, readonly) NSString *JSONString

Added in version 6.9.0

Returns the JSON representation of the feedback.