objc2_store_kit/generated/
SKStoreReviewController.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
9extern_class!(
10    /// Controller class to request a review from the current user
11    ///
12    /// See also [Apple's documentation](https://developer.apple.com/documentation/storekit/skstorereviewcontroller?language=objc)
13    #[unsafe(super(NSObject))]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    #[deprecated = "Use AppStore.requestReview(in:)"]
16    pub struct SKStoreReviewController;
17);
18
19unsafe impl Send for SKStoreReviewController {}
20
21unsafe impl Sync for SKStoreReviewController {}
22
23unsafe impl NSObjectProtocol for SKStoreReviewController {}
24
25impl SKStoreReviewController {
26    extern_methods!(
27        /// Request StoreKit to ask the user for an app review. Uses the keyWindow's UIWindowScene which may or may not be the scene a user is interacting with.
28        ///
29        /// This may or may not show any UI.
30        ///
31        /// Given this may not successfully present an alert to the user, it is not appropriate for use
32        /// from a button or any other user action. For presenting a write review form, a deep link is
33        /// available to the App Store by appending the query params "action=write-review" to a product URL.
34        #[deprecated = "Use AppStore.requestReview(in:)"]
35        #[unsafe(method(requestReview))]
36        #[unsafe(method_family = none)]
37        pub unsafe fn requestReview();
38    );
39}
40
41/// Methods declared on superclass `NSObject`.
42impl SKStoreReviewController {
43    extern_methods!(
44        #[unsafe(method(init))]
45        #[unsafe(method_family = init)]
46        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
47
48        #[unsafe(method(new))]
49        #[unsafe(method_family = new)]
50        pub unsafe fn new() -> Retained<Self>;
51    );
52}