How do I update a node's file field from within a module?
The file field type has a fid column (file ID); you just need to save the file so an ID is populated, and add it to the node like this:

$file = file_uri_to_object('/tmp/new.zip');  
$file-&gt;status = FILE_STATUS_PERMANENT; 
file_save($file);

$node-&gt;field_ios_file[LANGUAGE_NONE][0]['fid'] = $file-&gt;fid;
node_save($node);