'Xcode'에 해당되는 글 2건

  1. 2014.07.24 Xcode 5.1.1 Command Line Tools 설치.(매버릭스)
  2. 2013.07.10 Pyhon 2.7.3 with Xcode 4

Mac OS X Mavericks에서 Xcode 5.1.1 업데이트를 한 후,

Command Line Tools 설치가 제대로 안된다.

이유 따지기전에, 일단 구글링을 해보니, 별도로 다운로드해서 설치해야된단다.

Xcode 메뉴에서 Open Developer Tool -> More Developer Tools... 선택하면 다운로드가능한 사이트로 연결된다.



command_line_tools_for_os_x_mavericks_late_july_2014

Posted by Jason Ryu
,


(http://stackoverflow.com/questions/5276967/python-in-xcode-4)




I figured it out! The steps look lengthy but it's not that bad at all.


  1. Open Xcode 4.
  2. In the menu bar, click "File" → "New" → "New Project…".
  3. Select "Other" under "Mac OS X".
  4. Select "External Build System" and click "Next".
  5. Enter the product name.
  6. For the "Build Tool" field, type in /usr/local/bin/python3 for Python 3 or /usr/bin/python for Python 2 and then click "Next". Note that this assumes you have Python installed in the typical location(s). if you are unsure as to where your Python executables are enter these commands into Terminal: which python3 and which python.
  7. Choose where to save it and click "Create".
  8. In the menu bar, click "File" → "New" → "New File…".
  9. Select "Other" under "Mac OS X".
  10. Select "Empty" and click "Next".
  11. Navigate to the project folder (it will not work, otherwise), enter the name of the Python file (include the ".py" extension), and click "Save".
  12. In the menu bar, click "Product" → "Edit Scheme…".
  13. Click "Run" in the left column.
  14. In the "Info" tab, click the "Executable" field and then click "Other…".
  15. Navigate to the executable from Step 6. You may need to use ⇧⌘G to type in the directory if it is hidden.
  16. Select the executable and click "Choose".
  17. For the "Debugger" field, select "None".
  18. In the "Arguments" tab, click the "Base Expansions On" field and select the target that is named the same as your project.
  19. Click the "+" icon under "Arguments Passed On Launch". You may have to expand that section by clicking on the triangle pointing to the right.
  20. Type in $(SOURCE_ROOT)/ and then the name of the Python file you want to test. Remember, the Python program must be in the project folder. Otherwise, you will have to type out the full path (or relative path if it's in a subfolder of the project folder) here. If there are spaces anywhere in the full path, you must include quotation marks at the beginning and end of this.
  21. Click "OK".
  22. Start coding.


Note that if you open the "Utilities" panel, with the "Show the File inspector" tab active, the file type is automatically set to "Default - Python script". Feel free to look through all the file type options it has to gain an idea as to what all it is capable of doing. The method above can be applied to any interpreted language. As of right now, I have yet to figure out exactly how to get it to work with Java; then again, I haven't done too much research. Surely there is some documentation floating around on the web about all of this.

Say, "Hello, code completion, auto-indentation, and syntax highlighting." Note that it's not as advanced as it is with C, C++, or Objective-C but it is better than using IDLE in my opinion.



Posted by Jason Ryu
,