Best way to connect a ps3 controller?

I am having hard time connecting my ps3 controller one day it’s working fine the next day it just won’t connect or just doesn’t want to work. I try it with mame works with no problem connects easly and works good then I go back to retroarch and still noting Is there something or some way or some steps I have to do to get this working regularly? Thanks I am on ios7 704 with ipad4

Try to turn on BTstack in the iOS Settings before launching RetroArch. Then open RA and push ps3-button. I have iPad 4 too, but haven’t such problems.