HELSINKI (Reuters) - Ailing Nokia said on Tuesday it had ended a legal battle with Apple, which will pay an undisclosed one-off fee and ongoing royalties to the Finnish firm.