Classes
The following classes are available globally.
-
Error that gets created when the authorization flow exits with an error.
See moreDeclaration
Swift
@objc public class AuthorizationError : NSObject, Error -
A view controller responsible for:
- Initializing and presenting the WKWebView.
- Detecting redirects back to the application (via
webView(_:decidePolicyFor:decisionHandler:)). - Invoking the callback closure when the application redirect is encountered.
Declaration
Swift
@objcMembers @MainActor public class ConnectController : UIViewController, WKNavigationDelegate -
Responsible for:
- Injecting JavaScript that lets Connect communicate back to the native SDK (via
SmartcarSDK.sendMessage). - Responding to the JS messages (WKScriptMessageHandler).
- Starting an ASWebAuthenticationSession for the OEM login flow.
- Capturing the OEM callback or error, then sending a JS event back to the web context.
Declaration
Swift
@objcMembers @MainActor public class OAuthCapture : NSObject, WKScriptMessageHandlerextension OAuthCapture: ASWebAuthenticationPresentationContextProviding - Injecting JavaScript that lets Connect communicate back to the native SDK (via
-
A builder used for generating Smartcar Connect authorization URLs. Use the built string with `SmartcarAuth.launchAuthFlow(…) To see a full description of Smartcar Connect parameters, see the Smartcar API Reference
See moreDeclaration
Swift
@objcMembers public class SCUrlBuilder : NSObject -
Smartcar Authentication SDK for iOS written in Swift 5. - Facilitates the authorization flow to launch the flow and retrieve an authorization code
See moreDeclaration
Swift
@objcMembers public class SmartcarAuth : NSObject -
VehicleInfo class is used to describe the vehicle information that may be returned via query parameters in the case of authentication failure.
See moreDeclaration
Swift
@objcMembers public class VehicleInfo : NSObject
View on GitHub
Classes Reference