diff --git a/bindings/dart/ios/Classes/SwiftXaynAiFfiDartPlugin.swift b/bindings/dart/ios/Classes/SwiftXaynAiFfiDartPlugin.swift index 459a085db..ed3cc5bba 100644 --- a/bindings/dart/ios/Classes/SwiftXaynAiFfiDartPlugin.swift +++ b/bindings/dart/ios/Classes/SwiftXaynAiFfiDartPlugin.swift @@ -14,8 +14,10 @@ public class SwiftXaynAiFfiDartPlugin: NSObject, FlutterPlugin { // The Xcode toolchain won't include the shared library in the build // process unless a method from the library is invoked. So, this - // call is just done to ensure that the library is included. + // call to a component directly related to the ai is just done to ensure + // that the library is included, independent of the actual return value + // or failure. public func enforceBinding(){ - dummy_function() + xaynai_new(nil, nil, nil, nil, nil, nil) } } diff --git a/xayn-ai-ffi-c/src/utils.rs b/xayn-ai-ffi-c/src/utils.rs index 62cb2da43..e1e701654 100644 --- a/xayn-ai-ffi-c/src/utils.rs +++ b/xayn-ai-ffi-c/src/utils.rs @@ -7,12 +7,6 @@ use xayn_ai_ffi::{CCode, Error}; #[cfg(doc)] pub use crate::slice::CBoxedSlice; -/// This function does nothing. -/// -/// Calling this prevents Swift to drop the library. -#[no_mangle] -pub extern "C" fn dummy_function() {} - /// Reads a string slice from the borrowed bytes pointer. /// /// # Errors