Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Building iPhone Code using xcodebuild and running LLVM/Clang Static Analyzer

I followed the steps in Finding memory leaks with the LLVM/Clang Static Analyzer but I was unable to run static analyzer on my project.

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.

like image 356
Mustafa Avatar asked Jan 29 '09 08:01

Mustafa


People also ask

How do I run static analyzer in Xcode?

It's very easy to run. Just go to Product and choose Analyze, or use the keyboard shortcut Command-Shift-B. You can see the analyzer running in the status bar of Xcode. Analyzing your project is very similar to building it.

What is clang static analyzer?

The Clang Static Analyzer is a source code analysis tool that finds bugs in C, C++, and Objective-C programs. It implements path-sensitive, inter-procedural analysis based on symbolic execution technique.

Is clang tidy a static analysis tool?

clang-tidy is a clang-based C++ “linter” tool. Its purpose is to provide an extensible framework for diagnosing and fixing typical programming errors, like style violations, interface misuse, or bugs that can be deduced via static analysis.


1 Answers

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

like image 66
Michael Fey Avatar answered Oct 13 '22 00:10

Michael Fey