Cant you just use the wp_head
action for this?
I mean something like this:
function add_meta_tags() {
?>
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
<?php }
add_action('wp_head', 'add_meta_tags');
Should work perfectly.