@kindly-ai/react-native 0.1.1 → 0.1.3

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.
@@ -64,5 +64,22 @@ Pod::Spec.new do |s|
64
64
 
65
65
  s.swift_version = "5.0"
66
66
 
67
+ # DEFINES_MODULE = YES tells Xcode to produce a proper clang module for
68
+ # this pod, which:
69
+ # - generates `KindlyReactNative-Swift.h` at the canonical module path
70
+ # (`<KindlyReactNative/KindlyReactNative-Swift.h>`) so our .mm's
71
+ # defensive `#if __has_include(<KindlyReactNative/...>)` import works
72
+ # - matches what React-Core.podspec and most well-behaved RN libs do
73
+ # (`s.pod_target_xcconfig "DEFINES_MODULE" => "YES"`)
74
+ #
75
+ # Without this, customer environments that pass `-fmodules` strictly,
76
+ # use `use_frameworks!`, or have non-standard pod build configurations
77
+ # may fail with `'KindlyReactNative-Swift.h' file not found` (reported
78
+ # by Scandic 2026-06 via Kevin Lärkfors). The defensive include guard
79
+ # in KindlyReactNative.mm is still kept as a second line of defence.
80
+ s.pod_target_xcconfig = {
81
+ "DEFINES_MODULE" => "YES"
82
+ }
83
+
67
84
  install_modules_dependencies(s)
68
85
  end
@@ -84,6 +84,26 @@ android {
84
84
 
85
85
  kotlinOptions {
86
86
  jvmTarget = "17"
87
+
88
+ // The bundled Kindly AAR (ai.kindly:sdk:1.0.x) is compiled with
89
+ // Kotlin 2.3.20 (lockstep with kindly-ai/sdk-chat-android-sources).
90
+ // Customer apps frequently still ship with an older Kotlin compiler
91
+ // (RN 0.85 ships 2.2.x by default; some apps stay on 2.1.x). When
92
+ // those compilers read the AAR's 2.3.0 metadata they bail with:
93
+ // "Module was compiled with an incompatible version of Kotlin.
94
+ // The binary version of its metadata is 2.3.0, expected version
95
+ // is 2.1.0."
96
+ // (reported by Scandic 2026-06 — `:kindly-ai_react-native:compileDebugKotlin FAILED`).
97
+ //
98
+ // -Xskip-metadata-version-check tells THIS module's compile step to
99
+ // ignore the version mismatch when reading dependencies. We don't
100
+ // re-expose any Kindly types in our public API surface (customer
101
+ // apps interact via TS/TurboModule, never directly importing
102
+ // `no.kindly.chatsdk.chat.*`), so the metadata in OUR compiled
103
+ // output is whatever the customer's compiler emits — fully
104
+ // forward-compatible with their app code. Customer needs no Kotlin
105
+ // bump on their side.
106
+ freeCompilerArgs += ["-Xskip-metadata-version-check"]
87
107
  }
88
108
 
89
109
  lint {
@@ -105,7 +125,7 @@ dependencies {
105
125
  // `scripts/bundle-native-sdks.yml` at bundle time to match the just-
106
126
  // released Android SDK version (`git describe --tags --abbrev=0` on
107
127
  // the public release repo).
108
- implementation "ai.kindly:sdk:1.0.120"
128
+ implementation "ai.kindly:sdk:1.0.127"
109
129
 
110
130
  // Required by the AuthTokenCallback bridge in KindlyReactNativeModule.kt
111
131
  // (`CompletableDeferred`, `runBlocking`, `withTimeoutOrNull`).
@@ -3,7 +3,7 @@
3
3
  <modelVersion>4.0.0</modelVersion>
4
4
  <groupId>ai.kindly</groupId>
5
5
  <artifactId>sdk</artifactId>
6
- <version>1.0.120</version>
6
+ <version>1.0.127</version>
7
7
  <packaging>aar</packaging>
8
8
  <name>Kindly SDK</name>
9
9
  <description>Kindly Chat SDK for Android — customer support chat widget</description>
@@ -29,7 +29,21 @@
29
29
 
30
30
  // Auto-generated header that exposes Swift classes to ObjC. Filename derives
31
31
  // from the pod name (KindlyReactNative.podspec → KindlyReactNative-Swift.h).
32
- #import "KindlyReactNative-Swift.h"
32
+ //
33
+ // Use the defensive `__has_include` pattern: try the module-qualified path
34
+ // first (which works when the pod is built as a clang module, with
35
+ // `DEFINES_MODULE = YES` set in the podspec — see Scandic 2026-06), then
36
+ // fall back to the local-path form. The bare `#import "Foo-Swift.h"` form
37
+ // the scaffold ships fails in customer environments that don't set up the
38
+ // header search paths exactly the way `create-react-native-library` expects
39
+ // (use_frameworks!, certain Xcode/CocoaPods version combos, etc.).
40
+ #if __has_include(<KindlyReactNative/KindlyReactNative-Swift.h>)
41
+ #import <KindlyReactNative/KindlyReactNative-Swift.h>
42
+ #elif __has_include("KindlyReactNative-Swift.h")
43
+ #import "KindlyReactNative-Swift.h"
44
+ #else
45
+ #error "KindlyReactNative-Swift.h not found. Ensure DEFINES_MODULE=YES is set in KindlyReactNative.podspec's pod_target_xcconfig and that pod install ran cleanly."
46
+ #endif
33
47
 
34
48
  // Protocol conformance is declared internally so it doesn't leak into the
35
49
  // public header (which Swift consumes via the module umbrella).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kindly-ai/react-native",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Kindly chat SDK for React Native",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",