Add deep link support to an iOS app so tapping a link opens a specific screen with the right user or content ID.
Organize URL routing by scheme to handle multiple custom URL types registered by the same app.
Use wildcard and optional path components to match flexible URL patterns without writing manual parsing code.
JLRoutes is a library for iOS and macOS apps that makes it straightforward to handle incoming URLs and decide what to do with them. This is especially useful for deep linking, where tapping a link in another app or a web page opens your own app and navigates directly to a specific screen. Without a routing library, developers have to write repetitive code that inspects every incoming URL character by character. JLRoutes lets them declare patterns instead. The core idea is that you register a URL pattern like /user/view/:userID and attach a block of code to it. The colon before userID marks it as a variable placeholder. When a URL matching that pattern arrives, JLRoutes extracts the variable parts and hands them to your block in a dictionary, so your code receives something like {"userID": "joeldev"} and can act on it directly. Query string parameters from the URL are also included in that dictionary automatically. The library supports organizing routes by scheme. A scheme in this context is the prefix before the colon in a URL, like myapp in myapp://user/view/joeldev. You can define separate sets of routes for different schemes, which is useful when an app registers multiple custom URL types. You can also allow a scheme's routes to fall back to the global set if no specific match is found. Other features documented in the README include wildcard route segments that match any number of path components, optional path components surrounded by parentheses, and verbose logging to help trace which routes are being matched during development. Handler blocks return a true or false value: returning false tells JLRoutes the block did not handle this URL, causing it to keep searching for the next matching pattern. Installation is through CocoaPods or Carthage, the two most common iOS dependency managers. The library requires iOS 8.0 or later, or macOS 10.10 or later.
← joeldev on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.