CocoaPods trunk is moving to be read-only. Read more on the blog, there are 11 months to go.

JWIntent 1.0.2

JWIntent 1.0.2

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Nov 2017

Maintained by JerryWong.



JWIntent 1.0.2

  • By
  • Jerry Wong

A solution for iOS modules and components separation. You can route to viewController or perform native block with url.

Features

You can register LoginViewController by the following

[JWIntentContext registerRouterClass:"LoginViewController"
                              forKey:@"login"];

You can register Block by the following

[JWIntentContext registerHandler:^(NSDictionary *param) {
    NSLog(@"%@", param[@"message"]);
} 
                         forKey:@"testAlert"];

You can route to LoginViewController by router key

JWRouter *intent = [[JWRouter alloc] initWithSource:self
                                          routerKey:@"login"];
[intent submit];

Or you can route to LoginViewController by remote URL

JWIntent *intent = [JWIntent intentWithURLString:@"router://login?extraData={\"username\":\"jerry\"}" 
                                         context:nil];
[intent submit];

Or you can perform block by remote URL

JWIntent *intent = [JWIntent intentWithURLString:@"handler://testAlert?extraData={\"title\":\"Hello Alert\",\"message\":\"I have a message for you.\"}" 
                                         context:nil];
[intent submit];

Podfile

To integrate JWIntent into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '7.0'

pod 'JWIntent'

Then, run the following command:

$ pod install

License

(MIT license)