up vote 4 down vote favorite
5

I followed the steps here but i'm unable to run static analyzer on my project:

Finding memory leaks with the LLVM/Clang Static Analyzer

When i try to run xcodebuild on my project (1. Open Terminal, 2. Go to Project Directly, 3. > xcodebuild), i get this error:

=== BUILDING NATIVE TARGET XProject OF PROJECT XProject WITH THE DEFAULT CONFIGURATION (Release) ===

Checking Dependencies... CodeSign error: no certificate found in keychain for code signing identity 'iPhone Developer'

** BUILD FAILED **

How can i run this tool on my code - i'm testing with simulator. Thanks.

flag

74% accept rate

5 Answers

up vote 2 down vote

Hi Mustafa, Your answer is here : http://www.oiledmachine.com/posts/2009/01/06/using-the-llvm-clang-static-analyzer-for-iphone-apps.html

link|flag
Thanks, will check this one out. – Mustafa Jul 16 '09 at 6:29
up vote 1 down vote

Hello Mustafa,

I'm the author of the blog post that you reference in your question. If codelogic's comments are not enough to point you in the right direction you can wait until a bit later today and I will update the blog post with some more information about running xcodebuild against iPhone projects.

-- Michael

--

Alright, I've updated the post with a section titled iPhone Usage. Hope this helps!

Finding Memory Leaks With The LLVM/Clang Static Analyzer

link|flag
I just checked the post and its still the same. Detail on how to use xcodebuild against iPhone projects (with no certificate - testing on simulator) would be great. Thanks. – Mustafa Jan 31 '09 at 4:20
up vote 0 down vote

I haven't used the tool in question but the issue you're seeing appears to be a bothced xcodebuild command. Ensure that your target is the Simulator and not the device (-target command line argument).

link|flag
Can you please elaborate (explain a little, target is set to simulator and i'm testing my application on simulator using xcode). – Mustafa Jan 29 '09 at 15:00
You need to pass the target to the xcodebuild command line. Open Terminal and type xcodebuild --help to see the available options. – codelogic Jan 30 '09 at 0:18
up vote 0 down vote

It looks strange but I've switched active Configuration to Debug EVERYWHERE but still got same error (like Release is active). Xcode 3.1.3 version.

I was able to fix problem just after removing Release configuration at all from active target.

alt text

link|flag
up vote 0 down vote

It can be tricky to set the base sdk. I like this approach:alt text

I would have sworn that I had already set the sdk via the more traditional 'Build' tab, but hey... The 'Build' tab approach failed me (who know what I did wrong), but this worked great.

Good luck.

[Edit - I just visited the link posted in the Question - which repeats, but does not emphasize, what I'm claiming here.]

link|flag

Your Answer

get an OpenID
or
never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.