Giter Site home page Giter Site logo

leonatan / lnextensionexecutor Goto Github PK

View Code? Open in Web Editor NEW
48.0 48.0 2.0 38 KB

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

License: MIT License

Objective-C 79.56% Swift 11.99% Shell 8.45%

lnextensionexecutor's Introduction

Hi there! 👋 My name is Léo and I am a software engineer from Ramat Gan, Israel

LeoNatan's github stats

lnextensionexecutor's People

Contributors

leonatan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

lnextensionexecutor's Issues

API usage

Thank you for sharing this amazing class, I want to ask is this class using any private APIs? Because I do want to use this in a production product.

SMS and Mail error with identifier not found

I used UIActivity.ActivityType.message and UIActivity.ActivityType.mail system identifier, but can not present share sheet (UIActivityViewController still work as normal).

Msg error:

error: Extension with identifier "com.apple.UIKit.activity.Message" not found 

Maybe a new code from Apple has an update about it?

Xcode 15.3
Swift 5
IOS 16+

Extension bundle identifier

Hello,

How do I know the extension bundle identifier for the apps I need to share content to? i.e. WhatsApp, FB Messenger, Telegram, etc.

Thanks

Sharing a video to WhatsApp

Hey,
I've been trying to share a video (mp4) to WhatsApp but with no luck.
Everything works great with an image (UIImage), but not a video.

I tried to pass the video in the inputItems as an AVAsset, URL, path, but with no lack.
here's my code:

do {
      let executor = try LNExtensionExecutor(extensionBundleIdentifier: "net.whatsapp.WhatsApp.ShareExtension")
      
      executor.execute(withInputItems: [AVAsset(url: VideoURL)], on: self, completionHandler: { completed, returnedItems, activityError in
          guard let activityError = activityError else {
              return
          }
          
          print("Got error: \(activityError.localizedDescription)")
      })
  } catch(let error) {
      print(error.localizedDescription)
  }

[QUESTION] Cannot share, terminating exception

Hello,

I'm exploring your method for sharing and struggled with some issues.
Here is my code:

LNExtensionExecutor *executor = [LNExtensionExecutor executorWithExtensionBundleIdentifier: @"net.whatsapp.WhatsApp.ShareExtension"];
NSString *shareText = @"foo";
NSArray *shareItems = @[shareText];
[executor executeWithInputItems:shareItems completionHandler:^(BOOL completed, NSArray * _Nullable returnedItems, NSError * _Nullable activityError) {
        NSLog(@"completed = %@", completed);
}];

When I calling this snippet, I see following exception:

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Unable to instantiate class named SLRemoteComposeViewController for host connection!'

I'll be very grateful for any help.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.