Hi, I want to read the file type from a downloaded file in iOS which does not have an extension.
Eg: http://somelink/2a3bc
Its a valid pdf file. When I download it gets downloaded as NSData stream at a url(NSURL). if I rename it to 2a3bc.pdf it can be previewed using UIDocumentInteractionController but when I open the url without extension it does not recognise it as file valid file. Its UTI becomes public.data
Is there any way I can read the file type from NSData and rename the file according to that and open it using UIDocumentInteractionController.
Regards, Nandu Ahmed