Updated code to check if iPad or iPhone