Putting together Jessy's answer in to a piece of code. The Update() and TapSelect() are put on any ONE Object in the scene. I put it ion my main game controller. The Selected goes on each object you to be able to select.
// Update is called once per frame
void Update () {
TapSelect();
}
void TapSelect() {
foreach (Touch touch in Input.touches) {
if (touch.phase == TouchPhase.Began) {
Ray ray = Camera.main.ScreenPointToRay(touch.position);
RaycastHit hit ;
if (Physics.Raycast (ray, out hit)) {
hit.transform.SendMessage("Selected");
}
}
}
}
public void Selected(){
Debug.Log("Selected",this);
}
This is in c#. When the screen is tapped the TapSelect does a Raycast and if anything is hit it sends the Selected() message to the transform.
That code uses ScreenPointToRay, which you should, but it also uses Input.mousePosition, which is not right on iOS. The thing you'll need to replace it with is a Touch.position.
There are some examples in the documentation about how to code input for iOS: