I need to open p12 file from other iOS applications to import private key to my application. My app is set up to be able to open any file with following plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" ".0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeName</key>
<string>Files</string>
<key>LSHandlerRank</key>
<string>Default</string>
<key>LSItemContentTypes</key>
<array>
<string>public.item</string>
<string>public.data</string>
<string>public.content</string>
</array>
</dict>
</array>
</dict>
</plist>
But my don't appear in share dialog from Files or Mail app for example. There are however other third party apps that can accept this file. Some of them use Share extension which I don't have, but some of them don't have it as far as I can understand. At least they don't present any UI and open apps directly.
Also I've tried to specify com.rsa.pkcs-12 UTI directly but it didn't help. Also noticed that *.crt files have similar behaviour.
Am I missing something about this specific file type?
I need to open p12 file from other iOS applications to import private key to my application. My app is set up to be able to open any file with following plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeName</key>
<string>Files</string>
<key>LSHandlerRank</key>
<string>Default</string>
<key>LSItemContentTypes</key>
<array>
<string>public.item</string>
<string>public.data</string>
<string>public.content</string>
</array>
</dict>
</array>
</dict>
</plist>
But my don't appear in share dialog from Files or Mail app for example. There are however other third party apps that can accept this file. Some of them use Share extension which I don't have, but some of them don't have it as far as I can understand. At least they don't present any UI and open apps directly.
Also I've tried to specify com.rsa.pkcs-12 UTI directly but it didn't help. Also noticed that *.crt files have similar behaviour.
Am I missing something about this specific file type?
Share Improve this question edited yesterday Peter K asked 2 days ago Peter KPeter K 4583 silver badges11 bronze badges 3 |1 Answer
Reset to default 0So I've duplicated this question to Apple support forum and it looks like it is current known behaviour. https://developer.apple/forums/thread/779223
As for other app as far as I understand they use share extensions to open this kind of file. And ones that I thought don't use share extension actually use it but without proper UI and invoking opening main app using objective C runtime to overpass extension limitations that is actually looks like a bad way to use extension. Some of the ways to do this may be found here. Also I've tried sample app with Action extension it works with p12 as well.
LSItemContentTypes
looks wrong. I don't know what the UTI is for a .p12 file, but I daresay it's not public.item, public.data, or public.content. – Duncan C Commented 2 days agopublic.data
andpublic.content
and my app doesn't appear either when trying to share a p12 file. I see various cloud apps (Dropbox, Drive, etc) and messaging apps (WhatsApp, Telegram, etc). I'm curious what is needed. – HangarRash Commented 2 days ago