{"id":21478291,"url":"https://github.com/appsflyersdk/appsflyer-sdk-v6-sample-app","last_synced_at":"2025-07-15T11:30:37.558Z","repository":{"id":46709651,"uuid":"284428924","full_name":"AppsFlyerSDK/appsflyer-sdk-v6-sample-app","owner":"AppsFlyerSDK","description":"A sample to demonstrate the init and functionality of AppsFlyer's SDK v6","archived":false,"fork":false,"pushed_at":"2021-09-29T07:38:07.000Z","size":7874,"stargazers_count":3,"open_issues_count":5,"forks_count":5,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-04-23T03:41:07.325Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"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":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-02T09:16:28.000Z","updated_at":"2023-10-06T12:01:48.000Z","dependencies_parsed_at":"2022-09-15T20:13:04.940Z","dependency_job_id":null,"html_url":"https://github.com/AppsFlyerSDK/appsflyer-sdk-v6-sample-app","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AppsFlyerSDK%2Fappsflyer-sdk-v6-sample-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AppsFlyerSDK%2Fappsflyer-sdk-v6-sample-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AppsFlyerSDK%2Fappsflyer-sdk-v6-sample-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AppsFlyerSDK%2Fappsflyer-sdk-v6-sample-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AppsFlyerSDK","download_url":"https://codeload.github.com/AppsFlyerSDK/appsflyer-sdk-v6-sample-app/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226033253,"owners_count":17563137,"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":"2024-11-23T11:17:35.625Z","updated_at":"2024-11-23T11:17:36.259Z","avatar_url":"https://github.com/AppsFlyerSDK.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"![image](https://user-images.githubusercontent.com/61788924/89123513-9f5e4000-d4d8-11ea-9025-653c9f290ed8.png)\n\n# **Welcome to AppsFlyer SDK 6.x**\n\n\u003e‼️ The sample app is cmpatible with the IDFA limitations in iOS 14.5\n\niOS 14.5 blocks the collection of IDFA unless the user allows ita collection when the application starts. \n\nAppsFlyer's SDK - starting of version 6.0.3 - supports this functionality using Apple's AppTrackingTransperancy framework. \n\nThis sample app will allow you to test this functionality and ensure that your app is running smoothly ahead of the release of iOS 14.\n\n## Compatability\n- **iOS version \u003e= 10.0**\n\n- **AppsFlyer SDK version 6.0.3 (current installed SDK is 6.2.2)**\n\n## How do I test consent to collect of IDFA?\n\nWhen the application initialises in iOS 14:\n\n\u003cimg src=\"https://user-images.githubusercontent.com/61788924/89154579-cd429380-d56f-11ea-96be-0a39e2bf1350.png\" alt=\"idfa_menu\" width=\"320\" /\u003e\n\nThis code shows a menu that requests the user to authorise IDFA collection.\n\n```swift\n// The following block is optional for applications wishing to give users the option to collect IDFA.\n// for iOS 14 and above - The user may be prompted to collect IDFA.\n//                        If user opts-in, the IDFA will be collected by the SDK.\n// for iOS 13 and below - The IDFA will be collected by the SDK. The user will NOT be prompted to consent.\nif #available(iOS 14, *) {\n  // Set a timeout for the SDK to wait for the IDFA collection before handling app launch\n  // If timeout expires before the user allows to collect IDFA , the IDFA will NOT be collected.\n  AppsFlyerLib.shared().waitForATTUserAuthorization(timeoutInterval: 60)\n  // Show the user the Apple IDFA consent dialog (AppTrackingTransparency)\n  // MUST be called here before start() in order to allow IDFA collection by the SDK\n  ATTrackingManager.requestTrackingAuthorization { (status) in\n                                                 }\n}\n```\n[Get code here](https://github.com/AppsFlyerSDK/appsflyer-sdk-v6-sample-app/blob/master/swift/sdk-v6-demo/sdk-v6-demo/AppDelegate.swift#L37-L49)\n\nIn the app you have a button '**Test IDFA collection**'\n\n#### If user authorised IDFA collection, its IDFA will be displayed\n\u003cimg src=\"https://user-images.githubusercontent.com/61788924/89342813-ff591000-d6ab-11ea-9a90-2cae9810794b.png\" alt=\"idfa_ok\" width=\"350\" /\u003e\n\n#### If user DID NOT authorise IDFA collection, a message will be displayed\n\n\u003cimg src=\"https://user-images.githubusercontent.com/61788924/89152971-acc50a00-d56c-11ea-9198-6b3af746be10.png\" alt=\"idfa_not_allowed\" width=\"350\" /\u003e\n\n## Why is the demo app asking me to allow notifications?\n\nThe notifcations are used for the uninstall detection flow\n\n## How to use this demo?\n\n1. Clone the repository\n2. **Make sure to open the work environment via Xcode workspace `basic_app.xcworkspace`**\n3. Get your AppsFlyer Dev Key using [these instructions][get_af_devkey].\n4. Create the file `sdk-v6-demo/afdevkey_donotpush.plist` with the following content:\n```xml\n\u003c!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\"\u003e\n\u003cplist version=\"1.0\"\u003e\n\u003cdict\u003e\n        \u003ckey\u003eappsFlyerDevKey\u003c/key\u003e\n        \u003cstring\u003eYOUR_AF_DEV_KEY_HERE\u003c/string\u003e\n        \u003ckey\u003eappleAppID\u003c/key\u003e\n        \u003cstring\u003eYOUR_APPLE_APP_ID_HERE\u003c/string\u003e\n\u003c/dict\u003e\n\u003c/plist\u003e\n```\n5. Add the file into your Xcode project\n\u003e The file `sdk-v6-demo/sdk-v6-demo.xcodeproj/project.pbxproj` will have some changes. **Do not commit them!**\n\n[get_af_devkey]: https://support.appsflyer.com/hc/en-us/articles/207032066-iOS-SDK-integration-for-developers#integration-31-retrieving-your-dev-key\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappsflyersdk%2Fappsflyer-sdk-v6-sample-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fappsflyersdk%2Fappsflyer-sdk-v6-sample-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappsflyersdk%2Fappsflyer-sdk-v6-sample-app/lists"}