Latest 0.0.2
Homepage https://github.com/zshannon/ZCSFileExtensionForMimeType
License MIT
Platforms ios 7.0, requires ARC
Authors

Add to your Podfile

pod 'ZCSFileExtensionForMimeType', '~> 0.0.1'

Use in your project

Setup

#import "ZCSFileExtensionForMimeType.h"

// Somewhere you've already gotten a mime_type for your file.
NSString *mime_type = @"audio/mp4";
// Now you want the correct file extension. Save your file at a path
// terminated with this extension so iOS won't crap the bed sometimes.
NSString *file_extension = [ZCSFileExtensionForMimeType extensionForMimeType:mime_type];

Contributing

Send me Pull Requests here, please.

Latest podspec

{
    "name": "ZCSFileExtensionForMimeType",
    "version": "0.0.2",
    "summary": "iOS is sometimes stupid picky about file extensions. These are the extensions it usually wants.",
    "description": "                   iOS's Media Libaries (AVAudioPlayer, AVMoviePlayer, etc.) have a lot of unexpectedly buggy behavior if you pass them a file with an extension they don't expect. This utility will provide the file extension they expect for a given MIME type. It's still up to you to ensure the file has the correct extension on disk.n",
    "homepage": "https://github.com/zshannon/ZCSFileExtensionForMimeType",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Zane Shannon": "[email protected]"
    },
    "social_media_url": "http://twitter.com/ZaneShannon",
    "platforms": {
        "ios": "7.0"
    },
    "source": {
        "git": "https://github.com/zshannon/ZCSFileExtensionForMimeType.git",
        "tag": "0.0.2"
    },
    "source_files": "ZCSFileExtensionForMimeType.{h,m}",
    "requires_arc": true
}

Pin It on Pinterest

Share This