KSOFileMagic is a iOS/macOS framework that wraps the Darwin file command, which can determine file type by examining file contents. This can be used to identify a file without a file extension or raw data from the network when a MIME type is not provided. The framework prefers to use the UTType family of functions to determine type, but falls back to examining file contents if a file extension is not provided or when examining NSData
instances.
You can install KSOFileMagic using cocoapods, Carthage, or as a framework.
When installing as a framework, ensure you also link to Stanley as KSOFileMagic relies on it.
Third party:
Apple:
MobileCoreServices
,iOS
CoreServices
,macOS