@entrig/react-native 0.0.1 → 1.0.0

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 (126) hide show
  1. package/EntrigReactNative.podspec +1 -1
  2. package/README.md +189 -49
  3. package/android/build/.transforms/013f3f34943d71cf3c3c03077862f6a9/results.bin +1 -0
  4. package/android/build/.transforms/013f3f34943d71cf3c3c03077862f6a9/transformed/classes/classes_dex/classes.dex +0 -0
  5. package/android/build/.transforms/5f66605f70bf074b50a819daac7d0e7c/results.bin +1 -0
  6. package/android/build/.transforms/5f66605f70bf074b50a819daac7d0e7c/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/entrig/reactnative/BuildConfig.dex +0 -0
  7. package/android/build/.transforms/5f66605f70bf074b50a819daac7d0e7c/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/entrig/reactnative/EntrigModule.dex +0 -0
  8. package/android/build/.transforms/5f66605f70bf074b50a819daac7d0e7c/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/entrig/reactnative/EntrigPackage.dex +0 -0
  9. package/android/build/.transforms/5f66605f70bf074b50a819daac7d0e7c/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
  10. package/android/build/.transforms/cab58e4d71b2af13d5609682128c7af7/results.bin +1 -0
  11. package/android/build/.transforms/cab58e4d71b2af13d5609682128c7af7/transformed/classes/classes_dex/classes.dex +0 -0
  12. package/android/build/generated/source/buildConfig/debug/com/entrig/reactnative/BuildConfig.java +10 -0
  13. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +11 -0
  14. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +18 -0
  15. package/android/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +6 -0
  16. package/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +1 -0
  17. package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
  18. package/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
  19. package/android/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +0 -0
  20. package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +1 -0
  21. package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +2 -0
  22. package/android/build/intermediates/incremental/mergeDebugAssets/merger.xml +2 -0
  23. package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +2 -0
  24. package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +2 -0
  25. package/android/build/intermediates/java_res/debug/processDebugJavaRes/out/META-INF/entrig_react-native_debug.kotlin_module +0 -0
  26. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/entrig/reactnative/BuildConfig.class +0 -0
  27. package/android/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +2 -0
  28. package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +17 -0
  29. package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +11 -0
  30. package/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +1 -0
  31. package/android/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +1 -0
  32. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/META-INF/entrig_react-native_debug.kotlin_module +0 -0
  33. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/entrig/reactnative/BuildConfig.class +0 -0
  34. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/entrig/reactnative/EntrigModule.class +0 -0
  35. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/entrig/reactnative/EntrigPackage.class +0 -0
  36. package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
  37. package/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +1 -0
  38. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
  39. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
  40. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
  41. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len +0 -0
  42. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
  43. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
  44. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len +0 -0
  45. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
  46. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
  47. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
  48. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
  49. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
  50. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
  51. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len +0 -0
  52. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
  53. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
  54. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
  55. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
  56. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
  57. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
  58. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len +0 -0
  59. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
  60. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
  61. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
  62. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
  63. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
  64. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
  65. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len +0 -0
  66. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
  67. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
  68. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
  69. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
  70. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
  71. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
  72. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len +0 -0
  73. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
  74. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
  75. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
  76. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
  77. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
  78. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
  79. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len +0 -0
  80. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
  81. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
  82. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
  83. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
  84. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
  85. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
  86. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len +0 -0
  87. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
  88. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
  89. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
  90. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
  91. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
  92. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
  93. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len +0 -0
  94. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +2 -0
  95. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
  96. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
  97. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
  98. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len +0 -0
  99. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
  100. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
  101. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len +0 -0
  102. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
  103. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
  104. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
  105. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
  106. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
  107. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
  108. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len +0 -0
  109. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
  110. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
  111. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
  112. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
  113. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
  114. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
  115. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len +0 -0
  116. package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
  117. package/android/build/kotlin/compileDebugKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin +0 -0
  118. package/android/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
  119. package/android/build/outputs/logs/manifest-merger-debug-report.txt +28 -0
  120. package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
  121. package/android/build/tmp/kotlin-classes/debug/META-INF/entrig_react-native_debug.kotlin_module +0 -0
  122. package/android/build/tmp/kotlin-classes/debug/com/entrig/reactnative/EntrigModule.class +0 -0
  123. package/android/build/tmp/kotlin-classes/debug/com/entrig/reactnative/EntrigPackage.class +0 -0
  124. package/android/build.gradle +1 -1
  125. package/package.json +1 -2
  126. package/plugin/withEntrig.js +38 -13
@@ -18,7 +18,7 @@ Pod::Spec.new do |s|
18
18
  s.static_framework = true
19
19
 
20
20
  s.dependency 'React-Core'
21
- s.dependency 'EntrigSDK', '0.0.8-dev'
21
+ s.dependency 'EntrigSDK', '1.0.0'
22
22
 
23
23
  # Swift/Objective-C compatibility
24
24
  s.pod_target_xcconfig = {
package/README.md CHANGED
@@ -50,7 +50,6 @@ Send push notifications to your React Native app, triggered by database events.
50
50
 
51
51
  </details>
52
52
 
53
- > **Note:** If you've configured iOS in your Firebase console, you can use FCM for both Android and iOS, which will skip the APNs setup step.
54
53
 
55
54
  4. **Upload APNs Key** (iOS) - Upload `.p8` key file with Team ID, Bundle ID, and Key ID to Entrig
56
55
 
@@ -105,30 +104,7 @@ No setup required for Android. We'll take care of it.
105
104
 
106
105
  ### iOS
107
106
 
108
- #### Expo (Managed Workflow)
109
-
110
- Add the plugin to your `app.json`:
111
-
112
- ```json
113
- {
114
- "expo": {
115
- "plugins": ["@entrig/react-native"]
116
- }
117
- }
118
- ```
119
-
120
- Then run prebuild:
121
-
122
- ```bash
123
- npx expo prebuild
124
- ```
125
-
126
- This automatically configures:
127
- - AppDelegate with Entrig notification handlers
128
- - Entitlements with push notification capabilities
129
- - Info.plist with background modes
130
-
131
- #### Bare React Native — Automatic Setup (Recommended)
107
+ #### React Native — Automatic Setup (Recommended)
132
108
 
133
109
  Run this command in your project root:
134
110
 
@@ -147,14 +123,14 @@ This automatically configures:
147
123
  <details>
148
124
  <summary>Manual AppDelegate setup (click to expand)</summary>
149
125
 
150
- #### 1. Enable Push Notifications in Xcode
126
+ ##### 1. Enable Push Notifications in Xcode
151
127
 
152
128
  - Open `ios/YourApp.xcworkspace`
153
129
  - Select your target → Signing & Capabilities
154
130
  - Click `+ Capability` → Push Notifications
155
131
  - Click `+ Capability` → Background Modes → Enable `Remote notifications`
156
132
 
157
- #### 2. Update AppDelegate.swift
133
+ ##### 2. Update AppDelegate.swift
158
134
 
159
135
  Add `import UserNotifications` and `import EntrigSDK`, add `UNUserNotificationCenterDelegate` conformance, then add the notification methods.
160
136
 
@@ -267,6 +243,192 @@ class AppDelegate: RCTAppDelegate, UNUserNotificationCenterDelegate {
267
243
 
268
244
  </details>
269
245
 
246
+
247
+ #### Expo (Managed Workflow)
248
+
249
+ **Step 1: Configure your bundle identifier**
250
+
251
+ Update your `app.json` with a proper bundle identifier (not the default Expo one):
252
+
253
+ ```json
254
+ {
255
+ "expo": {
256
+ "ios": {
257
+ "bundleIdentifier": "com.yourcompany.yourapp"
258
+ }
259
+ }
260
+ }
261
+ ```
262
+
263
+ > **Important:** Don't use Expo's auto-generated bundle IDs (like `com.anonymous.*`). Use your own reverse-domain identifier.
264
+
265
+ **Step 2: Add the config plugin**
266
+
267
+ Add the plugin to your `app.json`:
268
+
269
+ ```json
270
+ {
271
+ "expo": {
272
+ "plugins": ["@entrig/react-native"]
273
+ }
274
+ }
275
+ ```
276
+
277
+ **Step 3: Run prebuild**
278
+
279
+ ```bash
280
+ npx expo prebuild
281
+ # or run directly (prebuild happens automatically)
282
+ npx expo run:ios
283
+ npx expo run:android
284
+ ```
285
+
286
+ > **Note:** `npx expo run:ios` automatically runs `npx expo prebuild` if the `ios/` folder doesn't exist. The plugin runs during prebuild and configures everything automatically.
287
+
288
+ The plugin automatically configures:
289
+ - ✅ AppDelegate with Entrig notification handlers (supports Expo SDK 54+)
290
+ - ✅ Info.plist with background modes (`UIBackgroundModes: ["remote-notification"]`)
291
+ - ✅ Entitlements with push capabilities (`aps-environment: development`)
292
+
293
+ **Step 4: Enable Push Notifications in Apple Developer Portal**
294
+
295
+ 1. Go to [Apple Developer Portal](https://developer.apple.com/account/resources/identifiers/list)
296
+ 2. Select your Bundle ID (the one from your `app.json`)
297
+ 3. Enable "Push Notifications" capability
298
+ 4. Save
299
+
300
+ **Step 5: Select your development team in Xcode**
301
+
302
+ 1. Open `ios/YourApp.xcworkspace` in Xcode
303
+ 2. Select your project in the navigator
304
+ 3. Go to "Signing & Capabilities" tab
305
+ 4. Select your **Team** from the dropdown
306
+ 5. Xcode will automatically generate the provisioning profile with push notifications
307
+
308
+ > **Common error:** If you see "Your provisioning profile doesn't support Push Notifications", make sure you completed Step 4 and Step 5.
309
+
310
+ **Step 6: Verify configuration (Optional)**
311
+
312
+ After prebuild, verify the plugin worked correctly:
313
+
314
+ 1. **Check AppDelegate** (`ios/YourApp/AppDelegate.swift`):
315
+ - Should have `import EntrigSDK` and `import UserNotifications`
316
+ - Should have `UNUserNotificationCenterDelegate` conformance
317
+ - Should have Entrig notification methods
318
+
319
+ 2. **Check Info.plist** (`ios/YourApp/Info.plist`):
320
+ ```xml
321
+ <key>UIBackgroundModes</key>
322
+ <array>
323
+ <string>remote-notification</string>
324
+ </array>
325
+ ```
326
+
327
+ 3. **Check Entitlements** (`ios/YourApp/YourApp.entitlements`):
328
+ ```xml
329
+ <key>aps-environment</key>
330
+ <string>development</string>
331
+ ```
332
+
333
+ <details>
334
+ <summary><b>If the plugin didn't work (manual setup)</b></summary>
335
+
336
+ If any of the above are missing after prebuild, add them manually:
337
+
338
+ **1. Update AppDelegate.swift**
339
+
340
+ Add imports at the top:
341
+ ```swift
342
+ import UserNotifications
343
+ import EntrigSDK
344
+ ```
345
+
346
+ Add `UNUserNotificationCenterDelegate` to class declaration:
347
+ ```swift
348
+ public class AppDelegate: ExpoAppDelegate, UNUserNotificationCenterDelegate {
349
+ ```
350
+
351
+ Add setup in `didFinishLaunchingWithOptions` (right after the function opens):
352
+ ```swift
353
+ public override func application(
354
+ _ application: UIApplication,
355
+ didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil
356
+ ) -> Bool {
357
+ // Entrig: Setup push notification handling
358
+ UNUserNotificationCenter.current().delegate = self
359
+ Entrig.checkLaunchNotification(launchOptions)
360
+
361
+ // ... rest of existing code
362
+ }
363
+ ```
364
+
365
+ Add notification methods before the closing brace `}` of AppDelegate:
366
+ ```swift
367
+ // MARK: - Entrig Push Notification Handling
368
+
369
+ public override func application(
370
+ _ application: UIApplication,
371
+ didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data
372
+ ) {
373
+ Entrig.didRegisterForRemoteNotifications(deviceToken: deviceToken)
374
+ super.application(application, didRegisterForRemoteNotificationsWithDeviceToken: deviceToken)
375
+ }
376
+
377
+ public override func application(
378
+ _ application: UIApplication,
379
+ didFailToRegisterForRemoteNotificationsWithError error: Error
380
+ ) {
381
+ Entrig.didFailToRegisterForRemoteNotifications(error: error)
382
+ super.application(application, didFailToRegisterForRemoteNotificationsWithError: error)
383
+ }
384
+
385
+ public func userNotificationCenter(
386
+ _ center: UNUserNotificationCenter,
387
+ willPresent notification: UNNotification,
388
+ withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void
389
+ ) {
390
+ Entrig.willPresentNotification(notification)
391
+ completionHandler(Entrig.getPresentationOptions())
392
+ }
393
+
394
+ public func userNotificationCenter(
395
+ _ center: UNUserNotificationCenter,
396
+ didReceive response: UNNotificationResponse,
397
+ withCompletionHandler completionHandler: @escaping () -> Void
398
+ ) {
399
+ Entrig.didReceiveNotification(response)
400
+ completionHandler()
401
+ }
402
+ ```
403
+
404
+ **2. Update Info.plist** (`ios/YourApp/Info.plist`)
405
+
406
+ Add this before the closing `</dict>` tag:
407
+ ```xml
408
+ <key>UIBackgroundModes</key>
409
+ <array>
410
+ <string>remote-notification</string>
411
+ </array>
412
+ ```
413
+
414
+ **3. Update Entitlements** (`ios/YourApp/YourApp.entitlements`)
415
+
416
+ Replace the contents with:
417
+ ```xml
418
+ <?xml version="1.0" encoding="UTF-8"?>
419
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
420
+ <plist version="1.0">
421
+ <dict>
422
+ <key>aps-environment</key>
423
+ <string>development</string>
424
+ </dict>
425
+ </plist>
426
+ ```
427
+
428
+ > **Note:** Change `development` to `production` for App Store releases.
429
+
430
+ </details>
431
+
270
432
  ---
271
433
 
272
434
  ## Troubleshooting
@@ -306,28 +468,6 @@ Then rebuild. Also ensure:
306
468
 
307
469
  </details>
308
470
 
309
- <details>
310
- <summary>Cannot read Config / env variables undefined</summary>
311
-
312
- `react-native-config` requires native setup on both platforms. The simplest alternative is [`react-native-dotenv`](https://github.com/goatandsheep/react-native-dotenv) (a Babel plugin — no native setup needed):
313
-
314
- ```bash
315
- npm install react-native-dotenv
316
- ```
317
-
318
- Add to `babel.config.js`:
319
- ```js
320
- module.exports = {
321
- plugins: [['module:react-native-dotenv']]
322
- };
323
- ```
324
-
325
- Then import:
326
- ```ts
327
- import { ENTRIG_API_KEY } from '@env';
328
- ```
329
-
330
- </details>
331
471
 
332
472
  <details>
333
473
  <summary>pod install CocoaPods dependency errors</summary>
@@ -0,0 +1 @@
1
+ o/bundleLibRuntimeToDirDebug
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Automatically generated file. DO NOT MODIFY
3
+ */
4
+ package com.entrig.reactnative;
5
+
6
+ public final class BuildConfig {
7
+ public static final boolean DEBUG = Boolean.parseBoolean("true");
8
+ public static final String LIBRARY_PACKAGE_NAME = "com.entrig.reactnative";
9
+ public static final String BUILD_TYPE = "debug";
10
+ }
@@ -0,0 +1,11 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android"
3
+ package="com.entrig.reactnative" >
4
+
5
+ <uses-sdk android:minSdkVersion="24" />
6
+ <!-- Permissions for push notifications -->
7
+ <uses-permission android:name="android.permission.INTERNET" />
8
+ <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
9
+ <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
10
+
11
+ </manifest>
@@ -0,0 +1,18 @@
1
+ {
2
+ "version": 3,
3
+ "artifactType": {
4
+ "type": "AAPT_FRIENDLY_MERGED_MANIFESTS",
5
+ "kind": "Directory"
6
+ },
7
+ "applicationId": "com.entrig.reactnative",
8
+ "variantName": "debug",
9
+ "elements": [
10
+ {
11
+ "type": "SINGLE",
12
+ "filters": [],
13
+ "attributes": [],
14
+ "outputFile": "AndroidManifest.xml"
15
+ }
16
+ ],
17
+ "elementType": "File"
18
+ }
@@ -0,0 +1,6 @@
1
+ aarFormatVersion=1.0
2
+ aarMetadataVersion=1.0
3
+ minCompileSdk=1
4
+ minCompileSdkExtension=0
5
+ minAndroidGradlePluginVersion=1.0.0
6
+ coreLibraryDesugaringEnabled=false
@@ -0,0 +1,2 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <merger version="3"><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="main$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Volumes/Dev/entrig-project/entrig_packages/entrig-react-native/example/node_modules/@entrig/react-native/android/src/main/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="main" generated-set="main$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Volumes/Dev/entrig-project/entrig_packages/entrig-react-native/example/node_modules/@entrig/react-native/android/src/main/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="debug$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Volumes/Dev/entrig-project/entrig_packages/entrig-react-native/example/node_modules/@entrig/react-native/android/src/debug/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="debug" generated-set="debug$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Volumes/Dev/entrig-project/entrig_packages/entrig-react-native/example/node_modules/@entrig/react-native/android/src/debug/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="generated$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Volumes/Dev/entrig-project/entrig_packages/entrig-react-native/example/node_modules/@entrig/react-native/android/build/generated/res/resValues/debug"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="generated" generated-set="generated$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Volumes/Dev/entrig-project/entrig_packages/entrig-react-native/example/node_modules/@entrig/react-native/android/build/generated/res/resValues/debug"/></dataSet><mergedItems/></merger>
@@ -0,0 +1,2 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Volumes/Dev/entrig-project/entrig_packages/entrig-react-native/android/src/main/assets"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Volumes/Dev/entrig-project/entrig_packages/entrig-react-native/android/src/debug/assets"/></dataSet><dataSet config="generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Volumes/Dev/entrig-project/entrig_packages/entrig-react-native/android/build/intermediates/shader_assets/debug/compileDebugShaders/out"/></dataSet></merger>
@@ -0,0 +1,2 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Volumes/Dev/entrig-project/entrig_packages/entrig-react-native/android/src/main/jniLibs"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Volumes/Dev/entrig-project/entrig_packages/entrig-react-native/android/src/debug/jniLibs"/></dataSet></merger>
@@ -0,0 +1,2 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Volumes/Dev/entrig-project/entrig_packages/entrig-react-native/android/src/main/shaders"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Volumes/Dev/entrig-project/entrig_packages/entrig-react-native/android/src/debug/shaders"/></dataSet></merger>
@@ -0,0 +1,2 @@
1
+ R_DEF: Internal format may change without notice
2
+ local
@@ -0,0 +1,17 @@
1
+ 1<?xml version="1.0" encoding="utf-8"?>
2
+ 2<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3
+ 3 package="com.entrig.reactnative" >
4
+ 4
5
+ 5 <uses-sdk android:minSdkVersion="24" />
6
+ 6 <!-- Permissions for push notifications -->
7
+ 7 <uses-permission android:name="android.permission.INTERNET" />
8
+ 7-->/Volumes/Dev/entrig-project/entrig_packages/entrig-react-native/example/node_modules/@entrig/react-native/android/src/main/AndroidManifest.xml:4:3-65
9
+ 7-->/Volumes/Dev/entrig-project/entrig_packages/entrig-react-native/example/node_modules/@entrig/react-native/android/src/main/AndroidManifest.xml:4:20-62
10
+ 8 <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
11
+ 8-->/Volumes/Dev/entrig-project/entrig_packages/entrig-react-native/example/node_modules/@entrig/react-native/android/src/main/AndroidManifest.xml:5:3-77
12
+ 8-->/Volumes/Dev/entrig-project/entrig_packages/entrig-react-native/example/node_modules/@entrig/react-native/android/src/main/AndroidManifest.xml:5:20-74
13
+ 9 <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
14
+ 9-->/Volumes/Dev/entrig-project/entrig_packages/entrig-react-native/example/node_modules/@entrig/react-native/android/src/main/AndroidManifest.xml:6:3-75
15
+ 9-->/Volumes/Dev/entrig-project/entrig_packages/entrig-react-native/example/node_modules/@entrig/react-native/android/src/main/AndroidManifest.xml:6:20-72
16
+ 10
17
+ 11</manifest>
@@ -0,0 +1,11 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android"
3
+ package="com.entrig.reactnative" >
4
+
5
+ <uses-sdk android:minSdkVersion="24" />
6
+ <!-- Permissions for push notifications -->
7
+ <uses-permission android:name="android.permission.INTERNET" />
8
+ <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
9
+ <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
10
+
11
+ </manifest>
@@ -0,0 +1,28 @@
1
+ -- Merging decision tree log ---
2
+ manifest
3
+ ADDED from /Volumes/Dev/entrig-project/entrig_packages/entrig-react-native/example/node_modules/@entrig/react-native/android/src/main/AndroidManifest.xml:2:1-7:12
4
+ INJECTED from /Volumes/Dev/entrig-project/entrig_packages/entrig-react-native/example/node_modules/@entrig/react-native/android/src/main/AndroidManifest.xml:2:1-7:12
5
+ package
6
+ INJECTED from /Volumes/Dev/entrig-project/entrig_packages/entrig-react-native/example/node_modules/@entrig/react-native/android/src/main/AndroidManifest.xml
7
+ xmlns:android
8
+ ADDED from /Volumes/Dev/entrig-project/entrig_packages/entrig-react-native/example/node_modules/@entrig/react-native/android/src/main/AndroidManifest.xml:2:11-69
9
+ uses-permission#android.permission.INTERNET
10
+ ADDED from /Volumes/Dev/entrig-project/entrig_packages/entrig-react-native/example/node_modules/@entrig/react-native/android/src/main/AndroidManifest.xml:4:3-65
11
+ android:name
12
+ ADDED from /Volumes/Dev/entrig-project/entrig_packages/entrig-react-native/example/node_modules/@entrig/react-native/android/src/main/AndroidManifest.xml:4:20-62
13
+ uses-permission#android.permission.ACCESS_NETWORK_STATE
14
+ ADDED from /Volumes/Dev/entrig-project/entrig_packages/entrig-react-native/example/node_modules/@entrig/react-native/android/src/main/AndroidManifest.xml:5:3-77
15
+ android:name
16
+ ADDED from /Volumes/Dev/entrig-project/entrig_packages/entrig-react-native/example/node_modules/@entrig/react-native/android/src/main/AndroidManifest.xml:5:20-74
17
+ uses-permission#android.permission.POST_NOTIFICATIONS
18
+ ADDED from /Volumes/Dev/entrig-project/entrig_packages/entrig-react-native/example/node_modules/@entrig/react-native/android/src/main/AndroidManifest.xml:6:3-75
19
+ android:name
20
+ ADDED from /Volumes/Dev/entrig-project/entrig_packages/entrig-react-native/example/node_modules/@entrig/react-native/android/src/main/AndroidManifest.xml:6:20-72
21
+ uses-sdk
22
+ INJECTED from /Volumes/Dev/entrig-project/entrig_packages/entrig-react-native/example/node_modules/@entrig/react-native/android/src/main/AndroidManifest.xml reason: use-sdk injection requested
23
+ INJECTED from /Volumes/Dev/entrig-project/entrig_packages/entrig-react-native/example/node_modules/@entrig/react-native/android/src/main/AndroidManifest.xml
24
+ INJECTED from /Volumes/Dev/entrig-project/entrig_packages/entrig-react-native/example/node_modules/@entrig/react-native/android/src/main/AndroidManifest.xml
25
+ android:targetSdkVersion
26
+ INJECTED from /Volumes/Dev/entrig-project/entrig_packages/entrig-react-native/example/node_modules/@entrig/react-native/android/src/main/AndroidManifest.xml
27
+ android:minSdkVersion
28
+ INJECTED from /Volumes/Dev/entrig-project/entrig_packages/entrig-react-native/example/node_modules/@entrig/react-native/android/src/main/AndroidManifest.xml
@@ -38,7 +38,7 @@ dependencies {
38
38
  implementation "com.facebook.react:react-native:+"
39
39
 
40
40
  // Entrig SDK from Maven Central
41
- api 'com.entrig:entrig:0.0.10-dev'
41
+ api 'com.entrig:entrig:1.0.0'
42
42
 
43
43
  // AndroidX
44
44
  implementation "androidx.core:core:1.8.0"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@entrig/react-native",
3
- "version": "0.0.1",
3
+ "version": "1.0.0",
4
4
  "description": "Entrig | Push Notifications for Supabase",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -45,7 +45,6 @@
45
45
  "license": "MIT",
46
46
  "homepage": "https://github.com/entrig/entrig-react-native#readme",
47
47
  "devDependencies": {
48
- "@expo/config-plugins": "^54.0.4",
49
48
  "@types/react": "^19.0.0",
50
49
  "typescript": "^5.0.0"
51
50
  },
@@ -88,6 +88,9 @@ function patchSwiftAppDelegate(filePath) {
88
88
  return;
89
89
  }
90
90
 
91
+ // Detect if this is an Expo SDK 54+ AppDelegate (inherits from ExpoAppDelegate)
92
+ const isExpoSDK54 = content.includes('ExpoAppDelegate');
93
+
91
94
  // 1. Add imports
92
95
  if (!content.includes('import UserNotifications')) {
93
96
  const importMatch = content.match(/^import \w+/m);
@@ -111,7 +114,11 @@ function patchSwiftAppDelegate(filePath) {
111
114
 
112
115
  // 2. Add UNUserNotificationCenterDelegate conformance to the class
113
116
  if (!content.includes('UNUserNotificationCenterDelegate')) {
114
- const classPattern = /(class\s+AppDelegate\s*:\s*[^{]+)\{/;
117
+ // For Expo SDK 54+, match pattern like: public class AppDelegate: ExpoAppDelegate {
118
+ // For older RN/Expo, match pattern like: class AppDelegate: UIResponder, UIApplicationDelegate {
119
+ const classPattern = isExpoSDK54
120
+ ? /(public\s+class\s+AppDelegate\s*:\s*ExpoAppDelegate)\s*\{/
121
+ : /(class\s+AppDelegate\s*:\s*[^{]+)\{/;
115
122
  const classMatch = content.match(classPattern);
116
123
  if (classMatch) {
117
124
  const declaration = classMatch[1].trimEnd();
@@ -124,9 +131,17 @@ function patchSwiftAppDelegate(filePath) {
124
131
 
125
132
  // 3. Add setup code inside didFinishLaunchingWithOptions
126
133
  if (!content.includes('Entrig.checkLaunchNotification')) {
134
+ // Pattern matches both old and new Expo formats (with/without override keyword and multiline)
127
135
  const didFinishPattern =
128
- /func application\(\s*_\s+application:\s*UIApplication,\s*didFinishLaunchingWithOptions\s+launchOptions:[^)]*\)\s*->\s*Bool\s*\{/s;
129
- const didFinishMatch = content.match(didFinishPattern);
136
+ /(public\s+)?override\s+func\s+application\(\s*_\s+application:\s*UIApplication,\s*didFinishLaunchingWithOptions\s+launchOptions:[^)]*\)\s*->\s*Bool\s*\{/s;
137
+ let didFinishMatch = content.match(didFinishPattern);
138
+
139
+ // Fallback for older format without override
140
+ if (!didFinishMatch) {
141
+ didFinishMatch = content.match(
142
+ /func\s+application\(\s*_\s+application:\s*UIApplication,\s*didFinishLaunchingWithOptions\s+launchOptions:[^)]*\)\s*->\s*Bool\s*\{/s
143
+ );
144
+ }
130
145
 
131
146
  if (didFinishMatch) {
132
147
  const insertPos = didFinishMatch.index + didFinishMatch[0].length;
@@ -141,31 +156,41 @@ function patchSwiftAppDelegate(filePath) {
141
156
 
142
157
  // 4. Add delegate methods before the closing brace of the AppDelegate class
143
158
  if (!content.includes('didRegisterForRemoteNotificationsWithDeviceToken')) {
159
+ // Use 'public' keyword for Expo SDK 54+
160
+ const publicKeyword = isExpoSDK54 ? 'public ' : '';
144
161
  const delegateMethods = `
145
162
  // MARK: - Entrig Push Notification Handling
146
163
 
147
- override func application(_ application: UIApplication,
148
- didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
164
+ ${publicKeyword}override func application(
165
+ _ application: UIApplication,
166
+ didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data
167
+ ) {
149
168
  Entrig.didRegisterForRemoteNotifications(deviceToken: deviceToken)
150
169
  super.application(application, didRegisterForRemoteNotificationsWithDeviceToken: deviceToken)
151
170
  }
152
171
 
153
- override func application(_ application: UIApplication,
154
- didFailToRegisterForRemoteNotificationsWithError error: Error) {
172
+ ${publicKeyword}override func application(
173
+ _ application: UIApplication,
174
+ didFailToRegisterForRemoteNotificationsWithError error: Error
175
+ ) {
155
176
  Entrig.didFailToRegisterForRemoteNotifications(error: error)
156
177
  super.application(application, didFailToRegisterForRemoteNotificationsWithError: error)
157
178
  }
158
179
 
159
- func userNotificationCenter(_ center: UNUserNotificationCenter,
160
- willPresent notification: UNNotification,
161
- withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) {
180
+ ${publicKeyword}func userNotificationCenter(
181
+ _ center: UNUserNotificationCenter,
182
+ willPresent notification: UNNotification,
183
+ withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void
184
+ ) {
162
185
  Entrig.willPresentNotification(notification)
163
186
  completionHandler(Entrig.getPresentationOptions())
164
187
  }
165
188
 
166
- func userNotificationCenter(_ center: UNUserNotificationCenter,
167
- didReceive response: UNNotificationResponse,
168
- withCompletionHandler completionHandler: @escaping () -> Void) {
189
+ ${publicKeyword}func userNotificationCenter(
190
+ _ center: UNUserNotificationCenter,
191
+ didReceive response: UNNotificationResponse,
192
+ withCompletionHandler completionHandler: @escaping () -> Void
193
+ ) {
169
194
  Entrig.didReceiveNotification(response)
170
195
  completionHandler()
171
196
  }