{"id":24302848,"url":"https://github.com/digipolitan/runtime-environment","last_synced_at":"2026-04-20T15:03:30.148Z","repository":{"id":62453059,"uuid":"105268449","full_name":"Digipolitan/runtime-environment","owner":"Digipolitan","description":null,"archived":false,"fork":false,"pushed_at":"2019-05-30T12:08:34.000Z","size":105,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-28T16:57:29.453Z","etag":null,"topics":["env","environment","environment-variables","json","plist","runtime","swift"],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Digipolitan.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-29T12:13:10.000Z","updated_at":"2019-05-30T12:08:28.000Z","dependencies_parsed_at":"2022-11-01T22:46:20.640Z","dependency_job_id":null,"html_url":"https://github.com/Digipolitan/runtime-environment","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Digipolitan%2Fruntime-environment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Digipolitan%2Fruntime-environment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Digipolitan%2Fruntime-environment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Digipolitan%2Fruntime-environment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Digipolitan","download_url":"https://codeload.github.com/Digipolitan/runtime-environment/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242225886,"owners_count":20092668,"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":["env","environment","environment-variables","json","plist","runtime","swift"],"created_at":"2025-01-17T00:19:53.032Z","updated_at":"2026-04-20T15:03:25.063Z","avatar_url":"https://github.com/Digipolitan.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"RuntimeEnvironment\n=================================\n\n[![Swift Version](https://img.shields.io/badge/swift-5.0-orange.svg?style=flat)](https://developer.apple.com/swift/)\n[![Build Status](https://travis-ci.org/Digipolitan/runtime-environment.svg?branch=master)](https://travis-ci.org/Digipolitan/runtime-environment)\n[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/RuntimeEnvironment.svg)](https://img.shields.io/cocoapods/v/RuntimeEnvironment.svg)\n[![Carthage Compatible](https://img.shields.io/badge/carthage-compatible-brightgreen.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![Swift Package Manager Compatible](https://img.shields.io/badge/swift%20package%20manager-compatible-brightgreen.svg?style=flat)](https://swift.org/package-manager/)\n[![Platform](https://img.shields.io/cocoapods/p/RuntimeEnvironment.svg?style=flat)](http://cocoadocs.org/docsets/RuntimeEnvironment)\n[![Twitter](https://img.shields.io/badge/twitter-@Digipolitan-blue.svg?style=flat)](http://twitter.com/Digipolitan)\n\nRuntimeEnvironment manage all your environment variable with a specific environment set in your Info.plist file\n\n## Installation\n\n### CocoaPods\n\nTo install RuntimeEnvironment with CocoaPods, add the following lines to your `Podfile`.\n\n```ruby\nsource 'https://github.com/CocoaPods/Specs.git'\nplatform :ios, '9.0'\nuse_frameworks!\n\npod 'RuntimeEnvironment'\n```\n\n### Carthage\n\n[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.\n\nYou can install Carthage with [Homebrew](http://brew.sh/) using the following command:\n\n```bash\n$ brew update\n$ brew install carthage\n```\n\nTo integrate RuntimeEnvironment into your Xcode project using Carthage, specify it in your `Cartfile`:\n\n```\ngithub 'Digipolitan/runtime-environment' ~\u003e 1.0\n```\n\nRun `carthage update` to build the framework and drag the built `RuntimeEnvironment.framework` into your Xcode project.\n\n### Swift Package Manager\n\nThe [Swift Package Manager](https://swift.org/package-manager/) is a tool for automating the distribution of Swift code and is integrated into the `swift` compiler.\n\nOnce you have your Swift package set up, adding RuntimeEnvironment as a dependency is as easy as adding it to the `dependencies` value of your `Package.swift`.\n\n```swift\ndependencies: [\n    .package(url: \"https://github.com/Digipolitan/runtime-environment.git\", from: \"1.0.0\")\n]\n```\n\n## The Basics\n\nFirst you must set the environment mode in your Info.plist file\n\n```xml\n\u003ckey\u003eEnvironment\u003c/key\u003e\n\u003cstring\u003eproduction\u003c/string\u003e\n```\n\nAuthorized environment value are **development**, **staging**, **production**\n\nAfter that, at runtime you must register all your variable as follow:\n\n```swift\nlet env = RuntimeEnvironment.shared\nenv.set(\"API_KEY\", \"dsdqsiIDNSIQUdiusqdDSQ\")\n```\n\n## Advanced\n\n### Variable from dictionary\n\nYou can set multiple variable at once using dictionary\n\n```swift\nlet env = RuntimeEnvironment.shared\nenv.set([\n  \"secure\": true,\n  \"baseUrl\": \"http://localhost\"\n  ])\n```\n\n### Variable from file\n\n2 file format are available: **json** \u0026 **plist**\n\n```swift\nlet env = RuntimeEnvironment.shared\nenv.setFile(\"env.prod\", format: .json)\n```\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for more details!\n\nThis project adheres to the [Contributor Covenant Code of Conduct](CODE_OF_CONDUCT.md).\nBy participating, you are expected to uphold this code. Please report\nunacceptable behavior to [contact@digipolitan.com](mailto:contact@digipolitan.com).\n\n## License\n\nRuntimeEnvironment is licensed under the [BSD 3-Clause license](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigipolitan%2Fruntime-environment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdigipolitan%2Fruntime-environment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigipolitan%2Fruntime-environment/lists"}