Git Product home page Git Product logo

quickactions's Issues

Somehow not working to me. Anyone works?

I ran into one problem and couldn't figure it out what happened. I followed the instructions in the README and also checked the example code, however in performActionForShortcutItem function

func application(application: UIApplication, performActionForShortcutItem shortcutItem:     UIApplicationShortcutItem, completionHandler: Bool -> Void) {
        guard let quickActions = quickActions else { return completionHandler(false) }
        guard let rootViewController = window?.rootViewController else { return completionHandler(false) }
        completionHandler(quickActions.handle(rootViewController, shortcutItem: shortcutItem))
}

This line always return false

quickActions.handle(rootViewController, shortcutItem: shortcutItem)

I don't know if it is because I set something wrong or it is because of the library.

Installation

Hello Ricardo,

Thanks for this module . I was looking forward an easier solution of implementing Quick Actions with my app. However, I ran into some installation issues. Module is installed correctly and recognised with "import" statement at the beginning of my AppDelegate, but then there are some problems:

Use of undeclared type 'ShortcutType'
Cannot specialize non-generic type 'module<QuickActions>'

Truth be told I'm just following the steps you outlined in the readme file. At this point I'm just guessing which part goes where in my app. Could you please provide and example application for everyone to use as kickstart ?

Implement custom icon

I'm currently implementing QuickActions with your framework. I want to set custom icons for the quick actions but I don't really know how exactly. In your source there's the following line:

if self == .custom {
            NSException(name: NSExceptionName(rawValue: "Invalid option"), reason: "`Custom` type need to be used with `toApplicationShortcutIcon:imageName`", userInfo: nil).raise()
            return nil
        }

To build the shortcuts my code looks like in your example:

let shortcuts = [
            Shortcut(
                type: AppShortcut.createExpense,
                title: NSLocalizedString("CreateExpenseTitle", comment: ""),
                subtitle: NSLocalizedString("CreateExpenseSubTitle", comment: ""),
                icon: .add
            )
        ]

There's this function:

func toApplicationShortcutIcon(_ imageName: String) -> UIApplicationShortcutIcon?

But I don't really know how to call this function or is there another way? Can someone give me an advice how to implement a custom icon?

Swift 3 compatibility

Hey, I'd love to see this lib available in Swift 3 so I can implement it in my project.

Thanks ๐Ÿ˜„

Manual Installation

CocoaPods and Carthage are awesome tools and make our life really easier, but there are some devs who still don't know how to use them.

It would be cool to add the Manual installation guide in your README.md. You can take a look at my iOS Readme Template to see how you can do it.

Support for Swift 4.2 and newer

The new Xcode version force me to update my project to a newer Swift version than 4.0. Now this pod is outdated. I'd really appreciate an update :).

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.