Enumerations
The following enumerations are available globally.
-
Result for
See moremenuHandler
in writing assistant.Declaration
Swift
public enum WAResult
-
Result for
See morefeedbackHandler
in writing assistant.Declaration
Swift
public enum WAFeedbackResult
-
Helper action for writing assistant. This is used to trigger extra actions in the writing assistant, such as retrying an operation, updating the text directly, or navigating to a different view.
See moreDeclaration
Swift
public enum WAHelperAction : Equatable
-
Constants for AttachmentGroup and Attachment component implementations. Also available to App so that App specific customization fits into SAP design and implementation.
See moreDeclaration
Swift
public enum AttachmentConstants
-
Errors occurs during attachment upload or deletion
See moreDeclaration
Swift
public enum AttachmentError : Error
-
Undocumented
See moreDeclaration
Swift
public enum AccessoryType : Int, CaseIterable
-
It is either a String or Image
See moreDeclaration
Swift
public enum TextOrIcon
-
Property for object view.
See moreDeclaration
Swift
public enum ObjectViewProperty
-
Undocumented
See moreDeclaration
Swift
public enum RowAlignment
-
Accessory item type.
See moreDeclaration
Swift
public enum AccessoryItem : Equatable
-
Activity item predefined types
See moreDeclaration
Swift
public enum ActivityItemType
-
Data types for KPIItemView.
See moreDeclaration
Swift
public enum KPIItemData
-
UI control types supporeted by Sort and Filter configuration
See moreDeclaration
Swift
public enum SortFilterItem : Identifiable, Hashable
-
UI control types supporeted by Sort and Filter configuration
See moreDeclaration
Swift
public enum _SortFilterItem : Identifiable, Hashable
-
An enum for setting the segment mode in
See moreDimensionSelector
Declaration
Swift
@frozen public enum SegmentWidthMode : Equatable
-
Place the image along the top, leading, bottom, or trailing edge of the button.
See moreDeclaration
Swift
public enum FioriButtonImagePosition
-
The color style of a Fiori button.
See moreDeclaration
Swift
public enum FioriButtonColorStyle
-
loading state of
See moreFioriButton
Declaration
Swift
public enum FioriButtonLoadingState
-
Undocumented
See moreDeclaration
Swift
public enum LibraryPreviewData
-
Enum representing the type of currency formatter to use.
See moreDeclaration
-
Size of
See moreFUIFilterFormView
buttonDeclaration
Swift
public enum FilterButtonSize
-
Undocumented
Declaration
Swift
public enum Fiori
-
A custom view builder that return instance of type
See moreIndexedViewContainer
.Declaration
Swift
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *) @resultBuilder public enum IndexedViewBuilder
-
Describes different presentation styles in
See moreSectionHeader
andSectionFooter
. Determines which views are visible; affects labels’ fonts, and vertical padding.Declaration
Swift
public enum SectionHeaderFooterStyle
-
Fiori style shadow.
See moreDeclaration
Swift
public enum FioriShadowStyle : CaseIterable
-
A custom parameter attribute that constructs views from closures.
Declaration
Swift
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *) @resultBuilder public enum ActivityItemsBuilder
-
Represents the various states a barcode scanner can be in.
See moreDeclaration
Swift
public enum ScannerStatus : Equatable
-
Enumerates the types of barcode scanners supported.
See moreDeclaration
Swift
public enum ScannerType : Equatable, CaseIterable
-
Represents data to be displayed on a scanner’s screen, if supported.
See moreDeclaration
Swift
public enum ScannerDisplayData
-
Manages various barcode scanner implementations, providing a unified interface for applications.
BarcodeScannerManager
is anObservableObject
that allows SwiftUI views to react to changes in scanner status, received barcodes, and pairing QR codes. It acts as a facade, delegating operations to the currently active scanner instance (e.g.,VisionKitScanner
,ProGloveScanner
).Overview
The manager holds instances of all supported scanner types. An application can select an active scanner type using
setActiveScanner(_:)
. Once a scanner is active, the manager proxies calls likestartMonitoring()
,triggerScan()
,getPairingQRCode()
, etc., to that instance.It also acts as a delegate (
BarcodeScannerDelegate
) for the active scanner, receiving status updates and barcode data, which it then publishes for the application to consume via its@Published
properties or callback closures (onStatusChanged
,onBarcodeScanned
).Usage
Initialization
Typically, you would use the shared singleton instance:
@StateObject private var scannerManager = BarcodeScannerManager.shared
Or, if you need custom configurations (e.g., for VisionKit):
@StateObject private var scannerManager = BarcodeScannerManager( recognizedDataTypes: [.barcode(symbologies: [.qr, .ean13])], // Specify symbologies for VisionKit recognizesMultipleItems: false, // For VisionKit: stop after first scan serviceUUID: "YOUR_CUSTOM_IPC_SERVICE_UUID" // Optional: For IPCMobile custom service )
Setting Callbacks
Assign closures to
onStatusChanged
andonBarcodeScanned
to receive updates:.onAppear { scannerManager.onStatusChanged = { status in // Handle status change (e.g., update UI, show errors) if case .error(let error) = status { self.errorMessage = error.localizedDescription } } scannerManager.onBarcodeScanned = { barcodeValue in // Handle received barcode self.scannedValue = barcodeValue // If using VisionKit and it's a single scan, you might want to dismiss its view. } }
Selecting and Activating a Scanner
Before using a scanner, it must be activated:
func activateMyScanner(type: ScannerType) async { do { try await scannerManager.setActiveScanner(type) // Scanner is now active and its startMonitoring() has been called. // Status should update to .idle, .ready, or an error. } catch { // Handle activation error (e.g., scanner.startMonitoring() failed) self.errorMessage = (error as? ScannerError)?.message ?? error.localizedDescription } }
A platform-agnostic enum to represent data types for scanners, replacing VisionKit’s RecognizedDataType.
See moreDeclaration
Swift
public enum BarcodeDataType : Hashable
extension BarcodeDataType: CustomStringConvertible
-
A custom parameter attribute that constructs views from closures.
Declaration
Swift
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *) @resultBuilder public enum AvatarsBuilder
-
A enum describing the state of an filter form option
See moreDeclaration
Swift
public enum FilterFormOptionState
-
A custom parameter attribute that constructs views from closures.
See moreDeclaration
Swift
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *) @resultBuilder public enum FootnoteIconsBuilder
-
Undocumented
See moreDeclaration
Swift
public enum TextPosition
-
Define the possible output formats for the scanned document
See moreDeclaration
Swift
public enum ScanOutputFormat
-
Define the possible output types: either an array of images or a PDF document
See moreDeclaration
Swift
public enum ScanOutput
-
A custom parameter attribute that constructs views from closures.
See moreDeclaration
Swift
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *) @resultBuilder public enum IconBuilder
-
Undocumented
Declaration
Swift
@resultBuilder public enum KPIHeaderBuilder
-
Available OptionListPickerItem layout types. Use this enum to define item layout type to present.
See moreDeclaration
Swift
public enum OptionListPickerItemLayoutType
-
Enum for FilterFeedbackBar ResetButton Type.
See moreDeclaration
Swift
public enum FilterFeedbackBarResetButtonType
-
A custom parameter attribute that constructs views from closures.
See moreDeclaration
Swift
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *) @resultBuilder public enum TagBuilder
-
The status of a timeline node
See moreDeclaration
Swift
public enum TimelineNodeType
-
The action type of
See moreUserConsentForm
that presents the alert.Declaration
Swift
public enum UserConsentAlertType
-
AIUserFeedback display mode
See moreDeclaration
Swift
public enum AIUserFeedbackDisplayMode
-
AIUserFeedback submit button state
See moreDeclaration
Swift
public enum AIUserFeedbackSubmitButtonState
-
AIUserFeedback vote state
See moreDeclaration
Swift
public enum AIUserFeedbackVoteState
-
Activity item layout
See moreDeclaration
Swift
public enum ActivityItemLayout
-
Banner multi message type
See moreDeclaration
Swift
public enum BannerMultiMessageType : Int
-
CardFooter button width mode
See moreDeclaration
Swift
public enum CardFooterButtonWidthMode : Int
-
Card Tests
See moreDeclaration
Swift
public enum CardFooterTests
-
Card Tests
See moreDeclaration
Swift
public enum CardTests
-
This file provides default fiori style for the component.
- Uncomment the following code.
- Implement layout and style in corresponding places.
- Delete
.generated
from file name. - Move this file to
_FioriStyles
folder underFioriSwiftUICore
.
Declaration
Swift
public enum DisplayState : Equatable
-
Different sizes of KPIItem. The default is .small
See moreDeclaration
Swift
public enum KPIItemSize
-
KPIItem takes 3 types of subitem
See moreDeclaration
Swift
public enum KPISubitemType
-
Enum to determine whether to display the large or small progress circle around the KPIContent. Default:
See moreKPIProgressItemSize.large
Declaration
Swift
public enum KPIProgressItemSize
-
ObjectHeaderSkeletonLoadingPattern provides predefined patterns for ObjectHeader skeleton loading.
See moreDeclaration
Swift
public enum ObjectHeaderSkeletonLoadingPattern
-
See moreObjectItemSkeletonLoadingPattern
provides a set of predefined skeleton loading patterns for ObjectItem.Declaration
Swift
public enum ObjectItemSkeletonLoadingPattern
-
This file provides default fiori style for the component.
- Uncomment fhe following code.
- Implement layout and style in corresponding places.
- Delete
.generated
from file name. - Move this file to
_FioriStyles
folder underFioriSwiftUICore
.
Declaration
Swift
public enum ToastMessagePosition : String, CaseIterable, Identifiable
-
Describes different onboarding states in onboarding process flow.
See moreDeclaration
Swift
public enum WelcomeScreenState
-
Describes different onboarding configuration options in onboarding process flow.
See moreDeclaration
Swift
public enum WelcomeScreenOption