{"id":18763691,"url":"https://github.com/inloop/inlconfig","last_synced_at":"2025-12-06T04:30:21.073Z","repository":{"id":56915048,"uuid":"51572680","full_name":"inloop/INLConfig","owner":"inloop","description":"An iOS library for loading your configuration from a plist that supports automatic code generation for supporting code and remote updates","archived":false,"fork":false,"pushed_at":"2019-06-06T18:05:23.000Z","size":32,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":25,"default_branch":"master","last_synced_at":"2024-04-29T08:21:05.492Z","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":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/inloop.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}},"created_at":"2016-02-12T07:19:49.000Z","updated_at":"2023-03-30T22:30:03.000Z","dependencies_parsed_at":"2022-08-20T20:50:39.751Z","dependency_job_id":null,"html_url":"https://github.com/inloop/INLConfig","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inloop%2FINLConfig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inloop%2FINLConfig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inloop%2FINLConfig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inloop%2FINLConfig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/inloop","download_url":"https://codeload.github.com/inloop/INLConfig/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239661864,"owners_count":19676411,"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-07T18:27:06.589Z","updated_at":"2025-12-06T04:30:20.765Z","avatar_url":"https://github.com/inloop.png","language":"Swift","readme":"# INLConfig\n\n## 1. Overview\n\n`INLConfig` is an iOS library for loading your configuration from a plist. Its goal is to have an easily maintainable configuration (by replacing things like global constants with a plist) without sacrificing productivity. After you add an item to the plist, you can start using it with autocomplete without doing any further configuration. This is achieved by a script that generates supporting code. The library also supports remote updates.\n\nThe library contains the `INLConfig` class that extracts your configuration from the plist and the `genconfig` script generates `INLConfig` categories/extensions for easy access to the items in the plist.\n\n## 2. Setup\n\nFirst, add a plist configuration file.\n\nTo enable code generation add a new Run script build phase. For each of your configuration plists run the `genconfig` script with two parameters: 1. the name of the configuration file without the .plist extension, 2. the programming language that should be generated (--objC and --swift are supported)\n```\n./Pods/INLConfig/genconfig SampleConfig --objC\n./Pods/INLConfig/genconfig AnotherConfig --swift\n```\n\nAfter you build the project (cmd+B) a finder window will open with the created configuration files. Drag them into Xcode.\nYou can even move them into a different directory as long as it’s a subdirectory of the project source directory. In this case the script will not create new files but update the existing ones.\n\n_Note: Do not modify the code in the generated files because it will be overwritten when the script is run again_\n\nYou can now use the configuration in your code\n```\n// swift file, swift config\nINLConfig.sampleConfig.sampleString\nINLConfig.sampleNumber\n\n// swift file, objC config\nINLConfig.sampleConfig().sampleString()\nINLConfig.sampleNumber()\n\n// objC file\n[[INLConfig sampleConfig] sampleString];\n[INLConfig sampleNumber];\n```\n\n## 3. Remote configuration update\nThe configuration can be updated to a newer version if the configuration file specifies the INLMeta dictionary. The dictionary should contain a “config” attribute containing an url for the configuration file and optionally a “version” attribute containing a url for a version file.\n```\n\u003ckey\u003eINLMeta\u003c/key\u003e\n\u003cdict\u003e\n\t\u003ckey\u003econfig\u003c/key\u003e\n\t\u003cstring\u003ehttps://an.url/SampleConfig.plist\u003c/string\u003e\n\t\u003ckey\u003eversion\u003c/key\u003e\n\t\u003cstring\u003ehttps://an.url/version.txt\u003c/string\u003e\n\u003c/dict\u003e\n```\n\nThe update is triggered by calling `updateConfig()`\n```\nINLConfig.sampleConfig.updateConfig {\n\t// update successful\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finloop%2Finlconfig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finloop%2Finlconfig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finloop%2Finlconfig/lists"}