How to add libclang to xcode? - objective-c

I would love to do some syntax coloring and code completion on any given code. Ideas inspired from Apple video http://devimages.apple.com/llvm/videos/Libclang.mov
Can anyone tell me about a sample project which uses libclang to parse objective-c code?

Have a look at the Étoilé project: http://etoileos.com/news/archive/2010/10/15/1401/
There you'll find SourceCodeKit that integrates clang for syntax highlighting.
(Source: http://svn.gna.org/viewcvs/etoile/trunk/Etoile/Languages/SourceCodeKit/ )

Related

Equivalent to the Xcode playground in AppCode

I can not find any references to running xcode playgrounds in AppCode so am assuming that were not possible? Here is what an xcode playground looks like in AppCode: I am not even sure where to find the source code.
Is there any way to run/debug a snippet of swift code in AppCode?
Create a new command line tool project with swift language, you will get a clean project that can run swift code directly.
Playground is not supported in AppCode at this moment (v2022.2): https://www.jetbrains.com/help/objc/ac-mg-xcode-features-unvailable.html

Migrate and add Swift to existing Objective-C project

I have an old project that I built on iOS 7 with Xcode 5. Recently I upgraded to Xcode 6 GM. I opened that project in new Xcode and tried adding this swift code to one of my method in v1Album.m file.
let alertController = UIAlertController(title: "Hey AppCoda", message: "What do you want to do?", preferredStyle: .Alert)
I get an error saying Use of undeclared identified let
I have been searching, trying to see what I need to do, what settings I need to change in my project in order for it to start recognizing swift code. Every tutorial online I see is explaining how to start writing swift code in a brand new project. All I need is to be pointed in the right direction.
EDIT:
What I have read so far on migrating project to swift from Apple Doc here is that
in order to write swift code I need a brand new swift class
I need to rewire all my objective-c code from v1Album.m to v1Album.swift
Then I deselect v1Album.m from my project.
I cannot use swift code directly in v1Album.m without first defining that method in v1Album.swift file and then using a bridging header.
Basically I cannot do what I am trying to do i.e. write straight up swift code in *.m file.
Please correct me, I maybe completely wrong.

Make custom types appear in Xcode's documentation popup

I want to achieve the similar result for my own code:
What you are referring to is XCode's documentation viewer and Document Sets.
Check out this tutorial on working with Doxygen, a popular docgen that works well with XCode: http://developer.apple.com/library/mac/#featuredarticles/DoxygenXcode/_index.html (not for XCode 4)
If you are using XCode 4, check out these articles:
Using the Doxygen Helper in Xcode 4
Easy Doxygen code snippets for Xcode 4
DOXYGEN SHORTCUTS IN XCODE4
AppleDoc achieves the result you're looking for.

How comments similar to <summary></summary> from C# should be used in Objective C?

Is there any solution in to make comments before each method in Obj C code similar to from from C#? I'd like to provide an information about my custom methods by Alt + Double mouse click when browsing code.
In objective-c doesn't exists a standard way to comment your code.
I can suggest you to use doxygen, doxygen use a syntax similar to JavaDoc and can generate Docset that xcode can load and use for suggestion.
I understand that this isn't trivial like in C# but for a brief introdution about Doxygen syntax, Usefull script and how to generate Xcode docset take a look at:
http://www.duckrowing.com/2010/03/18/documenting-objective-c-with-doxygen-part-i/
http://www.duckrowing.com/2010/03/18/documenting-objective-c-with-doxygen-part-ii
there is none, no Summary , no Regions

How do I add the library to link the OpenGL framework in iPhone SDK?

I am trying to study OpenGL and I have the framework added, but I am getting linker errors. I believe the issue is adding the library to the project for linking and EVERY time I try to add a library, I hunt around for the configuration setting forever. Someone, please give me the simple click-n-go answer!
The linker cannot find the CAEAGLLayer framework to link against.
Add the QuartzCore.framework and the linker will be able to find the missing framework.
To do this right-click on the Frameworks the choose:
Add > Existing Frameworks > QuartzCore.framework.
alt text http://img19.imageshack.us/img19/223/screenshot20091206at544.png