Connecting a Phone Via Usb


hi there,

im new to macs, so i'm not sure where everything is located. but here is my question, i'm writing a program in xcode to connect to the phone via usb. but everytime i try to open the device, i get a device already opened error. so i'm wondering if you know of any automated tasks that happen when i connect a phone to it. i went into the network in the system preferences and saw that it was trying to open it as a modem (communications device). going into the network port configurations, i unchecked the on check box.. but i am still getting that device already open error. so is there any other task that is opening it and can i stop it? thanks!

i actually found out that there's a usb class driver which is running and opening it first setting it up as a serial communications modem.