This is crazy trying to get Xcode to work with Perforce. Here is the solution I came up with:
- Quick setup
- Muscles are easy to write, so you donβt need to think to check files.
- Requires no mouse at all
One-time setup:
- Download and install the free DTerm app from Decimus Software.
- Make sure you have the Perforce command-line tool installed. Type "p4" at the terminal command line and see if it recognizes this command. If not, you need to go to the Perforce website and find and download what they currently call the "Perforce (P4) command line client." There is no installer; just save it from your browser directly to
/usr/bin (or something else) and do chmod + x on it. For official customization notifications, and if you need to do any custom environmental tricks, see this tech note .
Once you do this, say you are in Xcode and you are viewing the source code file that you want to verify. Here's rigamarole:
- Display the file in the active Xcode editor
- Press
Shift Command Enter to get the DTerm window - Type
p4 edit , and then press Shift Command V to insert the file name of the active file, and press return - Perforce checks the file and DTerm shows you status / errors.
- Click Escape to close the DTerm window.
- Start making changes to the file in Xcode. Xcode can (erroneously) say that the file is read-only, because it is dumb and does not know that it is made from read-only read-write, so you need to click Allow editing. At first I did not trust this and twice tested it several times, but now I have a blind faith that he is doing the right thing.
I did not ask this after a while, so please let me know if you encounter any glitches, and I will update the information here to make it as painless as possible. But otherwise, this is the best solution I have found.
Jeffro
source share