-
-
Save steipete/aba63860d5e84e23bdc08b70200d5d2c to your computer and use it in GitHub Desktop.
investigating UTI issues we found for some users of https://pdfviewer.io/ in support...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// iOS 11 (my iPad + iPhone) | |
(lldb) po UTTypeCopyDeclaration(kUTTypePDF) | |
{ | |
UTTypeConformsTo = ( | |
"public.data", | |
"public.composite-\U200bcontent" | |
); | |
UTTypeDescription = PDF; | |
UTTypeIdentifier = "com.adobe.pdf"; | |
UTTypeTagSpecification = { | |
"public.filename-extension" = ( | |
); | |
"public.mime-type" = ( | |
"application/pdf" | |
); | |
}; | |
} | |
(lldb) p (BOOL)UTTypeConformsTo(kUTTypePDF, kUTTypeCompositeContent) | |
(BOOL) $15 = NO | |
(lldb) po kUTTypeCompositeContent | |
public.composite-content | |
(lldb) p (BOOL)UTTypeConformsTo(kUTTypePDF, kUTTypeData) | |
(BOOL) $17 = YES | |
(lldb) | |
// iOS 11 (Simulator) | |
(lldb) po UTTypeCopyDeclaration(kUTTypePDF) | |
{ | |
UTTypeConformsTo = ( | |
"public.data", | |
"public.composite-content" | |
); | |
UTTypeDescription = "PDF document"; | |
UTTypeIconFiles = ( | |
"pdf_20x20.png", | |
"pdf_20x20@2x.png", | |
"pdf_145x145.png", | |
"pdf_145x145@2x.png" | |
); | |
UTTypeIdentifier = "com.adobe.pdf"; | |
UTTypeTagSpecification = { | |
"public.filename-extension" = ( | |
); | |
"public.mime-type" = ( | |
"application/pdf" | |
); | |
}; | |
} | |
(lldb) p (BOOL)UTTypeConformsTo(kUTTypePDF, kUTTypeCompositeContent) | |
(BOOL) $1 = YES |
\U200b
is a zero-width space. Damn you, unicode.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The above is iOS 11b3 on both my iPad and my iPhone. Not sure what app corrupted the UTT but it seems there is a bug.