xcode

Xcode: different build setting options for different configurations. Why?

In my Xcode project, I'm looking at the "Target Info" window, "Build" tab. In the list of compiler settings, for most of my configurations ("Release", "Distribution", and "Ad Hoc"), there's a settings section called "GCC 4.2 - Preprocessing". When I switch to my "Debug" configuration, that section goes away. What can I do to make my "De...

NSSound undeclared on iPhone?

sound = [[NSSound alloc] initWithContentsOfFile:@"staticbeam09.wav" byReference:YES]; Code referenced from Apple docs. Getting an error when I put this in viewDidLoad. If I put NSSound *sound; in the header file, I get the specifier-qualifier error at the top of my implementation file. What do I have to do to make this work? I was j...

XCode AutoComplete current iPhone SDK, non-deprecated version?

Is there a way to configure XCode to autocomplete Cocoa methods with the most current, non-deprecated versions? For instance NSString *myString = @"Hello"; //xcode sets autocomplete to look like this [myString writeToFile:arg1 atomically:arg2]; //however that gets a warning from the debugger //the method is deprecated. the new method i...

What does "dwarf2_read_address: Corrupted DWARF expression." mean?

I'm trying to do a little debugging in my iPhone project, and whenever i try to print out an object to see its description in one specific method i get this message in gdb: "dwarf2_read_address: Corrupted DWARF expression." Does anyone know why this happens and how i would go about fixing it so that i can inspect my variables? ...

XCode: Static Analyzer doesn't work if C/C++-Code used in project

Hi, with XCode 3.2.1 Apple delivered a built-in Clang static analyzer. I am working on an iPhone project which uses some C-Code (one .h and .c file). When running Build and Analyze, Clang refuses work. The build results window just says Build Succeeded. Any ideas how to get it running with C/C++-Code? Regards, Norbert ...

iPhone: Using static library in an application crashes the device but not the iphone simulator

I have a library I made, and now I want to utilize it in an application. I've believe I've properly linked to the library. Here are all the things I've done: Set the header search path Set other linker flags to "-ObjC" Added the static library xcode project Made sure the lib.a was listed as a framework target Added the library as a dir...

Force a Mac OS X 32/64-bit universal binary to run 32-bit on Leopard only?

I want to ship a single 32/64-bit universal binary of my desktop Mac OS X Cocoa app. I don't want to ship two versions. I want it to run as a 64-bit process on Snow Leopard. However, if the app is launched on Leopard, I want to always force it to run as a 32-bit process. NOTE: I know that in the Finder 'Get Info' window you can click ...

Xcode iPhone project Code Signing error

Whenever I try to build my iPhone app in Xcode 3.2.1 I get an error that says: Code Sign error: The identity 'iPhone Distribution: foo' doesn't match any identity in any profile This is a distribution certificate, however it worked perfectly with a developer certificate. I have revoked and installed all of my iPhone certificates, ...

Git and pbxproj

I was looking at an open source Mac application, and they gave some suggested values for .gitignore. They were what I would expect... However, they also suggested an entry into a .gitattributes file: *.pbxproj -crlf -diff -merge I'm not the most knowledgable in terms of git, so I was wondering - what exactly are the benefits of adding...

getting error when using mapkit in xcode?

'NSInvalidUnarchiveOperationException', reason: '*** -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (MKMapView)' i am getting this error.am i missed something.i don't know from where to add MApkit.framework first i tried with target->getInfo and then from the bottom + sign added framework but that did not wrked....

Xcode 3.2.1 GCC CLANG and LLVM demystification

The readme included with the new Xcode 3.2.1 this week says the following: Static code analysis is fully integrated within the Xcode IDE via the Build and Analyze option under the Build menu or via custom build settings GCC 4.2 is the default system compiler for the 10.6 SDK The optional LLVM compiler is included using two different fr...

Xcode 3.2.1 - Why are Core Data generated Classes resulting in Build errors?

It looks like the recent Xcode 3.2 has added some code generation niceties that (I think) were lacking pre-Snow Leopard. I took the following steps: Define a simple .xcdatamodel model with a few entities, including one (inversible) one:many relationship (an Endpoint has many Subscription objects) File -> New and select the (icon-less)...

Generic Xcode usage questions

I have 3 general questions related to the usage of xCode. Any help would be greatly appreciated please: Whenever I open documentation, the left content/index column is always small and I have to drag it wider. Is there a way to permanently set its size? Is there a way to perform a wildcard search and replace e.g. I have 3 lines: var1Le...

XCode SCM - not all files are being tracked. Use Versions?

Hello, I am new to subversion. I've tried Versions application, and very soon got disappointed - it doesn't copy .xcodeproj file properly(project doesn't launch and says that some file is missing) and is really bothering when I want to modify my project/remove some files. And I couldn't find any decent guide on it. So I am trying out ...

Using Subversion in Xcode

It seems that all of the initial Google results for "using subversion with xcode" are actually just tutorials for installing and configuring svn and Xcode, as opposed to actually using the two (i.e. interacting with svn via Xcode's GUI). Is anyone aware of a good guide that teaches the tricks and pitfalls of working with svn via Xcode's...

Xcode 3.2 and iPhone OS 2.x frameworks

Hi, I am dealing with a project compiled for iPhone OS 2.0 on a previous version of Xcode. I am using Xcode 3.2 on Snow Leopard and I know how to target for 2.0. The problem is that Xcode 3.2 do not comes with iPhone 2.0 frameworks. How can I get these old frameworks and add to Xcode 3.2? I cannot simply recompile to 2.2.1, or thous...

Linking to PostgreSQL and SSL

Hi, I'm trying to use libpq, the client library for PostgreSQL in a Cocoa app. First thing, adding the header files: I tried adding the path to the PostgreSQL header files under User Header Search Path on my project's properties and then compile but for some reason XCode can't see them. The solution was to manually add the files and a ...

Including stdc++ from iPhone app

I'm trying to use clucene from inside an iPhone application, and I'm running into issues with my include statements. Specifically, imports like stdexcept, vector, etc are failing. The same code compiled fine under XCode using the x86_64 sdk, but fails when I switch to the iPhone Simulator 3.1 sdk. It seems like XCode might be changing ...

Saving Interface Builder Changes when building in Xcode

I know many of you have experienced the same the scenario, where you are banging your head against the wall wondering what is wrong with your app only to find that you have forgotten to save your Interface Builder changes. Well, this never happens to me, because for some reason Xcode will prompt me to save any changes in Interface Build...

entitlements are not valid

Recently, i have upgraded my iPhone SDK OS from version 2.2.1 to 3.0 version. After that while building my application i get an error the the provisioning profile has expired. So i created a new provisioning profile. Then i made the distribution of my application with the provisioning profile. But i get an error in iTunes while syncing...