{"id":19342952,"url":"https://github.com/floatplane/plist-secrets","last_synced_at":"2025-09-06T20:41:31.239Z","repository":{"id":137549348,"uuid":"116065444","full_name":"floatplane/plist-secrets","owner":"floatplane","description":null,"archived":false,"fork":false,"pushed_at":"2018-01-02T23:16:25.000Z","size":12,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-24T08:48:46.857Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/floatplane.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-02T22:52:15.000Z","updated_at":"2021-02-21T00:58:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"c6d87f2a-9a93-4423-ae13-0186a327597b","html_url":"https://github.com/floatplane/plist-secrets","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/floatplane/plist-secrets","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floatplane%2Fplist-secrets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floatplane%2Fplist-secrets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floatplane%2Fplist-secrets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floatplane%2Fplist-secrets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/floatplane","download_url":"https://codeload.github.com/floatplane/plist-secrets/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floatplane%2Fplist-secrets/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273961517,"owners_count":25198597,"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","status":"online","status_checked_at":"2025-09-06T02:00:13.247Z","response_time":2576,"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-10T03:36:48.356Z","updated_at":"2025-09-06T20:41:31.213Z","avatar_url":"https://github.com/floatplane.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# plist-secrets\n\nThis shows a simple way of storing and loading API keys for a Swift project, while keeping the keys out of source control.\n\nTo copy this approach:\n\n1. Add a new file called `secrets.plist` to your project: go to File -\u003e New -\u003e Property List, name it `secrets`\n1. Make sure the new file is in `.gitignore` - you don't want to push your secrets up to GitHub!\n1. Add your API keys to the new file in the property list editor. When you're done, it might look something like this:\n    ```xml\n    \u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\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    \t\u003ckey\u003eAPI_SECRET_ONE\u003c/key\u003e\n    \t\u003cstring\u003ethis is secret one\u003c/string\u003e\n    \t\u003ckey\u003eAPI_SECRET_TWO\u003c/key\u003e\n    \t\u003cstring\u003esecret two is very different\u003c/string\u003e\n    \u003c/dict\u003e\n    \u003c/plist\u003e\n    ```\n1. At runtime, you would load your keys from the plist file wherever you need them:\n    ```swift\n    // Load the dictionary of secret keys from secrets.plist\n    let path = Bundle.main.path(forResource: \"secrets\", ofType: \"plist\")\n    let dict = NSDictionary(contentsOfFile: path!)\n\n    // Load secrets\n    let secret1 = dict!.object(forKey: \"YOUR_KEY_HERE\") as? String\n    // load any others...\n    ```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffloatplane%2Fplist-secrets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffloatplane%2Fplist-secrets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffloatplane%2Fplist-secrets/lists"}