Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,37 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [7.6.2](https://github.com/smallcase/react-native-smallcase-gateway/compare/v7.6.1...v7.6.2) (2026-09-02)

### [7.6.1](https://github.com/smallcase/react-native-smallcase-gateway/compare/v7.6.0...v7.6.1) (2026-08-17)

### Improvements

* **android:** update Loans SDK to 5.3.1

## [7.6.0](https://github.com/smallcase/react-native-smallcase-gateway/compare/v7.5.0...v7.6.0) (2026-07-31)


### Improvements

* **android:** update Loans SDK to 5.3.0

### Bug Fixes

* **android:** keep SCGateway classes for R8 ([e99d428](https://github.com/smallcase/react-native-smallcase-gateway/commit/e99d4284368827051a46a68f12e2dba75852ac3e))

## [7.5.0](https://npmjs.com/package/react-native-smallcase-gateway/v/7.5.0?activeTab=versions) (2026-07-10)

Dev Improvements

* Bumped Loans native SDK to the dark-theme internal release (Android 5.1.4-92, iOS 7.1.2-44) and dropped a stale ProGuard workaround while keeping R8 full mode on.

Features

* Added a `colorScheme` (`dark` / `light` / `system`) option to `ScLoanInfo`, letting partner apps control the LAS web UI theme instead of always defaulting to light.

### [7.4.4](https://github.com/smallcase/react-native-smallcase-gateway/compare/v7.4.3...v7.4.4) (2026-06-11)

### [7.4.3](https://github.com/smallcase/react-native-smallcase-gateway/compare/v7.4.0...v7.4.3) (2026-06-09)

### [7.4.2](https://github.com/smallcase/react-native-smallcase-gateway/compare/v7.4.0...v7.4.2) (2026-05-25)
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ const res = await SmallcaseGateway.triggerTransaction(transactionId);

// start lead generation flow
SmallcaseGateway.triggerLeadGen({ email: "test@gmail.com" });

// launch a standalone WebView; setup/init are not required
await SmallcaseGateway.launchScWebView("https://www.smallcase.com");
```

## Debug / Contribution
Expand Down
4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ def kotlin_version = getExtOrDefault('kotlinVersion')
dependencies {
//noinspection GradleDynamicVersion
implementation 'com.facebook.react:react-native:+' // From node_modules
implementation 'com.smallcase.gateway:sdk:6.1.1'
implementation 'com.smallcase.loans:sdk-sourav-native-dark-theme-cb54bf9:5.1.4-92-release'
implementation 'com.smallcase.gateway:sdk:6.1.2'
implementation 'com.smallcase.loans:sdk:5.3.2'
implementation "androidx.core:core-ktx:1.3.1"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.reactnativesmallcasegateway

import android.net.Uri
import android.util.Log
import androidx.appcompat.app.AppCompatActivity
import com.facebook.react.bridge.*
Expand Down Expand Up @@ -163,6 +164,28 @@ class SmallcaseGatewayModule(reactContext: ReactApplicationContext) : ReactConte
}
}

@ReactMethod
fun launchScWebView(url: String, promise: Promise) {
val activity = reactApplicationContext.currentActivity ?: run {
promise.reject("no_activity", "No active Android activity")
return
}
val uri = Uri.parse(url)
if (uri.scheme?.lowercase() !in setOf("http", "https") || uri.host.isNullOrBlank()) {
promise.reject("invalid_url", "A valid absolute HTTP(S) URL is required")
return
}

activity.runOnUiThread {
try {
SmallcaseGatewaySdk.launchScWebView(activity, url)
promise.resolve(true)
} catch (error: Exception) {
promise.reject("launch_failed", error)
}
}
}

@ReactMethod
fun launchSmallplug(targetEndpoint: String, params: String, promise: Promise) {

Expand Down Expand Up @@ -562,4 +585,3 @@ class SmallcaseGatewayModule(reactContext: ReactApplicationContext) : ReactConte
}

}

22 changes: 21 additions & 1 deletion ios/SmallcaseGateway.m
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,27 @@ @interface RCT_EXTERN_MODULE(SmallcaseGateway, NSObject)
}

//MARK: smallplug
RCT_REMAP_METHOD(launchScWebView,
urlString:(NSString *)urlString
launchScWebViewWithResolver:(RCTPromiseResolveBlock)resolve
rejecter:(RCTPromiseRejectBlock)reject) {
NSURL *url = [NSURL URLWithString:urlString];
NSString *scheme = url.scheme.lowercaseString;
if (url == nil || url.host.length == 0 ||
!([scheme isEqualToString:@"http"] || [scheme isEqualToString:@"https"])) {
reject(@"invalid_url", @"A valid absolute HTTP(S) URL is required", nil);
return;
}

dispatch_async(dispatch_get_main_queue(), ^{
[SCGateway.shared
launchScWebViewWithPresentingController:[[[UIApplication sharedApplication] keyWindow] rootViewController]
url:url
completion:^(__unused id response, __unused NSError *error) {}];
resolve(@(YES));
});
}

RCT_REMAP_METHOD(launchSmallplug,
targetEndpoint:(NSString *)targetEndpoint
params:(NSString *)params
Expand Down Expand Up @@ -809,4 +830,3 @@ - (NSError *)scLoanErrorToDict:(ScLoanError *)error {
}

@end

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "react-native-smallcase-gateway",
"title": "React Native Smallcase Gateway",
"version": "7.4.3",
"version": "7.6.2",
"description": "smallcase gateway bindings for react native",
"main": "src/index.js",
"files": [
Expand Down
4 changes: 1 addition & 3 deletions react-native-smallcase-gateway.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,5 @@ Pod::Spec.new do |s|
end

s.dependency 'SCGateway', '7.2.0'
# INTERNAL TEST PIN: dark-theme branch build (mirrors the android/build.gradle pin).
# Revert to: s.dependency 'SCLoans', '7.2.0'
s.dependency 'SCLoans-sourav-native-dark-theme-37c97d9', '7.1.2-45-release'
s.dependency 'SCLoans', '7.3.0'
end
2 changes: 2 additions & 0 deletions smart_investing_react_native/android/app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
# SCGateway proguard rules — keeping it here, same as loans.
-keep class com.smallcase.gateway.** { *; }

-keep class com.example.** { *; }

# Retrofit + R8 full mode (AGP 8 default): generic signatures are stripped for
# any type that is not kept, so ConfigService.getBrokerConfigs(): Call<Foo>
# degrades to a raw Call and Retrofit rejects it
Expand Down
3 changes: 0 additions & 3 deletions smart_investing_react_native/android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,3 @@ hermesEnabled=true
artifactory_contextUrl=https\://artifactory.smallcase.com/artifactory
artifactory_password=reactNativeUser123
artifactory_user=react_native_user

# R8 full mode enabled — verified safe against loans SDK consumer-rules.pro
android.enableR8.fullMode=true
30 changes: 26 additions & 4 deletions smart_investing_react_native/app/screens/SmtScreen.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import React from 'react';
import {Button, TextInput, View} from 'react-native';
import {Button, ScrollView, TextInput} from 'react-native';
import {launchSmallPlug} from '../apis/Functions';
import {SCGatewayEventManager} from 'react-native-smallcase-gateway';
import SmallcaseGateway, {
SCGatewayEventManager,
} from 'react-native-smallcase-gateway';

const SmtScreen = () => {
const [webViewUrl, onChangeWebViewUrl] = React.useState(
'https://www.smallcase.com',
);
const [targetEndpoint, onChangeTargetEndpoint] = React.useState<
string | null
>(null);
Expand All @@ -21,7 +26,7 @@ const SmtScreen = () => {
string | null
>(null);
return (
<View>
<ScrollView>
<TextInput
placeholder="Enter target end point"
onChange={event => {
Expand Down Expand Up @@ -99,7 +104,24 @@ const SmtScreen = () => {
title={'SmallPlug'}
accessibilityLabel="Learn more about this purple button"
/>
</View>
<TextInput
value={webViewUrl}
placeholder="Enter WebView URL"
autoCapitalize="none"
keyboardType="url"
onChangeText={onChangeWebViewUrl}
/>
<Button
title="Launch SC WebView"
onPress={async () => {
try {
await SmallcaseGateway.launchScWebView(webViewUrl);
} catch (error) {
console.error('SC WebView launch failed:', error);
}
}}
/>
</ScrollView>
);
};

Expand Down
11 changes: 5 additions & 6 deletions smart_investing_react_native/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1417,7 +1417,7 @@ PODS:
- React-Core
- ReactCommon/turbomodule/core
- SCGateway (= 7.2.0)
- SCLoans-sourav-native-dark-theme-0e85bd6 (= 7.1.2-44-release)
- SCLoans (= 7.3.0)
- React-NativeModulesApple (0.79.4):
- glog
- hermes-engine
Expand Down Expand Up @@ -1840,7 +1840,7 @@ PODS:
- ReactCommon/turbomodule/core
- Yoga
- SCGateway (7.2.0)
- SCLoans-sourav-native-dark-theme-0e85bd6 (7.1.2-44-release)
- SCLoans (7.3.0)
- SocketRocket (0.7.1)
- Yoga (0.0.0)

Expand Down Expand Up @@ -1925,11 +1925,10 @@ DEPENDENCIES:
- Yoga (from `../node_modules/react-native/ReactCommon/yoga`)

SPEC REPOS:
https://github.com/smallcase/cocoapodspec-internal.git:
- SCLoans-sourav-native-dark-theme-0e85bd6
trunk:
- React-Codegen
- SCGateway
- SCLoans
- SocketRocket

EXTERNAL SOURCES:
Expand Down Expand Up @@ -2129,7 +2128,7 @@ SPEC CHECKSUMS:
React-microtasksnativemodule: ef2292ca147fa8793305e4693586ad0caf3afad3
react-native-safe-area-context: 562163222d999b79a51577eda2ea8ad2c32b4d06
react-native-segmented-control: bf6e0032726727498e18dd437ae88afcdbc18e99
react-native-smallcase-gateway: 8e5836a403989efd924992c552fbfdf57dea8a65
react-native-smallcase-gateway: 12d3338564d2781ee8be7de425265c47646fa7c6
React-NativeModulesApple: da60186ad0aafff031a9bc86b048711d34acc813
React-oscompat: 472a446c740e39ee39cd57cd7bfd32177c763a2b
React-perflogger: bbca3688c62f4f39e972d6e21969c95fe441fb6c
Expand Down Expand Up @@ -2165,7 +2164,7 @@ SPEC CHECKSUMS:
RNGestureHandler: ebef699ea17e7c0006c1074e1e423ead60ce0121
RNScreens: 3f6e41f9f89cb888a6b4b27566bdfdf7a3bf51ad
SCGateway: 8089d79c55ecc8e7b581e0bf56fd28a2e3d957d0
SCLoans-sourav-native-dark-theme-0e85bd6: 98e7ffbfcc0da3bc0571caeaaf353ae4a7914dfa
SCLoans: 1effcdedc4be32992f5a1a08afa2b812827e5086
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
Yoga: a6cb833e04fb8c59a012b49fb1d040fcb0cbb633

Expand Down
Loading
Loading