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
23extern_conformance!(
24 unsafe impl NSObjectProtocol for SKStoreReviewController {}
25);
26
27impl SKStoreReviewController {
28 extern_methods!(
29 /// 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.
30 ///
31 /// This may or may not show any UI.
32 ///
33 /// Given this may not successfully present an alert to the user, it is not appropriate for use
34 /// from a button or any other user action. For presenting a write review form, a deep link is
35 /// available to the App Store by appending the query params "action=write-review" to a product URL.
36 #[deprecated = "Use AppStore.requestReview(in:)"]
37 #[unsafe(method(requestReview))]
38 #[unsafe(method_family = none)]
39 pub unsafe fn requestReview();
40 );
41}
42
43/// Methods declared on superclass `NSObject`.
44impl SKStoreReviewController {
45 extern_methods!(
46 #[unsafe(method(init))]
47 #[unsafe(method_family = init)]
48 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
49
50 #[unsafe(method(new))]
51 #[unsafe(method_family = new)]
52 pub unsafe fn new() -> Retained<Self>;
53 );
54}