{"id":22325479,"url":"https://github.com/jamf/managedappconfiglib","last_synced_at":"2025-07-29T16:33:01.086Z","repository":{"id":55118921,"uuid":"98574208","full_name":"jamf/ManagedAppConfigLib","owner":"jamf","description":"Makes Managed AppConfig on iOS, tvOS, and macOS easier to work with.","archived":false,"fork":false,"pushed_at":"2023-08-11T16:55:32.000Z","size":62,"stargazers_count":37,"open_issues_count":0,"forks_count":5,"subscribers_count":13,"default_branch":"main","last_synced_at":"2024-11-13T16:51:53.688Z","etag":null,"topics":["appconfig","cocoapods","ios","ios-development","macos","macos-development","swift","swift-package-manager","swiftpackage","swiftui","tvos","tvos-development"],"latest_commit_sha":null,"homepage":"https://jamf.github.io/ManagedAppConfigLib/documentation/managedappconfiglib/","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/jamf.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2017-07-27T19:44:23.000Z","updated_at":"2024-08-21T10:34:29.000Z","dependencies_parsed_at":"2022-08-14T12:31:19.372Z","dependency_job_id":null,"html_url":"https://github.com/jamf/ManagedAppConfigLib","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamf%2FManagedAppConfigLib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamf%2FManagedAppConfigLib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamf%2FManagedAppConfigLib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamf%2FManagedAppConfigLib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jamf","download_url":"https://codeload.github.com/jamf/ManagedAppConfigLib/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228030029,"owners_count":17858432,"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":["appconfig","cocoapods","ios","ios-development","macos","macos-development","swift","swift-package-manager","swiftpackage","swiftui","tvos","tvos-development"],"created_at":"2024-12-04T02:12:10.382Z","updated_at":"2024-12-04T02:12:10.860Z","avatar_url":"https://github.com/jamf.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ManagedAppConfigLib\n\n## Overview\nThe purpose of ManagedAppConfigLib is to make it much easier to work with Apple's\n[Managed App Configuration](https://developer.apple.com/library/content/samplecode/sc2279/Introduction/Intro.html)\nby providing a class that manages access to it, as well as some property wrappers for modern Swift usage.\n\nManaged App Configuration is supported by Apple on iOS 7+, macOS 11+, and tvOS 10.2+.\n\n## Installation\n\n### CocoaPods\n\nInstall via [Cocoapods](https://guides.cocoapods.org/using/getting-started.html) by adding the following to your Podfile under your desired targets:\n\n```ruby\npod 'ManagedAppConfigLib'\n```\n\n### Swift Package Manager\n\nInstall with [Swift Package Manager](https://github.com/apple/swift-package-manager) by adding the following to your `Package.swift` file:\n\n```swift\ndependencies: [\n    .package(url: \"https://github.com/jamf/ManagedAppConfigLib\")\n],\n```\n\n## Learn More\n\n[The documentation](https://jamf.github.io/ManagedAppConfigLib/documentation/managedappconfiglib/)\nfor this package was generated by [DocC](https://developer.apple.com/documentation/docc)\nusing [publish_docs.yml](https://github.com/jamf/ManagedAppConfigLib/blob/main/.github/workflows/publish_docs.yml) with GitHub Actions.\n\n## Basic Usage\nYou will need to `import ManagedAppConfigLib` in each Swift file you wish to use it.\n\n###  SwiftUI Property Wrapper\n\nFunctions much like the [@AppStorage](https://developer.apple.com/documentation/swiftui/appstorage)\nproperty wrapper built in to SwiftUI.  Provides a type-safe read-only property that keeps itself\ncurrent with any changes in the AppConfig value, and causes a SwiftUI redraw when it's value changes.\n\n```swift\n// If AppConfig \"title\" doesn't exist or is not a string, will have the value \"Default title\".\n@AppConfig(\"title\") var title = \"Default title\"\n// If AppConfig \"featureEnabled\" doesn't exist or is not a boolean, will have the value `false`.\n@AppConfig(\"featureEnabled\") var isEnabled: Bool = false\n// If AppConfig \"orgColor\" doesn't exist or is not a string, this will be nil.\n@AppConfig(\"orgColor\") var organizationHexColor: String?\n```\n\n###  Non-SwiftUI Property Wrapper\n\nFunctions much like the `@AppConfig` property wrapper except that it does not require SwiftUI.\nProvides a read-only property that keeps itself current with any changes in the AppConfig value.\nThis is useful for UIKit or AppKit code or simple Foundation code in models or cli tools.\n\n```swift\n@AppConfigPlain(\"title\") var title = \"Default title\"\n@AppConfigPlain(\"featureEnabled\") var isEnabled: Bool = false\n@AppConfigPlain(\"orgColor\") var organizationHexColor: String?\n```\n\n###  Simple functional use\n\n* Retrieve a Managed App Configuration value\n```swift\nif let deviceId = ManagedAppConfig.shared.getConfigValue(forKey: \"deviceId\") as? String {\n    print(deviceId)\n}\n```\n\n* Register a closure to be executed when Managed App Configuration changes\n```swift\nlet myClosure = { (configDict: [String: Any?]) -\u003e Void in\n    print(\"Managed App Configuration changed\")\n}\nManagedAppConfig.shared.addAppConfigChangedHook(myClosure)\n\n```\n\n* Place a value into Managed App Feedback\n```swift\nlet numberOfErrors = 0\nManagedAppConfig.shared.updateValue(numberOfErrors, forKey: \"errorCount\")\n```\n\n## Contributing\n\nThis repository now requires verified signed commits.  You can find out more about\n[signing commits on GitHub Docs](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamf%2Fmanagedappconfiglib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjamf%2Fmanagedappconfiglib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamf%2Fmanagedappconfiglib/lists"}