{"id":16697736,"url":"https://github.com/leonatan/lnpropertylisteditor","last_synced_at":"2025-03-17T00:33:49.147Z","repository":{"id":63916562,"uuid":"129674705","full_name":"LeoNatan/LNPropertyListEditor","owner":"LeoNatan","description":"A property list editor for AppKit, similar to the editor in Xcode.","archived":false,"fork":false,"pushed_at":"2023-12-08T21:06:35.000Z","size":3833,"stargazers_count":103,"open_issues_count":2,"forks_count":18,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-02-11T13:51:15.255Z","etag":null,"topics":["editor","macos","objective-c","plist","property-lists","swift"],"latest_commit_sha":null,"homepage":"","language":"Objective-C","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/LeoNatan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"LeoNatan","custom":["paypal.me/LeoNatan25"]}},"created_at":"2018-04-16T02:40:36.000Z","updated_at":"2025-01-28T03:38:05.000Z","dependencies_parsed_at":"2024-10-27T12:00:44.464Z","dependency_job_id":null,"html_url":"https://github.com/LeoNatan/LNPropertyListEditor","commit_stats":{"total_commits":90,"total_committers":3,"mean_commits":30.0,"dds":"0.28888888888888886","last_synced_commit":"b04f7b2cbcdb756f8f4b8fc0fdfccbe066d2345e"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeoNatan%2FLNPropertyListEditor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeoNatan%2FLNPropertyListEditor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeoNatan%2FLNPropertyListEditor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeoNatan%2FLNPropertyListEditor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LeoNatan","download_url":"https://codeload.github.com/LeoNatan/LNPropertyListEditor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243835942,"owners_count":20355611,"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":["editor","macos","objective-c","plist","property-lists","swift"],"created_at":"2024-10-12T17:49:05.041Z","updated_at":"2025-03-17T00:33:47.547Z","avatar_url":"https://github.com/LeoNatan.png","language":"Objective-C","funding_links":["https://github.com/sponsors/LeoNatan","paypal.me/LeoNatan25"],"categories":[],"sub_categories":[],"readme":"# LNPropertyListEditor\n\nA property list editor for macOS, similar to the one implemented in Xcode, but with several quality of life additions, such as a visual date/time picker and a full hex editor for data objects.\n\nThe framework has full support for macOS light and dark appearance.\n\nBy implementing the `LNPropertyListEditorDataTransformer` protocol, you can significantly augment the way property list data is presented in the editor and represented on-disk.\n\n![Property list editor](Supplements/Screenshot_1_Dark.png \"Property list editor\")\n\n![Property list editor](Supplements/Screenshot_2_Dark.png \"Property list editor\")\n\n## Adding to Your Project\n\n### Swift Package Manager\n\nSwift Package Manager is the recommended way to integrate LNPropertyListEditor in your project.\n\nLNPropertyListEditor supports SPM versions 5.1.0 and above. To use SPM, you should use Xcode 11 to open your project. Click `File` -\u003e `Swift Packages` -\u003e `Add Package Dependency`, enter `https://github.com/LeoNatan/LNPropertyListEditor`. Select the version you’d like to use.\n\nYou can also manually add the package to your Package.swift file:\n\n```swift\n.package(url: \"https://github.com/LeoNatan/LNPropertyListEditor.git\", from: \"1.0\")\n```\n\nAnd the dependency in your target:\n\n```swift\n.target(name: \"BestExampleApp\", dependencies: [\"LNPropertyListEditor\"]),\n```\n\n### Carthage\n\nAdd the following to your Cartfile:\n\n```github \"LeoNatan/LNPropertyListEditor\"```\n\nMake sure you follow the Carthage integration instructions [here](https://github.com/Carthage/Carthage#if-youre-building-for-ios-tvos-or-watchos).\n\n### Manual\n\nDrag the `LNPropertyListEditor.xcodeproj` project to your project, and add `LNPropertyListEditor.framework` to **Embedded Binaries** in your project target's **General** tab. Xcode should sort everything else on its own.\n\n### CocoaPods\n\nCocoaPods is not supported. There are many reasons for this. Instead of CocoaPods, use Carthage. You can continue using CocoaPods for for your other dependencies and Carthage for `LNPropertyListEditor`.\n\n## Using the Framework\n\n### Swift\n\nWhile the framework is written in Objective C, it uses modern Objective C syntax, so using the framework in Swift should be very easy and intuitive.\n\n### Project Integration\n\nImport the module in your project:\n\n```objective-c\n@import LNPropertyListEditor;\n```\n\n### Usage\n\nEither using Interface Builder or in code, add an `LNPropertyListEditor` view to your user interface.\n\nTo set a represented object, set the `propertyList` property.\n\n```swift\nguard let propertyListURL = Bundle.main.url(forResource: \"Some\", withExtension: \"plist\"),\n   let propertyListData = try? Data(contentsOf: propertyListURL),\n   let propertyListObject = try? PropertyListSerialization.propertyList(from: propertyListData, options: [], format: nil) as? [String: AnyObject] else {\n\treturn\n}\n\nplistEditor.propertyListObject = propertyListObject\n```\n\nSupported object types: Dictionaries, arrays, strings, dates, datas, booleans and numbers (dictionaries and arrays can contains nested children of the aforementioned types).\n\n#### Delegate\n\nImplement the `LNPropertyListEditorDelegate` protocol to listen to various events, or control what aspects of the property list can be edited.\n\n```swift\nplistEditor.delegate = self\n//...\nfunc propertyListEditor(_ editor: LNPropertyListEditor, didChange node: LNPropertyListNode, changeType: LNPropertyListNodeChangeType, previousKey: String?) {\n\tswitch changeType {\n\tcase .insert:\n\t\tprint(\"🎉\")\n\tcase .move:\n\t\tprint(\"➡️\")\n\tcase .update:\n\t\tprint(\"🔄\")\n\tcase .delete:\n\t\tprint(\"🗑\")\n  @unknown default:\n\t\tfatalError()\n\t}\n}\n```\n\nFor full documentation, see the `LNPropertyListEditor.h` header.\n\n#### Data Transformer\n\nImplement the `LNPropertyListEditorDataTransformer` protocol to provide display and data transformations for your property list objects.\n\n```swift\nplistEditor.dataTransformer = self\n//...\nfunc propertyListEditor(_ editor: LNPropertyListEditor, displayNameFor node: LNPropertyListNode) -\u003e String? {\n\t// ...\n\tif let key = node.key,\n\t   key == \"CFBundleShortVersionString\" {\n\t\treturn \"Bundle version string (short)\"\n\t}\n\t//...\n}\n```\n\nFor full documentation, see the `LNPropertyListEditor.h` header.\n\n## Acknowledgements\n\nThe framework uses:\n\n* [HexFiend](https://github.com/HexFiend/HexFiend) © ridiculous_fish, 2011-2020\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleonatan%2Flnpropertylisteditor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleonatan%2Flnpropertylisteditor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleonatan%2Flnpropertylisteditor/lists"}