# Changelog

## 1.10.0

- Update native SDK dependencies: 4.17.0 for iOS and 4.17.0 for Android.
- Add new method `closeInApp(type)` to programmatically close an active in-app message by type.
- Add new method getSdkVersion() to retrieve the native SDK version.
- Fix trackPurchase to properly return a Promise, making it awaitable.
- Add static property sdkVersion to retrieve the React Native plugin version.
- Add new method login() to track an anonymous login event.
- Add new method loginDefault() to track a login event with the default user data.
- Add new method register() to track an anonymous registration event.
- Add new method getInstallAttributionInfo() to retrieve install attribution data.

## 1.9.0

- Update native SDK dependencies: 4.16.0 for iOS and 4.16.+ for Android.
- Add new method setEmail to set user email.
- Add new method setUserProfile to set customerId, email and tags in a single call.
- Add new method trackUserTags to track user tags.
- Add new method trackPurchase to track purchases with products in a single call.
- Add new method unregisterPushSystem to unregister from push notifications.
- Deprecate trackExtraUserInfo method.
- Deprecate startOrder, addProduct and trackOrder methods.
- Remove cancelOrder method.

## 1.8.4

- Fixed `currentActivity` unresolved reference for React Native 0.80+ compatibility.

## 1.8.3

- Fixed Android compatibility with React Native 0.80+ due to Kotlin migration of bridge interfaces.
- Fixed inverted null check for `channelId` in push notification setup.

## 1.8.2

- Update native SDK dependencies: 4.15.7 for Android and 4.15.6 for iOS.
- Fixed issue where some orders were incorrectly rejected due to NSNumber casting (iOS).

## 1.8.1

- Update iOS SDK dependency to version 4.15.5.

## 1.8.0

- Update native sdk dependencies: added new setUserLanguage method that allows users to manually set the language instead of relying on auto-detection.

## 1.7.0

- Added new method sendInAppDismissedClick
- Updated project to support AGP 8
- Updated SDK native to 4.14
- Updated target to Android 34

## 1.6.1

- Added compatibility with use_frameworks active.

## 1.6.0

- Added native version SDK 4.13 and iOS SDK Privacy Manifest and signature.

## 1.5.1

- Fixed RN not processing Float values correctly, changed to Double.

## 1.5.0

- SkadNetwork 4 support and notifications title.

## 1.4.2

- Fixed Android issue with targetSdkVersion when it was lower than 33.

## 1.4.1

- Fixed Android compilatation issue with Kotlin versions >= 1.7.

## 1.4.0

- Reestructured iOS SDK to fix some problems with header import in AppDelegate.

```objective-c
// Change import
@import emma_react_native_sdk;
// to
#import <emma-react-native-sdk/EmmaReactNative.h>
```

Change the AppDelegate methods to these:

```objective-c
[EmmaReactNative setPushNotificationsDelegate:self];
[EmmaReactNative registerToken:deviceToken];
[EmmaReactNative didReceiveNotificationResponse:response];
[EmmaReactNative didReceiveNotificationResponse:response withActionIdentifier:response.actionIdentifier];
[EmmaReactNative willPresentNotification:notification];
[EmmaReactNative handleLink:url];
```

## 1.3.1

- Added method to check if target 33 is setted in App for Android 13 notification permission.

## 1.3.0

- Android 13 notification permission support. Added methods for android `requestNotificationPermission` and `areNotificationsEnabled`.

## 1.2.1

- Added method `setCustomerId`.

## 1.2.0

- Updated RN version to 0.69+.

## 1.1.2

- Fix crash version SDK 4.10.0 y 4.10.1 when app started and recover ASA attribution.

## 1.1.1

- Updated sdks to version 4.10.+

## 1.1.0

- Fixed iOS app extension

## 1.0.0

- Start Session
- Track events
- Login and register
- User tags
- In-app messages
- Push notifications
- Powlink and deeplinking
- GDPR
- Purchases
