xcode

xcode 4 for production release apps

The xcode 4 preview just came out today. Has anyone tried it yet? It is safe to use for production release? Would love to use the new compiler. ...

Xcode debugger stopped displaying local and self variables

I don't understand this at all, but I can no longer see any locals or ivars when debugging my iPhone app with Xcode 3.2.3. Everything seemed normal until yesterday afternoon, and now I just see the globals and registers, which are not of much interest to me. HAs anyone else had this experience? I feel like I have gone crazy. How can the...

What is the internal structure of an Interface Builder .xib file?

I'm curious, can anyone describe the internal structure of a .xib file used by Interface Builder? ...

Xcode: Linked Frameworks vs Other Frameworks

Coming from a C background, what would "Linked Frameworks" and "Other Frameworks" mean? Having a look at my build target, I see that Linked Frameworks are in fact linked (dynamically, I presume - how would static linking work?) What are "Other Frameworks" for then? To test, I used the NSString class which is defined by Foundation in ...

Xcode multiple targets -- #ifdef's running over

I have an Xcode project with seven targets, corresponding to seven iPhone apps. That number may increase. A lot of the targets use a lot of the same classes. I have reproduced portions of the app delegate below. For purposes of this post, I have renamed the targets target1 through target7. I have setup corresponding macroes mTarge...

Do I have any ways to see the code of an xib file?

Sometimes I know how to set a property with Interface builder, but I can find the right function of the code, how can I slove this? ...

xcode 3.2.3 compiler warning

'ld: warning: directory '/Volumes/Skiiing2/CD/ViewBased/Unknown Path/System/Library/Frameworks' following -F not found' I am getting this error for quite some time now... I also upgraded to latest xcode 3.2.3 with latest iphone os 4.0 but still getting this error. I found some posts about it telling to remove invalid framework search p...

Groovy Base32 conversions

I am unable to use the fabulous tr() at the moment as I can only use Groovy 1.7.1 and wanted to know if there is an elegant way of going backwards and forwards between string and number encoded with Base32, but with the values A to Z then 2 to 7, rather than 0 to 9 then A to V. This is to remove customer error in typing in a human reada...

Use SIP in iPhone app...

Hi, I want to build an iPhone app which has the option to make calls over SIP (VoIP) but at this moment I have no idea how to start. Does anyone have some information about this topic, or maybe a demo project which I can use to implement the SIP functionality? Thanks in advance! ...

Managing multiple subviews

I'm creating a magazine type application for the iPad and want to make sure I am using the best approach. I want to have a global custom header and footer that is always present regardless of what view is displayed. Right now I am thinking I will have my main view with three subviews: header, footer, and body. Because of the graphical na...

If I'm building a custom view inside of Interface Builder, do I need to have two different NIB files, one for Portrait and one for Landscape?

I'm building a custom view inside of Interface Builder that has buttons with image backgrounds. The buttons extend to each side of the screen, so I'll need two images for each layout (Portrait and Landscape). As such, do I need to have two different NIB files for each layout (Portrait and Landscape), or is there a way to just use one N...

XCode: iPhone target dependency on Mac OS X target

Hi everyone, I'm building an iPhone application, and I want to run a custom built-on-the-fly Mac OS X command-line utility during the build phase of the iPhone target. I set up the command-line utility as a dependent target of the iPhone target, but it won’t build, telling me: target specifies product type ‘com.apple.product-type.to...

iPhone CATextLayer (QuartzCore framework) linking issue

I have the following code: CATextLayer *test = [CATextLayer layer]; test.string = summary; test.wrapped = YES; //test.truncationMode = kCATruncationEnd; //test.alignmentMode = kCAAlignmentJustified; test.frame = s; [test drawInContext:context]; I import the framework and link against it, however when it links I get the following erro...

Navigating autocomplete entries in XCode

Sometimes when I type certain words, XCode will offer to autocomplete with several options. If I press enter, it automatically puts the curser on the first option and selects it so when I start typing that part gets replaced. After that, how do I immediately get to the next option, without having to double click it? For example, if I ty...

iPhone Xcode Is there a way to test methods without loading up the simulator?

Hi, I'm trying to test some simple string manipulation methods I need for my iPhone project. I was wondering if there was anyway of testing the results of methods without loading the simulator each time.. for instance in my main.m method: #import <UIKit/UIKit.h> int main(int argc, char *argv[]) { testMethod(); NSAutorelea...

Xcode's "build and analyze" reports odd memory leaks for this code

Does anyone know why xCode's "build and analyze" would report this line as a "possible memory leak"? goodSound = [[SoundClass alloc] initializeSound:@"Good.wav"]; ///// Here are the 4 files in question: // Sounds.h #import <Foundation/Foundation.h> #import <AudioToolbox/AudioToolbox.h> @interface SoundClass : NSObject { ...

How does the mail icon count number show up on the iPad / iPhone

I want to use the same number count like the mail icon for the iPhone and iPad how does that small number pop up over an icon? ...

Building dependencies in Xcode 4

I have a project that has a dependency on a static library. In Xcode 3.2.3 the project that builds the library is setup as a direct dependency in the target settings so that the library is built whenever the main project is built. I can't for the life of me figure out how this is supposed to work in Xcode 4. I haven't changed any projec...

Build and Debug in Xcode

The icon in Xcode says "Build and Run". How do I change it to "Build and Debug" I read that if you use "Build and Run" then it does extra work to optimize the code. ...

Xcode/GDB: How to get information about an exception that was just thrown?

OK, so imagine that my breakpoint in objc_exception_throw has just triggered. I'm sitting at the debugger prompt, and I want to get some more information about the exception object. Where do I find it? ...