objc2_message_ui/generated/UPI.rs
1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6
7use crate::*;
8
9/// UPI.
10#[cfg(all(feature = "MFMessageComposeViewController", feature = "objc2-ui-kit"))]
11impl MFMessageComposeViewController {
12 extern_methods!(
13 #[cfg(feature = "block2")]
14 /// Configures the instance of `MFMessageComposeViewController` for UPI device validation
15 ///
16 /// If the host app has the `com.apple.developer.upi-device-validation` managed entitlement, this
17 /// will configure the instance of `MFMessageComposeViewController` with non-editable recipients
18 /// and body fields. This API is only functional on devices with SMS capability and is only
19 /// compatible with non-iMessagable recipients. The send completion handler will be invoked with
20 /// `YES` only once the SMS was successfully transmitted to the sender's cellular carrier. If the
21 /// SMS failed to send, the completion handler will be invoked with `NO`.
22 ///
23 /// The completion handler will be in invoked on the main thread. It will only be invoked after
24 /// `MFMessageComposeViewController` delegate's `-messageComposeViewController:didFinishWithResult:`
25 /// method was called. That method is called in response to user action (the user hit cancel or
26 /// send); the send completion handler is called with the transmission result of the message. It
27 /// will not be called at all if `-messageComposeViewController:didFinishWithResult:` was not
28 /// called with `MessageComposeResultSent`.
29 ///
30 /// Because it can take some time to send a message, the completion handler could be invoked
31 /// after the `MFMessageComposeViewController` instance is deallocated.
32 ///
33 /// Parameter `completion`: A block invoked with a BOOL of whether the message was actually sent.
34 #[unsafe(method(setUPIVerificationCodeSendCompletion:))]
35 #[unsafe(method_family = none)]
36 pub unsafe fn setUPIVerificationCodeSendCompletion(
37 &self,
38 completion: &block2::DynBlock<dyn Fn(Bool)>,
39 );
40 );
41}