amplify-swift/AmplifyPlugins/Predictions/AWSPredictionsPlugin/AWSPredictionsPlugin+Reset....

30 lines
538 B
Swift

//
// Copyright Amazon.com Inc. or its affiliates.
// All Rights Reserved.
//
// SPDX-License-Identifier: Apache-2.0
//
import Foundation
import Amplify
extension AWSPredictionsPlugin {
public func reset(onComplete: @escaping BasicClosure) {
if predictionsService != nil {
predictionsService.reset()
predictionsService = nil
}
if authService != nil {
authService = nil
}
if queue != nil {
queue = nil
}
onComplete()
}
}