FIRHTTPSCallable


@interface FIRHTTPSCallable : NSObject

A FIRHTTPSCallable is reference to a particular Callable HTTPS trigger in Cloud Functions.

  • Undocumented

    Declaration

    Objective-C

    - (id)init NS_UNAVAILABLE;
  • Executes this Callable HTTPS trigger asynchronously without any parameters.

    The request to the Cloud Functions backend made by this method automatically includes a Firebase Instance ID token to identify the app instance. If a user is logged in with Firebase Auth, an auth ID token for the user is also automatically included.

    Firebase Instance ID sends data to the Firebase backend periodically to collect information regarding the app instance. To stop this, see [FIRInstanceID deleteIDWithHandler:]. It resumes with a new Instance ID the next time you call this method.

    Declaration

    Objective-C

    - (void)callWithCompletion:(nonnull void (^)(FIRHTTPSCallableResult *_Nullable,
                                                 NSError *_Nullable))completion;

    Parameters

    completion

    The block to call when the HTTPS request has completed.

  • Executes this Callable HTTPS trigger asynchronously.

    The data passed into the trigger can be any of the following types:

    • NSNull
    • NSString
    • NSNumber
    • NSArray, where the contained objects are also one of these types.
    • NSDictionary, where the values are also one of these types.

    The request to the Cloud Functions backend made by this method automatically includes a Firebase Instance ID token to identify the app instance. If a user is logged in with Firebase Auth, an auth ID token for the user is also automatically included.

    Firebase Instance ID sends data to the Firebase backend periodically to collect information regarding the app instance. To stop this, see [FIRInstanceID deleteIDWithHandler:]. It resumes with a new Instance ID the next time you call this method.

    Declaration

    Objective-C

    - (void)callWithObject:(nullable id)data
                completion:(nonnull void (^)(FIRHTTPSCallableResult *_Nullable,
                                             NSError *_Nullable))completion;

    Parameters

    data

    Parameters to pass to the trigger.

    completion

    The block to call when the HTTPS request has completed.