@doordeck/headless-react-native-sdk 1.0.7 → 1.0.8

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.
@@ -17,15 +17,17 @@ Pod::Spec.new do |s|
17
17
  s.private_header_files = "ios/**/*.h"
18
18
  s.preserve_paths = "ios/**/*.{h,m,mm,swift}"
19
19
 
20
- # The native Doordeck SDK is distributed as a Swift Package (a binary xcframework),
21
- # not as a CocoaPods pod. Wire it in via React Native's built-in SPM support
22
- # (spm_dependency, available on RN >= 0.76). The SPM product/module is "DoordeckSDK",
23
- # so `import DoordeckSDK` in the Swift bridge continues to work unchanged.
24
- spm_dependency(s,
25
- url: 'https://github.com/doordeck/doordeck-headless-sdk-spm.git',
26
- requirement: { kind: 'exactVersion', version: '1.128.0' },
27
- products: ['DoordeckSDK']
28
- )
20
+ # The native Doordeck SDK (a binary xcframework) is consumed as a CocoaPods
21
+ # dependency rather than via RN's spm_dependency. CocoaPods both LINKS and
22
+ # EMBEDS vendored dynamic frameworks in every linkage mode (static libraries,
23
+ # `use_frameworks! :linkage => :static` and `:dynamic`), whereas spm_dependency
24
+ # only links — consumers crashed at launch with "dyld: Library not loaded:
25
+ # @rpath/DoordeckSDK.framework/DoordeckSDK" unless they hand-rolled an embed
26
+ # build phase, and static linkage was unsupported by RN's SPM integration.
27
+ # Version mapping: pod 0.185.0 ships the same xcframework the previous SPM pin
28
+ # (doordeck-headless-sdk-spm v1.128.0) pointed at. The module is still
29
+ # "DoordeckSDK", so `import DoordeckSDK` in the Swift bridge is unchanged.
30
+ s.dependency "DoordeckSDK", "0.185.0"
29
31
 
30
32
  # Install all React Native dependencies (React-Core, RCT-Folly, RCTRequired,
31
33
  # RCTTypeSafety, ReactCommon, codegen, New Architecture flags, etc.) via the
package/README.md CHANGED
@@ -16,6 +16,15 @@ or using yarn:
16
16
  yarn add @doordeck/headless-react-native-sdk
17
17
  ```
18
18
 
19
+ ### iOS
20
+ After installing the package, install the pods:
21
+
22
+ ```sh
23
+ cd ios && pod install
24
+ ```
25
+
26
+ The native Doordeck SDK is pulled in automatically as a CocoaPods dependency (`DoordeckSDK`, a dynamic xcframework) and embedded into your app by CocoaPods — no extra Podfile configuration or build phases are required. The SDK works with the default static-library linkage as well as with `use_frameworks!` (both `:static` and `:dynamic`).
27
+
19
28
  ## Usage
20
29
 
21
30
  ### Importing the SDK
@@ -1,5 +1,13 @@
1
1
  #import "HeadlessReactNativeSdk.h"
2
+
3
+ // The Swift-generated interop header lives at different paths depending on how
4
+ // the pod is built: quoted for static libraries (the default), framework-style
5
+ // under `use_frameworks!`.
6
+ #if __has_include("HeadlessReactNativeSdk-Swift.h")
2
7
  #import "HeadlessReactNativeSdk-Swift.h"
8
+ #else
9
+ #import <HeadlessReactNativeSdk/HeadlessReactNativeSdk-Swift.h>
10
+ #endif
3
11
 
4
12
  @implementation HeadlessReactNativeSdk {
5
13
  HeadlessReactNativeSdkImpl *moduleSdk;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doordeck/headless-react-native-sdk",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "Doordeck React Native headless SDK",
5
5
  "source": "./src/index.tsx",
6
6
  "main": "./lib/commonjs/index.js",