{"id":19725369,"url":"https://github.com/bodacious/plistreadwrite","last_synced_at":"2025-07-10T07:04:17.853Z","repository":{"id":5731597,"uuid":"6943513","full_name":"Bodacious/PListReadWrite","owner":"Bodacious","description":"A Rubymotion module to make light work of writing to and reading from plist files. ","archived":false,"fork":false,"pushed_at":"2017-01-27T20:44:35.000Z","size":142,"stargazers_count":6,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-29T23:34:45.014Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/Bodacious.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-11-30T18:17:30.000Z","updated_at":"2021-09-22T10:55:52.000Z","dependencies_parsed_at":"2022-09-13T19:00:17.283Z","dependency_job_id":null,"html_url":"https://github.com/Bodacious/PListReadWrite","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Bodacious/PListReadWrite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bodacious%2FPListReadWrite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bodacious%2FPListReadWrite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bodacious%2FPListReadWrite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bodacious%2FPListReadWrite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Bodacious","download_url":"https://codeload.github.com/Bodacious/PListReadWrite/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bodacious%2FPListReadWrite/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264545017,"owners_count":23625387,"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-11T23:29:31.527Z","updated_at":"2025-07-10T07:04:17.838Z","avatar_url":"https://github.com/Bodacious.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PListReadWrite\n\nA Rubymotion module to make light work of writing to and reading from plist files.\n\n## Installation\n\nAdd the following to your app's Gemfile\n\n    gem 'plist_read_write'\n\nAlternatively, it's a small file so you can just copy/paste it directly to your app.\n\n## Example Usage\n\nLets assume we have this plist file in our resources directory...\n\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    \u003ckey\u003ejim\u003c/key\u003e\n    \u003cdict\u003e\n      \u003ckey\u003ename\u003c/key\u003e\n      \u003cstring\u003eJim\u003c/string\u003e\n      \u003ckey\u003eemail\u003c/key\u003e\n      \u003cstring\u003ejim@jimsemail.com\u003c/string\u003e\n    \u003c/dict\u003e\n    \u003ckey\u003ejane\u003c/key\u003e\n    \u003cdict\u003e\n      \u003ckey\u003ename\u003c/key\u003e\n      \u003cstring\u003eJane\u003c/string\u003e\n      \u003ckey\u003eemail\u003c/key\u003e\n      \u003cstring\u003ejane@janesemail.com\u003c/string\u003e\n    \u003c/dict\u003e\n  \u003c/dict\u003e\n\u003c/plist\u003e\n```\n\n... and we want to copy it over to our app's documents directory so we can update/edit the plist.\n\n``` ruby\n\n# Check if the plist exists in our documents dir\nPListRW.exist?(:users, :documentsDir) # =\u003e false\n\n# Check if the plist exists in our main bundle\nPListRW.exist?(:users, :mainBundle) # =\u003e true\n\n# Copy the plist file from the main bundle to the documents dir\nPListRW.copyPlistFileFromBundle(:users)\n\n# Fetch the object from the plist file\n@users_hash = PListRW.plistObject(:users, Hash) # =\u003e A hash containing the User data\n\n# Update the data\n@users_hash[:jim] # =\u003e { name: \"Jim\", email: \"jim@jimsemail.com\" }\n@users_hash[:jim][:name] = 'James'\n\n# Store the data back in the plist\nPListRW.updatePlistFileWithObject(:users, @users_hash)\n\n# Check this worked OK\nPListRW.plistObject(:users, Hash)[:jim][:name] # =\u003e \"James\"\n```\n\n## About Katana Code\n\nKatana Code are [iPhone app and Ruby on Rails Developers in Edinburgh, Scotland](http://katanacode.com/ \"Katana Code\").\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbodacious%2Fplistreadwrite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbodacious%2Fplistreadwrite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbodacious%2Fplistreadwrite/lists"}