How to stop iTunes opening automatically
When you plug in your iDevice by default iTunes will automatically open and attempt to sync new content and changes on that device with your Mac.
For many people, particularly those who prefer not to use iTunes, having it open automatically every time their iPhone or iPad is plugged in is an annoying inconvenience.
Fortunately preventing iTunes from opening automatically is quite easy to do, however it does have a couple of side effects that some users may find undesirable.
Stop iTunes from opening when a device is plugged in
To stop iTunes opening automatically, plug your iPhone or iPad in to your Mac and navigate to the settings page within iTunes for that device. Scroll to the bottom, and you should see an options panel that looks something like this:
Then uncheck "Automatically sync when this iPhone/iPad is connected" and repeat the process for any additional devices you own.
This will stop iTunes from opening whenever a that particular device is connected, however it also means that the device will no longer be synced automatically. This can be somewhat mitigated if the option "Sync with this iPhone/iPad over Wi-Fi" remains checked. Alternatively, you can manually sync the device by pressing the Sync button at the bottom of the device's settings page in iTunes.