You should *always* speak to the seller first, and in terms of UK law, it's their responsibility to fix it (if they then pass it to the manufacturer that's fine, but in legal terms you should never go directly to the manufacturer).
If the manufacturer messes you around, you can't then go to the seller to ask for a replacement/refund as they could (rightly) say they haven't been given a chance to fix it. If you go to them, document it, and they send you to the manufacturer, you can then claim that you've given them a reasonable chance as it was their choice to delegate the repair to the manufacturer, not yours.
I've found that you can often use it to your advantage too - quite often shop workers (not Apple, but others, Argos are particularly bad with this) are trained/told to say that after 12 months there's nothing they can do, and that it's down to the manufacturer. Once you've gotten this, all it normally takes is a quick call/letter to their head office explaining that unless the device is repaired/replaced you'll report them for giving misinformation and refusing to take a request under the SOGA/CRA, and you'll be surprised how quickly the issue is resolved
.
That trick has worked a couple of times on "out of warranty" items from Argos - like an iron that died after 14 months.
[doublepost=1476270574][/doublepost]
If you purchased it in the UK, then it's UK law that applies, so it's 6 years if you can prove it should have lasted longer/had an inherent fault.
Where you live has nothing to do with it, but Apple can demand that you return it for repair in the UK, at your cost.