-
Notifications
You must be signed in to change notification settings - Fork 67
Closed as duplicate of#457
Closed as duplicate of#457
Copy link
Labels
A-objc2Affects the `objc2`, `objc2-exception-helper` and/or `objc2-encode` cratesAffects the `objc2`, `objc2-exception-helper` and/or `objc2-encode` cratesquestionThere is no such thing as a dumb one!There is no such thing as a dumb one!
Milestone
Description
Tauri Wry is using the Objc2 in iOS/Mac platform,
We are try to disable the input Accessory View in the iOS, so we override the method by define_class!
define_class!(
#[unsafe(super(WKWebView))]
#[name = "WryWebView"]
#[ivars = WryWebViewIvars]
pub struct WryWebView;
/// Overridden NSView methods.
impl WryWebView {
#[cfg(target_os = "ios")]
#[unsafe(method(inputAccessoryView))]
fn input_accessory_view(&self) -> Option<Retained<UIView>> {
Option::None
}
} we can see the method in the UIResponder.rs objc2_generated repo. but the build complained error:
/ define_class!(
36 | | #[unsafe(super(WKWebView))]
37 | | #[name = "WryWebView"]
38 | | #[ivars = WryWebViewIvars]
... |
118 | | );
| | ^
| | |
| |_the trait `OptionEncode` is not implemented for `Retained<objc2_ui_kit::UIView>`
| required by a bound introduced by this call
|
= help: the following other types implement trait `OptionEncode`:
&T
&mut T
NonNull<T>
NonZero<i16>
NonZero<i32>
NonZero<i64>
NonZero<i8>
NonZero<isize>
and 138 others
= note: required for `Option<Retained<objc2_ui_kit::UIView>>` to implement `Encode`
= note: required for `Option<Retained<objc2_ui_kit::UIView>>` to implement `EncodeReturn`
= note: required for `extern "C-unwind" fn(&WryWebView, Sel) -> Option<Retained<UIView>>` to implement `MethodImplementation`
note: required by a bound in `ClassBuilderHelper::<T>::add_method`
Please help us how can we do that
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-objc2Affects the `objc2`, `objc2-exception-helper` and/or `objc2-encode` cratesAffects the `objc2`, `objc2-exception-helper` and/or `objc2-encode` cratesquestionThere is no such thing as a dumb one!There is no such thing as a dumb one!