{"id":15293617,"url":"https://github.com/inloop/mimeresolver","last_synced_at":"2026-01-05T21:32:41.231Z","repository":{"id":56920521,"uuid":"71014024","full_name":"inloop/MIMEResolver","owner":"inloop","description":"µ framework for resolving MIME type from Data objects.","archived":false,"fork":false,"pushed_at":"2017-10-02T20:52:02.000Z","size":552,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-04T12:41:59.301Z","etag":null,"topics":["carthage","cocoapods","cross-platform","framework","resolving-mime","swift-3"],"latest_commit_sha":null,"homepage":null,"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/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-10-15T21:19:10.000Z","updated_at":"2016-10-15T21:22:42.000Z","dependencies_parsed_at":"2022-08-20T21:50:23.294Z","dependency_job_id":null,"html_url":"https://github.com/inloop/MIMEResolver","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inloop%2FMIMEResolver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inloop%2FMIMEResolver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inloop%2FMIMEResolver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inloop%2FMIMEResolver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/inloop","download_url":"https://codeload.github.com/inloop/MIMEResolver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245294768,"owners_count":20591909,"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":["carthage","cocoapods","cross-platform","framework","resolving-mime","swift-3"],"created_at":"2024-09-30T16:50:12.006Z","updated_at":"2026-01-05T21:32:41.201Z","avatar_url":"https://github.com/inloop.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MIMEResolver \n[![Build Status](https://travis-ci.org/inloop/MIMEResolver.svg?branch=master)](https://travis-ci.org/inloop/MIMEResolver) [![CocoaPods](https://img.shields.io/cocoapods/v/MIMEResolver.svg)]() [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![Platforms](https://img.shields.io/cocoapods/p/MIMEResolver.svg?style=flat)]() [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/inloop/MIMEResolver/master/LICENSE)\n\nµ framework for resolving MIME type from Data objects.\n\n* [Usage](#usage)\n* [Supported MIME types](#supported-mime-types)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Support](#support)\n* [Contributing](#contributing)\n* [License](#license)\n\n## Usage\n\n```swift\n// Import module\nimport MIMEResolver\n\n// create MIMEResolver instance\nlet resolver = MIMEResolver()\n\n// register types that you are interested in\nresolver.register(mimeType: Gif.self)\nresolver.register(mimeType: Png.self)\n\n// resolve MIME type\nlet mime = resolver.resolve(data) \n\n// do something\nprint(mime.signature)\nprint(mime.contentType)\nprint(mime.validExtensions)\n\nif mime is Gif.Type {\n  playGif(from: data)\n}\n\n```\n\n## Supported MIME Types\n- [x] `image/x-ms-bmp`\n- [x] `image/gif`\n- [x] `image/jpeg`\n- [x] `image/png`\n- [x] `image/iff`\n- [x] `image/vnd.microsoft.icon`\n\n## Requirements\n- iOS | watchOS | tvOS | macOS\n- Xcode 9+\n- Swift 4\n\n## Installation\n### [Carthage](https://github.com/Carthage/Carthage)\nSpecify `MIMEResolver` repo in your `Cartfile`:\n\n```ogdl\ngithub \"inloop/MIMEResolver\"\n```\nRun `carthage update --platform [your platform of choice]` \n\n### [Cocoapods](https://cocoapods.org)\nAdd the following line to your target's dependencies in Podfile:\n```ogdl\npod 'MIMEResolver'\n```\n\n## Support\n\nPlease [open an issue](https://github.com/inloop/MIMEResolver/issues/new) for support.\n\n## Contributing\n\nPlease contribute using [Github Flow](https://guides.github.com/introduction/flow/). Create a branch, add commits, and [open a pull request](https://github.com/inloop/MIMEResolver/compare/).\n\n## License\n\nCopyright (c) Inloop, s.r.o.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finloop%2Fmimeresolver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finloop%2Fmimeresolver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finloop%2Fmimeresolver/lists"}