The use of Aotearoa to refer to the whole of New Zealand is a post-colonial usage.
In pre-colonial times, Māori do not have a commonly used name for the whole New Zealand archipelago.
Until the 20th century, 'Aotearoa' is used to refer to the North Island only.