I recently learned how to do this in pages, see below for quick tips on how to set this up.
Step 1: Open System Preferences and find "International"
Step 2: Click on "Input Menu"
Step 3: Find Māori, and click on tick box
Step 4: Also ensure that you tick the box at the bottom that says Show Input Menu in Menu Bar. This way you can change Input Language without having to go through this process.
Now in Pages, you can push the "`~" button in the top left corner along with your vowels to create Māori macrons.
ā ē ī ō ū