react-native-appsflyer
Advanced tools
Comparing version 6.1.40 to 6.1.41
# Versions | ||
## 6.1.41 | ||
- Add onAttributionFailure listener | ||
- fix event listeners error handling | ||
## 6.1.40 | ||
@@ -3,0 +7,0 @@ - fix onAppOpenAttribution on iOS. PLEASE check out the Docs [here](https://github.com/AppsFlyerSDK/appsflyer-react-native-plugin/blob/releases/6.x.x/6.1.x/6.1.40/Docs/Guides.md#-ios-deep-links---universal-links-and-url-schemes) |
@@ -66,2 +66,3 @@ /** | ||
onAppOpenAttribution(callback: (data: any) => any): () => void; | ||
onAttributionFailure(callback: (data: any) => any): () => void; | ||
onDeepLink(callback: (data: any) => any): () => void; | ||
@@ -68,0 +69,0 @@ initSdk(options: InitSDKOptions): Promise<string>; |
27
index.js
@@ -359,4 +359,2 @@ import {NativeEventEmitter, NativeModules} from "react-native"; | ||
//console.log("onAppOpenAttribution is called" ); | ||
const listener = appsFlyerEventEmitter.addListener( | ||
@@ -385,2 +383,27 @@ "onAppOpenAttribution", | ||
appsFlyer.onAttributionFailure = callback => { | ||
const listener = appsFlyerEventEmitter.addListener( | ||
"onAttributionFailure", | ||
_data => { | ||
if (callback && typeof callback === typeof Function) { | ||
try { | ||
let data = JSON.parse(_data); | ||
callback(data); | ||
} catch (_error) { | ||
callback(new AFParseJSONException("Invalid data structure", _data)); | ||
} | ||
} | ||
} | ||
); | ||
eventsMap["onAttributionFailure"] = listener; | ||
// unregister listener (suppose should be called from componentWillUnmount() ) | ||
return function remove() { | ||
listener.remove(); | ||
}; | ||
}; | ||
appsFlyer.onDeepLink = callback => { | ||
@@ -387,0 +410,0 @@ |
{ | ||
"name": "react-native-appsflyer", | ||
"version": "6.1.40", | ||
"version": "6.1.41", | ||
"description": "React Native Appsflyer plugin", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1505299
1592