xcode

Xcode: 'Generics are not supported in -source 1.3' compiler error?

Hello everyone, just a quick question: I am a CS undergrad and have only had experience with the Eclipse, and Net Beans IDEs. I have recently acquired a Macbook and was wanting to recompile a recent school project in Xcode just to test it out. Right after the line where I declare a new instance of an ArrayList: dictionary = new Arra...

"Cocoa Touch Application" Template from XCode 3.1.1

Just installed the latest SDK for iPhone 2.1. When I go to File -> New Project in XCode, under the iPhone OS Application selection, I don't see a template icon for "Cocoa Touch Application". Am I missing something? Anything else I need to download other than the iPhone SDK? If not, how do I add it to the "iPhone OS Application" templates...

How to view contents of NSDictionary variable in Xcode debugger?

Is there a way to view the key/value pairs of a NSDictionary variable through the Xcode debugger? Here's the extent of information when it is fully expanded in the variable window: Variable Value Summary jsonDict 0x45c540 4 key/value pairs NSObject {...} isa 0xa06e0720 I was expecting it to show me each element of the...

Memory leak detection tools in XCode

Does Apple's Xcode development enviroment provide any tools for memory leak detection? I am especially interested in tools that apply to the iPhone SDK. (currently my favorite platfrom for hobby programming projects) Documentations/tutorials for said tools would be very helpful. ...

.gdbinit config file conflict with Xcode debugging

I've a fairly huge .gdbinit (hence not copied here) in my home directory. Now if I want to debug code inside Xcode I get this error: Failed to load debugging library at: /Developer/Applications/Xcode.app/Contents/PlugIns/GDBMIDebugging.xcplugin/Contents/Resources/PBGDBIntrospectionSupport.A.dylib Custom data formatters are disabled....

What are those little Xcode tips & tricks you wish you knew about 2 years ago?

With a huge influx of newbies to Xcode I'm sure there are lots of Xcode tips and tricks to be shared. What are yours? ...

What #defines are setup by xCode when compiling for iPhone

I'm writing some semi-portable code and want to be able to detect when I'm compiling for iPhone. So I want something like #ifdef IPHONE_SDK.... Presumably xCode defines something, but I can't see anything under project properties, and google isn't much help. ...

How do I create a bundle of reusable code in Xcode?

I am developing an iphone application and have to parse xml files in order to put them into a database. I will also be using those same xml parsers in my app so users can import their own data. I was wondering how I can extract those xml parsers into a bundle or a library so I can use them both in my iPhone app and in a command line ap...

Linking an external .jar from an Xcode java project?

How do I link an external .jar into my Xcode java project? That is, have it in the classpath during compilation and execution. I'm using Xcode 3.0 and this seems to have changed since 2.4. ...

Java Development on a Mac - Xcode, Eclipse, or Netbeans

I've been using Xcode for the usual C/C++/ObjC development. I'm wondering what are practical considerations, opinions of Xcode, Eclipse or NetBeans usage on a Mac for Java development? Please don't include my current usage of Xcode in your analysis. ...

Objective-C Tidy

I have a somewhat messily-formatted Objective-c code base. Is there a way to have Xcode reformat an entire project to conform to a coding standard (i.e., properly indent, spaces v. tabs, etc.)? Are there other tools that might accomplish this? ...

How do you document your source code in Xcode?

I'm a Mac developer with a very strong Java background. I've documented my sources using Javadoc, a lot. What's the way to go with Cocoa and Xcode? Are there any documentation tools supplied together with Apple's Developer Tools? Is Doxygen the way to go? What are the alternatives? Thank you all! ...

Specific help with Xcode Project Template that is not doing substitution in file contents

We are trying to make a project template, but the documentation on this is spotty or non-existent. Doing some reverse-engineering on some template files, we have come up with the following. However, it doen't actually work! First of all, we have figured out that project templates should be installed inside: ~/Library/Application Supp...

Skipping the 'CompressResources' build step for XCode iPhone apps

Is it possible to set an iPhone XCode project to skip the 'CompressResources' build step? Specifically, I want to skip the stage where it runs pngcrush on all of my .png files, many of which don't survive the experience in a form which my app can read. Edit: the version of pngcrush used creates png files which contain a non-standard 'm...

Xcode: attaching to a remote process for debugging

Using Xcode 3.1 on OSX 10.5; is it possible to attach (the debugger) to a running remote process? I know that it's possible to start and debug a remote process (as explained here), but it would be great if I could find a way to attach to an already running remote process... edit to add: Thanks. I've submitted a bug report to Apple. Wil...

xCode Performance Tool thinks the iPhone simulator has a camera

When I run this code in the Simulator in the debugger or standalone [UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera] it tells me the camera is not available (returns NO), as expected. However, if I run the same code in the simulator in Performance Tool, it returns YES! My code (which works fine ...

Linking File's Owners and View Controller [iPhone SDK]

I seem to be having an issue with iPhone SDK 2.1 in as far as being able to establish a relationship between a ViewController and a View window. In as far as a Cocoa Touch Class, I went forward and added a UIViewController subclass. I made sure that the target is part of the existing project. Right afterwards I added a User Interfaces ->...

What is the cost of using autorelease in Cocoa?

Most of Apples documentation seems to avoid using autoreleased objects especially when creating gui views, but I want to know what the cost of using autoreleased objects is? UIScrollView *timeline = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 20, 320, 34)]; [self addSubview:timeline]; [timeline release]; Ultimately should I use ...

Is there a key combination in Xcode to implement a Protocol?

In Visual Studio if I define a class to implement an interface e.g. class MyObject : ISerializable {} I am able to right click on ISerializable, select "Implement Interface" from the context menu and see the appropriate methods appear in my class definition. class MyObject : ISerializable { #region ISerializable Members publi...

How do I create a dynamic library (dylib) with Xcode?

I'm building few command-line utilities in Xcode (plain C, no Cocoa). I want all of them to use my customized version of libpng, and I want to save space by sharing one copy of the library among all executables (I don't mind re-distributing .dylib with them). Do I need to do some magic to get libpng export symbols? Does "Link Binary Wi...