Skip to content

Instantly share code, notes, and snippets.

@steipete
Last active July 13, 2017 22:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save steipete/aba63860d5e84e23bdc08b70200d5d2c to your computer and use it in GitHub Desktop.
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...
// 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" = (
pdf
);
"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" = (
pdf
);
"public.mime-type" = (
"application/pdf"
);
};
}
(lldb) p (BOOL)UTTypeConformsTo(kUTTypePDF, kUTTypeCompositeContent)
(BOOL) $1 = YES
@steipete
Copy link
Author

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.

@steipete
Copy link
Author

steipete commented Jul 13, 2017

\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