A solution for iOS modules and components separation. You can route to viewController or perform native block with url.
Route.defaultCtx.register(LoginViewController.self, forPath: "test.com/login")
Handler.defaultCtx.register({ (input) in
print(input)
}, forPath: "test.com/showAlert?title=Hello World")
try? Route(path: "test.com/login")
.input(["stringValue": "This message came from a Route"])
.submit()
try? Route(path: "test.com/login")
.input(["stringValue": "This message came from a Route"])
.transition(SystemTransition(axis: .horizontal, style: .zoom(factor: 0.8)))
.submit()
try? Route(key: "test.com/login")
.input(["stringValue": "This message came from a Route"])
.config(.present([.fakePush, .wrapNC]))
.transition(SystemTransition(axis: .horizontal, style: .zoom(factor: 0.8)))
.submit()
- Present
- Push
- Switch
- Popup
- AsChild
try? Route(urlString: "Route://test.com/login?stringValue=This message came from a url string")
.submit()
CocoaPods is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries. You can install it with the following command:
$ gem install cocoapods
To integrate Intent into your Xcode project using CocoaPods, specify it in your Podfile
:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
pod 'Intent'
Then, run the following command:
$ pod install
(MIT license)