LNExtensionExecutor

1.1

An extension executor for iOS, allowing bypass of UIActivityViewController to execute both UI and non-UI action extensions.
LeoNatan/LNExtensionExecutor

What's New

v1.1

2021-09-03T22:57:45Z
  • Added support for Swift Package Manager
  • Modernized API

LNExtensionExecutor

An extension executor for iOS, allowing bypass of UIActivityViewController to execute both UI and non-UI action extensions directly. It is up to you to figure out what the bundle identifier of the extension is.

GitHub release GitHub stars GitHub license PayPal Donation Button

GitHub issues GitHub contributors

Adding to Your Project

Swift Package Manager is the recommended way to integrate LNExtensionExecutor in your project.

LNTouchVisualizer 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")
	executor.execute(withInputItems: payload, on: self, completionHandler: { completed, returnedItems, activityError in
		guard let activityError = activityError else {
			return
		}
		
		print("Got error: \(activityError.localizedDescription)")
	})
} catch(let error) {
	print(error.localizedDescription)
}

Description

  • Swift Tools 5.1.0
View More Packages from this Author

Dependencies

  • None
Last updated: Wed Sep 15 2021 07:36:35 GMT-0500 (GMT-05:00)