This directory contains iOS adapters for the shared KMP cleaner core.
TruesightIOS/IOSCleanerPolicyStore.swiftTruesightIOS/IOSRedirectFollower.swiftTruesightIOS/CleanerFactory.swiftTruesightIOS/SharedCleanerBridge.swift
TruesightShareExtension/ShareCleaner.swiftTruesightShareExtension/ShareExtensionRequestHandler.swift
-
Build KMP Apple framework from macOS:
./gradlew :shared:assembleXCFramework
-
In Xcode, add
SharedCleaner.xcframeworkto both app and extension targets. -
Ensure Framework Search Paths include the framework output folder.
-
Confirm
import SharedCleanerresolves in all Swift files above.
let bridge = SharedCleanerBridge()
let cleaned = bridge.cleanFirstUrl(fromText: "Check this https://x.com/user/status/123?utm_source=share")let handler = ShareExtensionRequestHandler()
handler.handle(extensionContext: extensionContext)- Framework/module name is expected to be
SharedCleaner(from KMPbaseName). SharedCleanerBridgewraps KMP interop calls so the rest of your Swift code stays simple.- This Linux environment cannot compile iOS targets, so validate final wiring on macOS/Xcode.