{"id":19745190,"url":"https://github.com/castle/analytics-ios-integration-castle","last_synced_at":"2026-06-08T13:32:32.218Z","repository":{"id":161121099,"uuid":"579936164","full_name":"castle/analytics-ios-integration-castle","owner":"castle","description":"The Castle analytics-ios integration.","archived":false,"fork":false,"pushed_at":"2023-05-17T08:38:05.000Z","size":31,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-11-23T13:16:16.339Z","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/castle.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":"2022-12-19T10:06:53.000Z","updated_at":"2023-05-03T16:06:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"5f36785d-7325-4c3e-9fe7-ad7dee27ef57","html_url":"https://github.com/castle/analytics-ios-integration-castle","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"segment-integrations/analytics-swift-destination-template","purl":"pkg:github/castle/analytics-ios-integration-castle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/castle%2Fanalytics-ios-integration-castle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/castle%2Fanalytics-ios-integration-castle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/castle%2Fanalytics-ios-integration-castle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/castle%2Fanalytics-ios-integration-castle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/castle","download_url":"https://codeload.github.com/castle/analytics-ios-integration-castle/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/castle%2Fanalytics-ios-integration-castle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34065349,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-12T02:04:52.335Z","updated_at":"2026-06-08T13:32:32.201Z","avatar_url":"https://github.com/castle.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Segment-Castle\nAdd Castle real-time monitoring support to your applications via his plugin for [Analytics-Swift](https://github.com/segmentio/analytics-swift).\n\n## Adding the dependency\n\n### via Xcode\nIn the Xcode `File` menu, click `Add Packages`.  You'll see a dialog where you can search for Swift packages.  In the search field, enter the URL to this repo.\n\n[https://github.com/castle/analytics-ios-integration-castle](https://github.com/castle/analytics-ios-integration-castle)\n\nYou'll then have the option to pin to a version, or specific branch, as well as which project in your workspace to add it to.  Once you've made your selections, click the `Add Package` button.  \n\n### via Package.swift\n\nOpen your Package.swift file and add the following do your the `dependencies` section:\n\n```\n.package(\n    name: \"SegmentCastle\",\n    url: \"https://github.com/castle/analytics-ios-integration-castle\",\n    from: \"1.0.0\"\n),\n```\n\n## Using the Plugin in your App\n\nOpen the file where you setup and configure the Analytics-Swift library.  Add this plugin to the list of imports.\n\n```\nimport Segment\nimport SegmentCastle // \u003c-- Add this line\n```\n\nJust under your Analytics-Swift library setup, call `analytics.add(plugin: ...)` to add an instance of the plugin to the Analytics timeline.\n\n```\nlet analytics = Analytics(configuration: Configuration(writeKey: \"\u003cYOUR WRITE KEY\u003e\")\n                    .flushAt(3)\n                    .trackApplicationLifecycleEvents(true))\nanalytics.add(plugin: CastleDestination(userJwt: \"\u003cUSER_JWT\u003e\"))\n```\n\nYour events will now be automatically sent to Castle.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcastle%2Fanalytics-ios-integration-castle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcastle%2Fanalytics-ios-integration-castle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcastle%2Fanalytics-ios-integration-castle/lists"}