sd card - Enumerate mounted volumes on iOS -
following code works fine on macos, return empty list on ios sandisk «sandisk ixpand» flash drive:
nsarray *keys = [nsarray arraywithobjects:nsurlvolumenamekey, nsurlvolumeisremovablekey, nil]; nsarray *urls = [[nsfilemanager defaultmanager] mountedvolumeurlsincludingresourcevaluesforkeys:keys options:0]; nslog(@«%@», urls); // print «null» (nsurl *url in urls) { nserror *error; nsnumber *isremovable; nsstring *volumename; [url getresourcevalue:&isremovable forkey:nsurlvolumeisremovablekey error:&error]; if ([isremovable boolvalue]) { [url getresourcevalue:&volumename forkey:nsurlvolumenamekey error:&error]; nslog(@"%@", volumename); } } is there way list of mounted volumes on ios?
ios doesn't support mounting volumes or accessing them, why not getting list of mounted volumes.
the ixpand device accessed through sandisk app.
Comments
Post a Comment