Skip to content

Add disableClient() and enableClient() bridges#70

Merged
tekinalper merged 1 commit intodevelopfrom
feature/disable-enable-client
Mar 10, 2026
Merged

Add disableClient() and enableClient() bridges#70
tekinalper merged 1 commit intodevelopfrom
feature/disable-enable-client

Conversation

@tekinalper
Copy link
Copy Markdown
Collaborator

@tekinalper tekinalper commented Mar 10, 2026

What it does

Bridges the native SDK's disableClient() and enableClient() methods to React Native, allowing JS consumers to programmatically disable and re-enable the Refiner SDK client.

Changes across 8 files:

  • Android Legacy bridge (RNRefinerModule.kt) — 2 new @ReactMethod functions
  • Android TurboModule bridge (RNRefinerTurboModule.kt) — 2 new @ReactMethod override functions
  • iOS Swift bridge (RNRefiner.swift) — 2 new @objc functions
  • iOS Obj-C bridge (RNRefiner.m) — 2 new RCT_EXTERN_METHOD declarations
  • JS entry (index.js) — stub + wrapper methods
  • TypeScript types (index.d.ts) — type declarations in both interfaces
  • TurboModule spec (NativeRNRefiner.ts) — spec interface methods
  • New Arch protocol (RefinerReactNativeSpec.h) — protocol method declarations

How to test it

  1. Update native SDK dependencies to versions that include disableClient()/enableClient()
  2. In the sample app or a test app, call RNRefiner.disableClient()
  3. Verify surveys no longer load after disabling
  4. Call RNRefiner.enableClient()
  5. Verify surveys resume loading

Acceptance criteria

  • RNRefiner.disableClient() is callable from JS and forwards to native SDK
  • RNRefiner.enableClient() is callable from JS and forwards to native SDK
  • Both methods work on Android (Legacy + TurboModule) and iOS
  • TypeScript types are updated for both interfaces
  • No existing functionality is broken

Link to ticket

N/A

🤖 Generated with Claude Code

@tekinalper tekinalper changed the base branch from main to develop March 10, 2026 22:42
Bridge the native SDK's disableClient/enableClient methods to React Native,
allowing JS consumers to programmatically disable and re-enable the SDK.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@tekinalper tekinalper force-pushed the feature/disable-enable-client branch from 96c54a0 to 1b1ff86 Compare March 10, 2026 23:03
@tekinalper
Copy link
Copy Markdown
Collaborator Author

Reviewed & tested

@tekinalper tekinalper merged commit 4d0064a into develop Mar 10, 2026
2 checks passed
@tekinalper tekinalper deleted the feature/disable-enable-client branch March 10, 2026 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant