Determining Message Type - Apple iOS