{"id":26428469,"url":"https://github.com/AppsFlyerSDK/appsflyer-nativescript-plugin","last_synced_at":"2025-07-01T10:06:10.390Z","repository":{"id":41830590,"uuid":"74262277","full_name":"AppsFlyerSDK/appsflyer-nativescript-plugin","owner":"AppsFlyerSDK","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-07T09:19:31.000Z","size":86886,"stargazers_count":5,"open_issues_count":6,"forks_count":11,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-30T20:04:24.310Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AppsFlyerSDK.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-11-20T08:41:05.000Z","updated_at":"2024-05-07T09:18:23.000Z","dependencies_parsed_at":"2024-03-06T16:54:12.174Z","dependency_job_id":"5b22a374-97a9-455d-a607-deb25103a8b7","html_url":"https://github.com/AppsFlyerSDK/appsflyer-nativescript-plugin","commit_stats":null,"previous_names":["appsflyersdk/nativescript-plugin-appsflyer"],"tags_count":32,"template":false,"template_full_name":null,"purl":"pkg:github/AppsFlyerSDK/appsflyer-nativescript-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AppsFlyerSDK%2Fappsflyer-nativescript-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AppsFlyerSDK%2Fappsflyer-nativescript-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AppsFlyerSDK%2Fappsflyer-nativescript-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AppsFlyerSDK%2Fappsflyer-nativescript-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AppsFlyerSDK","download_url":"https://codeload.github.com/AppsFlyerSDK/appsflyer-nativescript-plugin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AppsFlyerSDK%2Fappsflyer-nativescript-plugin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262842917,"owners_count":23373165,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-18T04:31:42.015Z","updated_at":"2025-07-01T10:06:10.365Z","avatar_url":"https://github.com/AppsFlyerSDK.png","language":"TypeScript","funding_links":[],"categories":["Plugins"],"sub_categories":["Analytics, Engagement \u0026 Monitoring Plugins"],"readme":"\n\u003cimg src=\"https://www.appsflyer.com/wp-content/uploads/2016/11/logo-1.svg\"  width=\"200\"\u003e\n\n# appsflyer-nativescript-plugin\n Nativescript Library for AppsFlyer SDK\n\n[![npm version](https://badge.fury.io/js/nativescript-plugin-appsflyer.svg)](https://badge.fury.io/js/nativescript-plugin-appsflyer)\n\n## Table of content\n\n- [Supported Platforms](#this-plugin-is-built-for)\n- [Installation](#installation)\n- [Integration](#api-methods) \n    - [initSdk](#initSdk) \n    - [logEvent](#logEvent) \n- [Set plugin for IOS 14](docs/ios14.md)\n- [deepLink](docs/deeplink.md) \n- [APIs](/docs/api.md)\n- [Demo](#demo) \n\n\n## \u003ca id=\"this-plugin-is-built-for\"\u003e This plugin is built for\n\n- iOS AppsFlyerSDK **v6.14.3**\n- Android AppsFlyerSDK **v6.14.0**\n\n## \u003ca id=\"breaking-changes\"\u003e Breaking Changes\n\n**v6.14.3**\n\niOS Minimum deployment target: 12 , Android minSdk: 19 \n\n**v6.5.4**\n\nAndroid: deepLinkResult will return an object instead of a string\n\n## \u003ca id=\"installation\"\u003e Installation\n\n`$ tns plugin add nativescript-plugin-appsflyer`\n\n### Huawei Referrer (Android)\nHuawei Referrer is supported in SDK v6.14.0 and above. Due to changes in the Huawei AppGallery store, previous versions of the AppsFlyer SDK are not able to fetch the referrer from the store. Learn more.\n\n## \u003ca id=\"Integration\"\u003e  Integration\n\n---\n\nCall module by adding (native javascript): \n\n`var appsFlyer = require(\"nativescript-plugin-appsflyer\");`\n\n---\n\n\n##### \u003ca id=\"initSdk\"\u003e  **`appsFlyer.initSdk(options, callback): void`**\n\ninitializes the SDK.\n\n| parameter   | type                        | description  |\n| ----------- |-----------------------------|--------------|\n| `options`   | `Object`                    |   SDK configuration           |\n\n\n**`options`**\n\n| name       | type    | default | description            |\n| -----------|---------|---------|------------------------|\n| `devKey`   |`string` |         |   [Appsflyer Dev key](https://support.appsflyer.com/hc/en-us/articles/207032126-AppsFlyer-SDK-Integration-Android)    |\n| `appId`    |`string` |        | [Apple Application ID](https://support.appsflyer.com/hc/en-us/articles/207032066-AppsFlyer-SDK-Integration-iOS) (for iOS only) |\n| `isDebug`  |`boolean`| `false` | debug mode (optional)|\n| `onConversionDataSuccess`  |`function`| | AppsFlyer allows you to access the user attribution data in real-time for every new install, directly from the SDK level. By doing this you can serve users with personalized content or send them to specific activities within the app, which can greatly enhance their engagement with your app. For [Android](https://support.appsflyer.com/hc/en-us/articles/207032126-AppsFlyer-SDK-Integration-Android#7-get-conversion-data); for [iOS](https://support.appsflyer.com/hc/en-us/articles/207032066-AppsFlyer-SDK-Integration-iOS#7-get-conversion-data)  |\n| `onConversionDataFailure`  |`function`| | |\n\n*Example:*\n\n```javascript\n var options = {\n            devKey:  'WdpTVAcYwmxsaQ4WeTspmh',\n            appId: \"975313579\",\n            isDebug: true,\n            timeToWaitForATTUserAuthorization: 60,\n            onConversionDataSuccess: function(_res){\n                console.log(JSON.stringify(_res));\n            },\n            onConversionDataFailure: function(_res){\n                console.warn(\"failure: \" + JSON.stringify(_res));\n            },\n        };\n\n        appsFlyer.initSdk(options).then(function(result) {\n            viewModel.set(\"initSdkResponse\", result.status);\n        }, function(err) {\n            viewModel.set(\"initSdkResponse\", JSON.stringify(err));\n        });\n```\n\n---\n\n##### \u003ca id=\"logEvent\"\u003e **`appsFlyer.logEvent(options): Promise\u003cany\u003e`**\n\n\n- These in-app events help you measure how loyal users discover your app, and attribute them to specific \ncampaigns/media-sources. Please take the time define the event/s you want to measure to allow you \nto measure the ROI (Return on Investment) and LTV (Lifetime Value).\n- The `logEvent` method allows you to send in-app events to AppsFlyer analytics. This method allows you to add events dynamically by adding them directly to the application code.\n\n| parameter   | type                        | description  |\n| ----------- |-----------------------------|--------------|\n| `options`   | `Object`                    |   log event configuration           |\n\n**`options`**\n\n| parameter   | type                        | description |\n| ----------- |-----------------------------|--------------|\n| `eventName` | `string`                    | custom event name, is presented in your dashboard.  See the Event list [HERE](https://github.com/AppsFlyerSDK/AppsFlyerFramework/blob/master/AppsFlyerLib.framework/Versions/A/Headers/AppsFlyerTracker.h)  |\n| `eventValues` | `Object`                    | event details (see example bellow) |\n\n*Example: (native javascript)*\n\n```javascript\n \n        var options = {\n            eventName: \"af_add_to_cart\",\n            eventValues: {\n                \"af_content_id\": \"id123\",\n                \"af_currency\": \"USD\",\n                \"af_revenue\": \"2\"\n            }\n        };\n        appsFlyer.logEvent(options).then(function(result) {\n            viewModel.set(\"logEventResponse\", result);\n        }, function(err) {\n            viewModel.set(\"logEventResponse\", JSON.stringify(err));\n        });\n    \n    \n```\n\n## Demo\n\nThis plugin has a `demo` project bundled with it. To give it a try , clone this repo and from root a.e. `nativescript-plugin-appsflyer` execute the following:\n\n```sh\nnpm run setup\n```\n\n - Run `npm run demo.ios` or `npm run demo.android` will run for the appropriate platform.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAppsFlyerSDK%2Fappsflyer-nativescript-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAppsFlyerSDK%2Fappsflyer-nativescript-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAppsFlyerSDK%2Fappsflyer-nativescript-plugin/lists"}