1

I'm new with XCode and still trying to understand objective-C. I'm using xcode 4.3.2, and I have to create an app that integrates with PJSIP.

I found this link. I am still confused about that link, because the article said that we must have installed the command line tool. But the command line tool is already installed in my XCode. How can i use it?

Do I need to create a view base application? how can I run the command line tool like the link says?

j0k
  • 22,600
  • 28
  • 79
  • 90
Alfred Angkasa
  • 1,381
  • 3
  • 17
  • 35
  • How did you install PJSIP? Did you have to build it, or was a binary download available? – trojanfoe Jul 30 '12 at 09:35
  • actually i just download the .zip file, after that i extract it. and finally don't know how to use it, then i search for the article and found that link. Do you ever use the PJSIP? – Alfred Angkasa Jul 30 '12 at 09:42
  • The Xcode installer installs command-line tools in /Developer/usr/bin. you can find it that path. – M.B Jul 30 '12 at 09:04
  • 1
    Not any more it doesn't. Xcode 4 now comes as a bundle and doesn't use the `/Developer/` folder any more. The path you are talking about is `/Applications/Xcode.app/Contents/Developer/usr/bin` – Abizern Jul 30 '12 at 09:17
  • @Abizern i just found alot of command line at /Applications/Xcode.app/Contents/Developer/usr/bin. how can i use it? there are instruction like this "$ cd /path/to/your/pjsip/dir $ ./configure-iphone $ make dep && make clean && make". How can i run it? – Alfred Angkasa Jul 30 '12 at 09:24

3 Answers3

3

The command line tools allow you to compile "traditional UNIX programs" from source, generally using make. If you are using Xcode to create your projects then you don't even need them installed.

EDIT OK you have edited your question, stating the real issue you are facing; You don't know how to use the PJSIP package you have installed. The link you reference is about building PJSIP, not using it, so you can still forget about the command line and concentrate on how to configure your Xcode project to use PJSIP. This will require setting the header search paths and library search paths to find the header files and library file, in order to compile and link against it. Hopefully it's a static library as that will be easier to use; if it's a dynamic library or framework then you have your work cut-out as that's much harder to use.

trojanfoe
  • 120,358
  • 21
  • 212
  • 242
  • Unless you want to use the version of git that comes with Xcode if you don't already have it installed – Abizern Jul 30 '12 at 09:04
  • thanks for your answer.this is the link http://trac.pjsip.org/repos/wiki/Getting-Started/iPhone#OtheriPhoneProjects, but i still don't know how to use the command tool. should i create a new project->view base app first? – Alfred Angkasa Jul 30 '12 at 09:07
  • @Abizern But as mentioned, if you are using Xcode, then you won't be going near the command line anyway. – trojanfoe Jul 30 '12 at 09:07
  • @AlfredAngkasa OK you didn't mention anything about PJSIP in your question, and so your question should have been about how to build it rather than about the command line. – trojanfoe Jul 30 '12 at 09:09
  • I'm just pointing it out incase somebody wants to use git but doesn't want to install it themselves. You can use the basics of it through Xcode without going to the command line. – Abizern Jul 30 '12 at 09:13
  • @trojanfoe thanks for your answer. i will make this usefull by click it once. thanks. – Alfred Angkasa Jul 30 '12 at 10:01
1

In newer XCode (4.3 or above) you might have to install command line tools since it has been made optional. Open XCode and go to XCode->Preferences

Open the Downloads panel and click on "Components". If Command Line Tools are not installed already, you will get an option to install them from here.

Do so and you are set.

lostInTransit
  • 70,519
  • 61
  • 198
  • 274
0

I done with it by myself. if you face the same problem, you can refer to this link, I already tried and run it. It works both on simulator and device. thanks.

Community
  • 1
  • 1
Alfred Angkasa
  • 1,381
  • 3
  • 17
  • 35