Smartphone Apple gick med på att betala upp till 500 miljoner dollar för att bromsa iPhone med ett föråldrat batteri