{"id":21762118,"url":"https://github.com/segment-integrations/analytics-swift-destination-template","last_synced_at":"2025-03-21T04:41:42.508Z","repository":{"id":37893745,"uuid":"406883428","full_name":"segment-integrations/analytics-swift-destination-template","owner":"segment-integrations","description":"Basis for starting new destination plugins in Swift","archived":false,"fork":false,"pushed_at":"2023-03-27T16:21:33.000Z","size":30,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-26T01:20:23.466Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","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/segment-integrations.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":"2021-09-15T18:27:03.000Z","updated_at":"2022-02-23T18:38:14.000Z","dependencies_parsed_at":"2025-01-26T01:20:11.793Z","dependency_job_id":"45daa75b-0f1d-466a-ad9b-fda128784aa4","html_url":"https://github.com/segment-integrations/analytics-swift-destination-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/segment-integrations%2Fanalytics-swift-destination-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/segment-integrations%2Fanalytics-swift-destination-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/segment-integrations%2Fanalytics-swift-destination-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/segment-integrations%2Fanalytics-swift-destination-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/segment-integrations","download_url":"https://codeload.github.com/segment-integrations/analytics-swift-destination-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244739944,"owners_count":20501990,"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-26T12:11:05.505Z","updated_at":"2025-03-21T04:41:42.488Z","avatar_url":"https://github.com/segment-integrations.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Swift Destination Plugin Template\nThis template is resolved around `ExampleDestination` (to be replaced by you). \n\n## What does the template provide\n### Data class for holding settings\nTo standardize fetching and using settings in your destination, we recommend using a Coable class to store your destination settings. If marked `Codable`, it will enable you to retrieve your destination settings in a strongly typed construct.\n\n### Settings-related functions\nWe provide APIs to update your destination settings in `update(settings:type:)`.\n`UpdateType.initial` lets you know if this is the intial or subsequent fetch.\n\n`Settings.isDestinationEnabled(key: String)`\n- check if your destination is enabled\n\n`Settings.integrationSettings(forKey: String)`\n- retrieve a typed destination object\n\n### Sample implementation for common destination functions\nWe have templated common destinations functions like `track`, `identify`, `screen`, `group`, `alias` that you should modify to fit your vendor SDK implementation. Although these functions do not need to return the ending payload, its good practice to do so (for unit testing purposes).\n\n### Transforming events\nOften times, destinations need to transform events (eg: change names, modify properties/traits etc.). We have templated an example of transformation in the `track(event:)` example. we recommend you use this approach to perform any such transformations. This will make your code more legible plus improve code quality.\n\n### Testing functions for primary functions (to be expanded)\nWe have provided a very bare minimum template for testing the primary destination APIs. We recommend to use this as a starter and build upon it to get test coverage of most scenarios.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsegment-integrations%2Fanalytics-swift-destination-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsegment-integrations%2Fanalytics-swift-destination-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsegment-integrations%2Fanalytics-swift-destination-template/lists"}