Xcode Install Requires iTunes to be Closed

When installing or updating Xcode you need to close iTunes for it to complete. If you’ve closed iTunes but still get this message:

In order to continue the install please quit iTunes

Open Activity Monitor and quit iTunes Helper. The installation will now finish.

This mainly seems to happen on beta versions of iTunes. The helper app runs to detect iOS devices being connected so it can auto-open iTunes.