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?
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.
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.
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.
Related
How to get the exe from https://github.com/tsenart/vegeta/releases in order to test in windows?
This says I could find the .exe in this link but I don't.
I am trying to load test the apis in windows, as a start.
I do no know Golang and this project is developed using Go.
I would appreciate any directions on how to go about this. Thank you
For this version they didn't provide an executable for windows. If you check one minor version lower you find a .zip with an executable in it. If you need v12.8.4 you could write the people of the repository or just compile the code by yourself.
It looks like they only have executables ready to download for MacOS and linux on the newest version.
Version 12.8.3 however has a windows download.
Is there a way or steps to follow to integrate a yocto SDK (standard or extensible) with VSCode? I want to cross-compile, remote connect, and debug a C/C++ application within VSCode for target hardware using a yocto generated Linux image. Is this possible? I know of the bitbake extension but couldn't find one for the SDK. Thank you!
Conservatively, I would say it depends on the level of integration you want to achieve but I use regularly VS Code to edit and build, sometime to debug C applications using a Yocto toolchain, that's really easy for Makefile projects for example.
Assuming you do not ask for Yocto integration into VS Code (I don't know if something exists) but really to use the tools generated by the SDK from Yocto and that you already are familiar with Yocto toolchain usage.
I personally compile on Linux server remotely from a Windows PC. The server contains therefore my projects and the Yocto toolchain.
I use for that the nice Remote SSH extension from Microsoft on VS Code. From there, I can edit easily the files, compile and a terminal is available (that's out of the scope of your question however).
So if working as me or directly in Linux, you can create a Makefile/CMake project for example. The C/C++ VS Code extension is a must have.
Each time you start working, you source the Yocto SDK toolchain and compile directly using make from the terminal window of VSCode. If you want to automatize the build step, you can use the task feature of VS which allows you to launch build script for example.
Regarding the remote connect, the terminal window of VS can also have multiple sub-windows with various connections like SSH to the target. The build script can also use scp to send the generated binary directly to the target but your question is vague regarding what you want to do.
Finally for the debug aspect, GDB is well supported in VS Code and the official doc is a good start as well as the C++ debugging doc.
On the Yocto side, you need to add gdbserver to the image running on the target, it can be done by adding the following to your conf/local.conf:
EXTRA_IMAGE_FEATURES += "tools-debug"
If you want to have debug information for the shared libs on the target, you also need to add:
EXTRA_IMAGE_FEATURES += "dbg-pkgs"
Finally, the SDK must be generated with the same options as the image running on the target and will contain the cross-gdb tool like -gdb to be used on the host side.
So that's possible but requires some setup especially the debug part. As far as I know, there is not a VS Code extension managing all these steps for you automagically.
This is called though cocoa.h and foundation.h, then NSURLError.h. Not sure why this compiler error just came up when I added portaudio and some other needed frameworks. The error first comes from some existing code. Indeed, there is no CoreServices/CoreServices.h anywhere on the whole system. Do I need to update Xcode?
I found an Apple help answer that said "Those are not makefile directives. How are you trying to build it? Most projects like this come with "configure" scripts that you just need to run from the command line. The only thing you need from Xcode are the Command Line Tools." I don't know what this means or how to do this.
I did run the port audio/configure terminal script, but saw nothing about CoreServices.h being generated. Where does this need to come from?
Thanks.
I further note that in the CoreServices frameworks directory associated with the Xcode project, there is a terminal file called "CoreServices" that when run, generates the error "CoreServices.framework/Versions/A/CoreServices: cannot execute binary file" . What could it be missing?
It's hard to answer your question in this specific case but:
I believe that CoreServices.h can be found at /System/Library/Frameworks/CoreServices.framework/Versions/A/Headers/CoreServices.h, is it not the case on your machine? If not, you might have to re-install Xcode
To install PortAudio, you can also use brew with the command brew install portaudio and then link your project with its headers and libs (/usr/local/Cellar/portaudio/19.6.0/include and /usr/local/Cellar/portaudio/19.6.0/lib) in your Xcode project (under the tab Build Phases > Link Binary with Libraries). That might be the easiest option.
I'm new to socketrocket and to iOS development. I'm trying to follow along at https://github.com/square/SocketRocket#readme and implement the basic test chat app but am having trouble making things work.
Beginning with "go into the SocketRocket root directory and type: make test" i need some help.
Using the mac terminal, 'make' isn't a recognized command. Do i need to have python enabled on my mac for this to work at all? Trying to run the testapp in xcode before the server is started does nothing.
A more bare bones explanation would be most appreciated
You need to install command line tools. make is for compiling c code (among other things) command line tools can be downloaded with xcode through the app store.
I'd like to use clang on my Xcode iPhone project. However this is the getting started guide:
http://clang.llvm.org/get_started.html
I've been working with Xcode for a year but this is far far far from being understandable to me! Can anyone explain in plain english how to install and use Clang with my existing iPhone project? I am not familiar with loading things from the console.
Thanks!
Dan
Nikita Zhuk has wrapped Clang in a GUI and made it available at http://www.karppinen.fi/analysistool/. Very useful.
Download and extract the clang distribution to some directory. Optionally add this directory to your path, or you can just prepend it's location to the command line later on.
cd to your top level project directory (probably something like cd ~/Documents/yourprojectdirectory)
Tell the clang utility to do a build of your project using your xcode project settings by typing in the following command line: pathtoclangdirectory/scan-build -o ./clang_out xcodebuild
The utilty should give you a message after it has run successfully to run the scan_view utility.
Run the command that was output at the end of the build. This will start a temporary web server on your machine and then open up Safari and show you the code analysis. You may need to prepend the path to your clang directory again, like so: pathtoclangdirectory/scan_view ...
I didn't see this question until after I had done something similar to make Clang more useful inside XCode:
Using Clang Static Analyzer from within XCode