Latest 0.1.6
Homepage https://github.com/nulab/NLBURLAction
License MIT
Platforms ios 4.3, requires ARC
Authors

NLBURLAction is a library to open custom scheme URLs easily. It can convert URL to custom scheme URL.

Screenshot

Used in Production

Requirements

  • iOS 4.3 or later
  • ARC

Usage

Instance NLBURLAction and register classes following NLBURLActionProtocol.

NSURL *url = [NSURL URLWithString:@"https://twitter.com/agata/status/451892810430439424"];
NLBURLAction *urlAction = [[NLBURLAction alloc] initWithActionClasses:@[[NLBBacklogURLAction class], [NLBTwitterURLAction class], [NLBTweetbotURLAction class]]];
NSArray *actions = [urlAction arrayURLActionsWithURL:url];

NSLog(@"count=%d", actions.count); // 2
NSLog(@"actions[0]=%@", actions[0]); // NLBTwitterURLAction
NSLog(@"actions[1]=%@", actions[1]); // NLBTweetbotURLAction

NSObject<NLBURLActionProtocol> *action = (NSObject<NLBURLActionProtocol> *)actions[0];
[action doActionURL:url]; // open Tweeter app with URL

Supported Action

Open in app

Other actions

Install

CocoaPods

pod 'NLBURLAction'

License

MIT license.

Latest podspec

{
    "name": "NLBURLAction",
    "version": "0.1.6",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "summary": "NLBURLAction is a library to open custom scheme URLs easily. It can convert URL to custom scheme URL.",
    "homepage": "https://github.com/nulab/NLBURLAction",
    "authors": {
        "agata": "[email protected]"
    },
    "source": {
        "git": "https://github.com/nulab/NLBURLAction.git",
        "tag": "v0.1.6"
    },
    "platforms": {
        "ios": "4.3"
    },
    "source_files": "NLBURLAction",
    "requires_arc": true
}

Pin It on Pinterest

Share This