How to retrieve Serial Number of USB Flash Drive connected with iPhone?

Hi Team,

For our project requirement, we are developing iOS application inorder to retrieve Serial No. of USB flash drive programatically.

Need your help in obtaining clarification on below query

Query:

i) We are accessing flash drive using "UIDocumentPickerViewController". Is there any class/method which can help us to get serial number of USB flash drive connected with iPhone13(Using lightening OTG adaptor)?

There is an API:

IORegistryEntrySearchCFProperty

It lets you retrieve the serial number

if let sSerial : CFTypeRef = IORegistryEntrySearchCFProperty(ioService, kIOServicePlane, key as CFString, nil, options) {

Please tell if you need more example of how to use.

How to retrieve Serial Number of USB Flash Drive connected with iPhone?
 
 
Q