ARCloudSDK
allows you to store your mask effects at server side.
/// This method needs to be called in the UIApplicationDelegate func application(_ application:, handleEventsForBackgroundURLSession identifier:, completionHandler: @escaping () -> Void)
@objc static public func application(
_ application: UIApplication,
handleEventsForBackgroundURLSession identifier: String,
completionHandler: @escaping () -> Void
)
/// Initialize AR cloud client with UUID string.
/// - Parameters:
/// - arCloudUrl: the url that is used to provide effects.
/// - embeddedEffectURLs: the list of url to folders which store embedded effects, effects from these folders will be displayed as downloaded.
@objc public required init(
arCloudUrl: String,
embeddedEffectURLs: [URL]? = nil
)
/// Retrieve ar effects from cloud.
@objc public func getAREffects(completion: @escaping ([AREffect]?, NSError?) -> Void)
/// Retrieve the ar effect preview image
@objc public func getArEffectPreview(
_ effect: AREffect,
completion: @escaping (UIImage?, NSError?) -> Void
)
/// Download the ar effect to local storage
@discardableResult
@objc public func downloadArEffect(
_ effect: AREffect,
downloadProgress: ((Double) -> Void)?,
completion: @escaping (URL?, NSError?) -> Void
) -> DownloadEffectRequestId
/// Cancel downloading effect with specific request id
@objc public func cancelDownloadingEffect(
withRequestId requestId: DownloadEffectRequestId
)
/// Storing path to the folder witch storing downloaded effects
@objc public static var effectsFolderURL: URL