LNExtensionExecutor
An extension executor for iOS, allowing bypass of UIActivityViewController to execute both UI and non-UI action extensions.
Install / Use
/learn @LeoNatan/LNExtensionExecutorREADME
LNExtensionExecutor
An extension and activity executor for iOS, allowing bypass of UIActivityViewController to execute both UI and non-UI action extensions directly.
<span class="badge-paypal"><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=BR68NJEJXGWL6" title="Donate to this project using PayPal"><img src="https://img.shields.io/badge/paypal-donate-yellow.svg?style=flat" alt="PayPal Donation Button" /></a></span>
Adding to Your Project
Swift Package Manager is the recommended way to integrate LNExtensionExecutor in your project.
LNExtensionExecutor supports SPM versions 5.1.0 and above. To use SPM, you should use Xcode 11 to open your project. Click File -> Swift Packages -> Add Package Dependency, enter https://github.com/LeoNatan/LNExtensionExecutor. Select the version you’d like to use.
You can also manually add the package to your Package.swift file:
.package(url: "https://github.com/LeoNatan/LNExtensionExecutor.git", from: "1.0")
And the dependency in your target:
.target(name: "BestExampleApp", dependencies: ["LNExtensionExecutor"]),
Usage
In the following example, the WhatsApp share extension is opened with an image:
import LNExtensionExecutor
//...
do {
let executor = try LNExtensionExecutor(extensionBundleIdentifier: "net.whatsapp.WhatsApp.ShareExtension")
let (completed, returnItems) = try await executor.execute(withActivityItems: activityItems, on: self)
print("completed: \(completed) return items: \(returnItems)")
} catch(let error) {
print("error: \(error.localizedDescription)")
}
The activity items provided to the execute method should be the same that would be passed to a UIActivityViewController instance.
Extension Bundle Identifier Discovery
Discovering the actual extension identifiers can be difficult. To assist with this task, the included example project helps you by setting a text field to the extension identifier you select in a UIActivityViewController. This identifier can then be copied and used inside your app.
Related Skills
node-connect
351.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
351.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
351.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
