0
UIDocumentPickerViewController
を使用してSSL証明書をインポートするにはどうすればよいですか?UIDocumentPickerViewControllerインポートSSL証明書
let documentPicker: UIDocumentPickerViewController = UIDocumentPickerViewController(documentTypes: ["public.item"], in: UIDocumentPickerMode.import)
documentPicker.delegate = self
documentPicker.modalPresentationStyle = .formSheet
if #available(iOS 11.0, *) {
documentPicker.allowsMultipleSelection = false
}
UINavigationBar.appearance().tintColor = .green
self.present(documentPicker, animated: true, completion: completion)
しかし.cer
ファイルは、それを選択するために、常に無効です::
私はこのような何かやっている。また
を、私は、インポートする方法を見つけることができません拡張子のないファイル。
が重複する可能性:https://stackoverflow.com/a/42142790/1361672 – RLoniello
@ Ercell0それはまだ – pableiros
あなたがファイルにアクセスしているという回答が動作していませんdidPickDocumentAtURLのurl.startAccessingSecurityScopedResource()およびurl.stopAccessingSecurityScopedResource()を使用して、NSFileCoordinatorを使用してファイルにアクセスすることもできます。 – RLoniello