Skip to content

Commit e162745

Browse files
making changes to enable new arch in react native sdk
1 parent c914e73 commit e162745

File tree

5 files changed

+1018
-510
lines changed

5 files changed

+1018
-510
lines changed

android/src/main/java/com/reactnativesmallcasegateway/SmallcaseGatewayModule.kt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,15 @@ class SmallcaseGatewayModule(reactContext: ReactApplicationContext) : ReactConte
178178
}, smallplugPartnerProps = SmallplugPartnerProps(headerColor = "#2F363F", backIconColor = "ffffff"))
179179
}
180180

181-
@ReactMethod
182-
fun launchSmallplugWithBranding(targetEndpoint: String, params: String, readableMap: ReadableMap?, promise: Promise) {
181+
@ReactMethod
182+
fun launchSmallplugWithBranding(targetEndpoint: String, params: String, headerColor: String?, headerOpacity: Double?, backIconColor: String?, backIconOpacity: Double?, promise: Promise
183+
) {
184+
val readableMap = Arguments.createMap().apply {
185+
putString("headerColor", headerColor)
186+
putDouble("headerOpacity", headerOpacity ?: 1.0)
187+
putString("backIconColor", backIconColor)
188+
putDouble("backIconOpacity", backIconOpacity ?: 1.0)
189+
}
183190

184191
fun getColorValue(value: Any?, defaultValue: String): String {
185192
return when (value) {

smart_investing_react_native/android/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
3232
# your application. You should enable this flag either if you want
3333
# to write custom TurboModules/Fabric components OR use libraries that
3434
# are providing them.
35-
newArchEnabled=false
35+
newArchEnabled=true
3636

3737
# Use this property to enable or disable the Hermes JS engine.
3838
# If set to false, you will be using JSC instead.

smart_investing_react_native/ios/Podfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ target 'smart_investing_react_native' do
2222

2323
use_react_native!(
2424
:path => config[:reactNativePath],
25-
# An absolute path to your application root.
26-
:app_path => "#{Pod::Config.instance.installation_root}/.."
25+
:app_path => "#{Pod::Config.instance.installation_root}/..",
26+
:fabric_enabled => true,
27+
:hermes_enabled => true
2728
)
2829

2930
post_install do |installer|

0 commit comments

Comments
 (0)