@rajeev02/deeplink 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +28 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -16,6 +16,34 @@ Part of [Rajeev SDK](https://github.com/Rajeev02/rajeev-sdk) — cross-platform
16
16
  - **Universal + App links** — Generate both `myapp://` scheme links and `https://` universal links
17
17
  - **Pure TypeScript** — No native link handling dependency. Plug into React Navigation or any router.
18
18
 
19
+ ## ⚠️ Important: Native Deep Link Setup Required
20
+
21
+ This library provides the **URL routing and matching engine** — it parses incoming URLs, matches them to registered routes, and extracts parameters. But to actually **receive** deep links in your app, you need native configuration:
22
+
23
+ **Custom URL Scheme (`myapp://`):**
24
+
25
+ - **iOS:** Register your URL scheme in Xcode → Info → URL Types
26
+ - **Android:** Add intent filters for your scheme in `AndroidManifest.xml`
27
+
28
+ **Universal Links / App Links (`https://yourdomain.com/...`):**
29
+
30
+ - **iOS:** Add Associated Domains capability (`applinks:yourdomain.com`) and host an `apple-app-site-association` file on your domain
31
+ - **Android:** Host a `.well-known/assetlinks.json` file on your domain + add intent filters
32
+
33
+ **React Native integration:**
34
+
35
+ ```typescript
36
+ import { Linking } from "react-native";
37
+ import { DeepLinkRouter } from "@rajeev02/deeplink";
38
+
39
+ // Feed incoming URLs to the router
40
+ Linking.addEventListener("url", ({ url }) => router.handle(url));
41
+
42
+ // Handle cold start
43
+ const initialUrl = await Linking.getInitialURL();
44
+ if (initialUrl) router.handle(initialUrl);
45
+ ```
46
+
19
47
  ## Platform Support
20
48
 
21
49
  | Platform | Engine | Status |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rajeev02/deeplink",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Universal deep linking — app links, universal links, deferred deep links, route matching, attribution",
5
5
  "main": "lib/index.js",
6
6
  "author": "Rajeev Kumar Joshi <rajeevjoshi91@gmail.com> (https://rajeev02.github.io)",