objc2-message-ui 0.3.2

Bindings to the MessageUI framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;

use crate::*;

/// UPI.
#[cfg(all(feature = "MFMessageComposeViewController", feature = "objc2-ui-kit"))]
impl MFMessageComposeViewController {
    extern_methods!(
        #[cfg(feature = "block2")]
        /// Configures the instance of `MFMessageComposeViewController` for UPI device validation
        ///
        /// If the host app has the `com.apple.developer.upi-device-validation` managed entitlement, this
        /// will configure the instance of `MFMessageComposeViewController` with non-editable recipients
        /// and body fields. This API is only functional on devices with SMS capability and is only
        /// compatible with non-iMessagable recipients. The send completion handler will be invoked with
        /// `YES` only once the SMS was successfully transmitted to the sender's cellular carrier. If the
        /// SMS failed to send, the completion handler will be invoked with `NO`.
        ///
        /// The completion handler will be in invoked on the main thread. It will only be invoked after
        /// `MFMessageComposeViewController` delegate's `-messageComposeViewController:didFinishWithResult:`
        /// method was called. That method is called in response to user action (the user hit cancel or
        /// send); the send completion handler is called with the transmission result of the message. It
        /// will not be called at all if `-messageComposeViewController:didFinishWithResult:` was not
        /// called with `MessageComposeResultSent`.
        ///
        /// Because it can take some time to send a message, the completion handler could be invoked
        /// after the `MFMessageComposeViewController` instance is deallocated.
        ///
        /// Parameter `completion`: A block invoked with a BOOL of whether the message was actually sent.
        #[unsafe(method(setUPIVerificationCodeSendCompletion:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setUPIVerificationCodeSendCompletion(
            &self,
            completion: &block2::DynBlock<dyn Fn(Bool)>,
        );
    );
}