diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 234eb17..4bfc050 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,5 +1,17 @@ # Release Notes +## Version 0.2.1 + +### 🐛 Bug Fixes +- **Fixed initializeSDKIOS function**: Resolved critical issue where `initializeSDKIOS()` was undefined due to incorrect native bridge method mapping + - The function was incorrectly calling `TsAccountprotection.initializeSDK()` instead of `TsAccountprotection.initializeSDKIOS()` + - This caused runtime errors when trying to initialize the SDK on iOS without parameters + - Updated example app to use correct `initializeSDKIOS()` method call + +### Technical Details +- Corrected native method bridge mapping in `initializeSDKIOS` function +- Updated example implementation to demonstrate proper usage + ## Version 0.2.0 ### 🚀 Major API Refactor - Breaking Changes diff --git a/example/src/App.tsx b/example/src/App.tsx index 473fb83..7f3ccd5 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -3,7 +3,7 @@ import * as React from 'react'; import { SafeAreaView, Keyboard, Alert, Platform } from 'react-native'; import { - initializeIOS, + initializeSDKIOS, setUserId, setLogLevel, clearUser, @@ -80,7 +80,7 @@ export default class App extends React.Component { private onAppReady = async (): Promise => { // this is for iOS only, Android TSAccountProtectionSDK is initialized from application onCreate. if (Platform.OS === 'ios') { - await initializeIOS(config.clientId, null); + await initializeSDKIOS(); } const isLogEnabled = true; diff --git a/src/index.tsx b/src/index.tsx index 9fd4427..24c1560 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -68,7 +68,7 @@ export const enum TSAction { // SDK Functions - Direct exports of the native module methods export function initializeSDKIOS(): Promise { - return TsAccountprotection.initializeSDK(); + return TsAccountprotection.initializeSDKIOS(); } export function initializeIOS(clientId: string, baseUrl?: string | null): Promise {