Class
Config
@objc(FSConfig) public class Config: NSObject
The Config
class is used together with Client
to configure certain aspects of the API.
Relationships
Nested Types
Config.Builder
A convenience class that allows easily building a new
Config
object.
Conforms To
NSObject
Properties
builder
@objc public static var builder
Returns a Builder
instance to help instantiating Config
objects.
showEditorBeforeUpload
@objc public var showEditorBeforeUpload: Bool = false
Change this flag to true if you want to allow user to edit photos before the upload.
callbackURLScheme
@objc public var callbackURLScheme: String?
An URL scheme supported by the app. This is required to complete the cloud provider's authentication flow.
cloudThumbnailCachePolicy
@objc public var cloudThumbnailCachePolicy: URLRequest.CachePolicy = .reloadIgnoringLocalCacheData
This policy controls the thumbnail's caching behavior when browsing cloud contents in the picker.
kMaximumSelectionNoLimit
@objc public static let kMaximumSelectionNoLimit: UInt = 0
Use this value if you want to allow user for selecting unlimited number of assets to upload.
maximumSelectionAllowed
@objc public var maximumSelectionAllowed: UInt = 1
This controls if user can select more than one image/document for upload.
Set this value to kMaximumSelectionNoLimit
if you want to remove this limit.
Setting more then one will use custom ImagePicker in case of LocalSource.photoLibrary.
The default value is 1.
modalPresentationStyle
@objc public var modalPresentationStyle: UIModalPresentationStyle = .currentContext
This settings determines the way we want to present document picker, image pickers and upload monitor.
The default presentation style is .currentContext
availableCloudSources
@objc public var availableCloudSources: [CloudSource]
This setting determines what cloud sources are available when using the picker. By default, it contains all the supported cloud sources.
availableLocalSources
@objc public var availableLocalSources: [LocalSource]
This setting determines what local sources are available when using the picker. By default, it contains all the supported local sources.
documentPickerAllowedUTIs
@objc public var documentPickerAllowedUTIs: [String] = ["public.item"]
This setting determines what document types can be picked when using Apple's document picker.
By default, this contains ["public.item"]
.
cloudSourceAllowedUTIs
@objc public var cloudSourceAllowedUTIs: [String] = ["public.item"]
This setting determines what document types can be picked from a cloud source.
By default, this contains ["public.item"]
.
imageURLExportPreset
@objc public var imageURLExportPreset: ImageURLExportPreset = .compatible
This setting determines the format used for exported images.
Possible values are .compatible
(for JPEG) and .current
(for HEIF).
imageExportQuality
@objc public var imageExportQuality: Float = 0.85
This setting determines the quality setting for images taken using the camera and exported either as HEIC or JPEG.
videoExportPreset
@objc public var videoExportPreset: String = AVAssetExportPresetHEVCHighestQuality
This setting determines the format used for exported videos.
Some possible values are:
-
AVAssetExportPresetHEVCHighestQuality
(for highest quality HEVC) -
AVAssetExportPresetHighestQuality
(for highest quality H.264)
For more possible values, please consult AVAssetExportSession
.
The default value is AVAssetExportPresetHEVCHighestQuality
videoQuality
@objc public var videoQuality: UIImagePickerController.QualityType = .typeMedium
This setting determines the video recording quality for videos recorded using the camera. It is also used whenever picking a recorded movie. Specifically, if the video quality setting is lower than the video quality of an existing movie, displaying that movie in the picker results in transcoding the movie to the lower quality.
The default value is .typeMedium
photosPickerFilter
public var photosPickerFilter: [PhotosPickerFilter] = [.images, .livePhotos, .videos]
This setting determines what kind of asset types can be picked when using the new photos picker (PHPickerViewController) that our SDK now uses by default on iOS 14+ devices. However, when running on older devices, our SDK will fallback to the old photos pickers and this setting will be ignored.
The default value is [.images, .livePhotos, .videos]
.
appURLScheme
@available(*, deprecated, message: "Marked for removal in version 3.0", renamed: "callbackURLScheme")
@objc public var appURLScheme: String?