clean up iOS hardware table
use NSError api
replace with NSError