0

In the past, I've been using a simple script (provided by the Perforce site here to automatically check out files when I begin editing them in Xcode. After updating to OSX Mavericks and Xcode, the script stopped working - it no longer checked files out nor did it display a popup notifying of an error like it used to do.

Now, Perforce has updated the help article linked above with a new script supposedly for Xcode 5. This script does not work for me though. Initially, I was receiving errors that p4 was not located in the usr/local/bin directory. I corrected the script to point to usr/bin instead (where p4 is located). At this point I began getting errors that the $P4PORT was incorrect and a connection could not be made. I ended up manually putting the necessary credentials into the xcodeunlock.sh file (as directed in the linked article. At this point, when editing a file a popup would appear, but it would be blank. The file would not be checked out.

I'm now at a loss of how to proceed. The scripts fail for me in all the configurations I've tried. I've updated Xcode and Perforce to the most recent versions to no avail. Is there a way to get these two guys to play nice again?

Related: Perforce Checkout Macro for XCode4

Community
  • 1
  • 1
Doc
  • 1,480
  • 2
  • 16
  • 28
  • The answer is probably simple; for example you're not logged in, or your P4CONFIG isn't being picked up. Can you run the 'p4 edit' command at the command line? Can you run plain old 'p4 set' at the command line to confirm that your P4CONFIG is being picked up? Does 'p4 info' show that the configuration is selecting the correct P4PORT and P4CLIENT values? – Bryan Pendleton Feb 11 '14 at 14:48
  • Yes I can run the p4 edit command. Yes, running p4 set returns all the correct arguments from my P4CONFIG - including P4PORT, P4CLIENT, P4USER, and P4PASSWD. And yes, p4 info shows all the correct connection info. – Doc Feb 11 '14 at 15:57
  • 2
    I just set it up against Xcode 5.0.2. Make sure you grabbed the correct script. I very nearly grabbed the 4+ version. The only change I made was changing the source line at the top to source my .profile file. – Matt Feb 12 '14 at 07:52
  • @Matt the source line was the problem. Thanks for pointing it out. – Doc Feb 12 '14 at 14:47

0 Answers0