1414
1515import Foundation
1616
17- /**
18- * A `HTTPSCallableResult` contains the result of calling a `HTTPSCallable`.
19- */
17+ /// A `HTTPSCallableResult` contains the result of calling a `HTTPSCallable`.
2018@objc ( FIRHTTPSCallableResult)
2119open class HTTPSCallableResult : NSObject {
22- /**
23- * The data that was returned from the Callable HTTPS trigger.
24- *
25- * The data is in the form of native objects. For example, if your trigger returned an
26- * array, this object would be an `Array<Any>`. If your trigger returned a JavaScript object with
27- * keys and values, this object would be an instance of `[String: Any]`.
28- */
20+ /// The data that was returned from the Callable HTTPS trigger.
21+ ///
22+ /// The data is in the form of native objects. For example, if your trigger returned an
23+ /// array, this object would be an `Array<Any>`. If your trigger returned a JavaScript object with
24+ /// keys and values, this object would be an instance of `[String: Any]`.
2925 @objc public let data : Any
3026
3127 init ( data: Any ) {
@@ -54,9 +50,7 @@ open class HTTPSCallable: NSObject {
5450
5551 // MARK: - Public Properties
5652
57- /**
58- * The timeout to use when calling the function. Defaults to 70 seconds.
59- */
53+ /// The timeout to use when calling the function. Defaults to 70 seconds.
6054 @objc open var timeoutInterval : TimeInterval = 70
6155
6256 init ( functions: Functions , name: String , options: HTTPSCallableOptions ? = nil ) {
@@ -71,28 +65,27 @@ open class HTTPSCallable: NSObject {
7165 endpoint = . url( url)
7266 }
7367
74- /**
75- * Executes this Callable HTTPS trigger asynchronously.
76- *
77- * The data passed into the trigger can be any of the following types:
78- * - `nil` or `NSNull`
79- * - `String`
80- * - `NSNumber`, or any Swift numeric type bridgeable to `NSNumber`
81- * - `[Any]`, where the contained objects are also one of these types.
82- * - `[String: Any]` where the values are also one of these types.
83- *
84- * The request to the Cloud Functions backend made by this method automatically includes a
85- * Firebase Installations ID token to identify the app instance. If a user is logged in with
86- * Firebase Auth, an auth ID token for the user is also automatically included.
87- *
88- * Firebase Cloud Messaging sends data to the Firebase backend periodically to collect information
89- * regarding the app instance. To stop this, see `Messaging.deleteData()`. It
90- * resumes with a new FCM Token the next time you call this method.
91- *
92- * - Parameters:
93- * - data: Parameters to pass to the trigger.
94- * - completion: The block to call when the HTTPS request has completed.
95- */
68+ /// Executes this Callable HTTPS trigger asynchronously.
69+ ///
70+ /// The data passed into the trigger can be any of the following types:
71+ /// - `nil` or `NSNull`
72+ /// - `String`
73+ /// - `NSNumber`, or any Swift numeric type bridgeable to `NSNumber`
74+ /// - `[Any]`, where the contained objects are also one of these types.
75+ /// - `[String: Any]` where the values are also one of these types.
76+ ///
77+ /// The request to the Cloud Functions backend made by this method automatically includes a
78+ /// Firebase Installations ID token to identify the app instance. If a user is logged in with
79+ /// Firebase Auth, an auth ID token for the user is also automatically included.
80+ ///
81+ /// Firebase Cloud Messaging sends data to the Firebase backend periodically to collect
82+ /// information
83+ /// regarding the app instance. To stop this, see `Messaging.deleteData()`. It
84+ /// resumes with a new FCM Token the next time you call this method.
85+ ///
86+ /// - Parameters:
87+ /// - data: Parameters to pass to the trigger.
88+ /// - completion: The block to call when the HTTPS request has completed.
9689 @objc ( callWithObject: completion: ) open func call( _ data: Any ? = nil ,
9790 completion: @escaping ( HTTPSCallableResult ? ,
9891 Error ? ) -> Void ) {
@@ -121,39 +114,38 @@ open class HTTPSCallable: NSObject {
121114 }
122115 }
123116
124- /**
125- * Executes this Callable HTTPS trigger asynchronously. This API should only be used from Objective-C.
126- *
127- * The request to the Cloud Functions backend made by this method automatically includes a
128- * Firebase Installations ID token to identify the app instance. If a user is logged in with
129- * Firebase Auth, an auth ID token for the user is also automatically included.
130- *
131- * Firebase Cloud Messaging sends data to the Firebase backend periodically to collect information
132- * regarding the app instance. To stop this, see `Messaging.deleteData()`. It
133- * resumes with a new FCM Token the next time you call this method.
134- *
135- * - Parameter completion The block to call when the HTTPS request has completed.
136- */
117+ /// Executes this Callable HTTPS trigger asynchronously. This API should only be used from
118+ /// Objective-C.
119+ ///
120+ /// The request to the Cloud Functions backend made by this method automatically includes a
121+ /// Firebase Installations ID token to identify the app instance. If a user is logged in with
122+ /// Firebase Auth, an auth ID token for the user is also automatically included.
123+ ///
124+ /// Firebase Cloud Messaging sends data to the Firebase backend periodically to collect
125+ /// information
126+ /// regarding the app instance. To stop this, see `Messaging.deleteData()`. It
127+ /// resumes with a new FCM Token the next time you call this method.
128+ ///
129+ /// - Parameter completion: The block to call when the HTTPS request has completed.
137130 @objc ( callWithCompletion: ) public func __call( completion: @escaping ( HTTPSCallableResult ? ,
138131 Error ? ) -> Void ) {
139132 call ( nil , completion: completion)
140133 }
141134
142- /**
143- * Executes this Callable HTTPS trigger asynchronously.
144- *
145- * The request to the Cloud Functions backend made by this method automatically includes a
146- * FCM token to identify the app instance. If a user is logged in with Firebase
147- * Auth, an auth ID token for the user is also automatically included.
148- *
149- * Firebase Cloud Messaging sends data to the Firebase backend periodically to collect information
150- * regarding the app instance. To stop this, see `Messaging.deleteData()`. It
151- * resumes with a new FCM Token the next time you call this method.
152- *
153- * - Parameter data Parameters to pass to the trigger.
154- * - Throws: An error if the Cloud Functions invocation failed.
155- * - Returns: The result of the call.
156- */
135+ /// Executes this Callable HTTPS trigger asynchronously.
136+ ///
137+ /// The request to the Cloud Functions backend made by this method automatically includes a
138+ /// FCM token to identify the app instance. If a user is logged in with Firebase
139+ /// Auth, an auth ID token for the user is also automatically included.
140+ ///
141+ /// Firebase Cloud Messaging sends data to the Firebase backend periodically to collect
142+ /// information
143+ /// regarding the app instance. To stop this, see `Messaging.deleteData()`. It
144+ /// resumes with a new FCM Token the next time you call this method.
145+ ///
146+ /// - Parameter data: Parameters to pass to the trigger.
147+ /// - Throws: An error if the Cloud Functions invocation failed.
148+ /// - Returns: The result of the call.
157149 @available ( iOS 13 , tvOS 13 , macOS 10 . 15 , macCatalyst 13 , watchOS 7 , * )
158150 open func call( _ data: Any ? = nil ) async throws -> HTTPSCallableResult {
159151 return try await withCheckedThrowingContinuation { continuation in
0 commit comments