I don’t see the Buid and Analyze option in my Build Option in Xcode - xcode

I am trying to use the Clang static analyzer in my code. I installed it and can run it succesfully from the terminal. But I wanted see it locally on the code not on Safari. The resort [sic] is to activate Build And Analyze in Build Options, which I dont see at all. Help me with this. Any clear step by step procedure for Clang's installation?

You are probably using Xcode 3.1.x and reading documentation for Xcode 3.2. In the earlier version you had to download Clang, run it from the command line, and view the results as HTML. In Xcode 3.2 it's all built-in and you choose Build and Analyze from the Build menu. If you don't see that menu item, you're probably using the earlier version of Xcode.
Xcode 3.2 only runs on Mac OS X 10.6 Snow Leopard, by the way, and requires an Intel-based Mac.

Related

PODs Failing to compile after xcode update

I just updated my xcode to Version 10.1 (10B61). After doing so, my pods don't work. See below error messages. Aside from PKHUD, the error messages don't provide suggestions as to how to fix this issue. Per online sources, I've updated my OS to High Sierra 10.13.6. Any suggestions on how to get the app to compile? It was working before the update.
On Xcode, select the Pods project and on the left panel select the frameworks that are causing the issue. On Build Settings, browse for Swift and make sure you have correctly set the version you have installed of those frameworks.
You can check that framework is fine after you tweak that value by compiling the framework after selecting it.
Just run cmd+B to compile and check if it build successfully. If you don't see the framework on the list just go to manage schemes and add it.

Is it possible to build iphoneos6.1 projects in Xcode 5, preserving the behaviour of views laid out in an Xcode 4.6.3 storyboard?

Our build server was recently updated to use Xcode 5's xcodebuild. We've installed the iphoneos6.1 so that we can still use iPhone SDK 6.1 for some legacy projects that do not yet support iOS7. However, when we use xcodebuild to build these projects using -sdk iphoneos6.1, we still see problems with UIViewController's contents being laid out underneath navigation bars and tab bars.
Is there some way to build these projects that were developed with Xcode 4.6.3/base sdk iOS 6.1 using Xcode 5's xcodebuild, but preserving the views as they were laid out in the storyboard developed using Xcode 4.6.3? I took a look at the man page for ibtool, but I'm not seeing any option related to choosing a target SDK, or anything else that seems relevant to the "extends edges" problem I noted above.
Note that we haven't updated the storyboard using Xcode 5 - the project is continuing to be developed in Xcode 4.6.3, and only touches the Xcode 5 toolchain when our build server clones the project's git repo and builds using xcodebuild.
Yes. On the Storyboard, go to the Interface Build Document section and there are two selection items. One for Builds For and one for View As. You can select anything from 7.0 down to 4.3 for the Builds For and you can select '7.0 and later' or '6.1 and earlier'.
While it isn't exactly what you are looking for, you can keep both Xcode 4 and Xcode 5 in the same build environment and control which xcodebuild is run by using an environment variable (see man page for xcrun. We have just set this up on one of our build servers. In your build definition, just set the following environment variable:
DEVELOPER_DIR=<path to Xcode 4.app>/Contents/Developer
For us, it ended up as:
DEVELOPER_DIR=/Applications/Xcode-4.app/Contents/Developer
This overrides the xcode-select setting and allows you to use the correct Xcode environment. Again, this depends on the ability of your build system to set environment variables, plus having both versions of Xcode installed. You can download older versions of code at Downloads for Apple Developers

AppleScript and Xcode error -10008

I am working on a tool similar to the one described in this question, to build and run an Xcode project via AppleScript, in order to automate testing. I am getting the following error message:
Xcode got an error: The specified object is a property, not an element. (-10008)
from the line
set active build configuration type to build configuration type "Debug".
Has something changed in AppleScript and/or Xcode that would break this line? If yes, is there a new way to accomplish the same thing, or at least something similar?
I am using Xcode 4.0.2 on a Mac running OS X 10.6.8.
That's the problem. You see, Apple rebuild Xcode and it's workings, and some AppleScript code (including this one) does not work anymore.
I don't think that there is a solution, unless Apple releases something. I guess they just expect you not to use AppleScript.

Installing iOS SDK 4.1 on xcode 3.2.5

I've read through a lot of posts and couldn't really figure out the answer to this question. So I apologize if I duplicating it here.
I have installed xcode 3.2.5 to my machine and it comes with SDK 4.2. My iPhone is on 4.1 and I am not planning to move it to 4.2 just yet. Problem is that I can't use this phone for testing. Since the only SDK that I have installed is 4.2, when I try to run debug with my iPhone, I get this message:
Can't install application
The info.plist for application at /blabla/app.app specifies a minimum OS of 4.2, which is too high to be installed on this device.
So, I got to Targets -> Get Info and I see that it is indeed targeting 4.2 (but that is the only option available - since I don't have the other SDK's installed).
So, the question is: how to I keep xcode 3.2.5, but install SDK 4.1 in addition to 4.2?
It took a while to figure this out.
I couldn't see 'iOS Deployment Target' on the info.plist either. Here's what I did.
a) Project -> Edit Project Settings
b) go to 'deployment' section
c) Change
'Targeted Device Family' = iPhone/iPad
'iOS Deployment Target = 'iOS 4.1'
Open up your info.plist in your project. There is a place where you can define for iOS 4.1.
Just open the previous SDK dmg, then go to Packages, and install the SDK 4.1 package.
More info : Install sdk 2.0 to 3.1 for xcode 3.2
Note : the "Packages" directory is not visible in the dmg since xcode_3.2.5_and_ios_sdk_4.2_final. Just use the Terminal (or finder "Go to folder") to open "/Volumes/Xcode and iOS SDK/Packages".
Edit : the xcode4.1 for Snow Leopard create an app called "Install Xcode.app". The packages directory is inside the app package.
The best way to do this is to find a copy of Xcode 3.2.4, with iOS 4.1, and install it in a separate directory. When you install, take the dropdown that's set to Developer and switch it to DevOld, or something similar. As there's no way to install new SDKs in the new version of Xcode, keeping multiple versions is the best you can do.
If you simply want to be able to run your app in 4.1, not necessarily develop in it, go into your target's settings, and under the build tab, set the iOS Deployment Target key to 4.1 or below.
Good luck!
What you need to do is:
In the BUILD section of the Project info click on Show and change its value from Setting defined at this level to All Settings.
In the updated list of settings you will surely locate the desired one.
Good Luck!

Clang Static Analyzer for xcode for dummies

Could somebody please help me get Clang up and running? (I don't have 3.2)
I've followed numerous tutorials (basically every link off of this page Using Clang Static Analyzer from within XCode) but I just cant get it to work!
The only thing I've managed to do successfully so far is download clang! Grrrr .... dubbeat smash!
Bear in mind I've never written an apple script before.
I have clang on my desktop
The easiest way is to just update to Xcode 3.2.1 - using clang then becomes a no-brainer - nothing to install or configure - just set the compiler to Clang LLVM 1.0 in the project settings.
I don't user the Clang Static Analyzer but there's a built in static analysis in XCode 3.2:
http://developer.apple.com/mac/library/featuredarticles/StaticAnalysis/index.html
Either use the version bundled in XCode, or download a newer version at https://clang-analyzer.llvm.org/ then see some additional instructions at https://clang-analyzer.llvm.org/xcode.html to switch XCode to that downloaded version.
The question you've linked is quite old and the information is out-of-date, I would not refer to it much, any more.

Resources