xcode

How to Change Default Copyright Template

Whenever I make a new file in xcode, it puts something like this at the top of the file: // Copyright __MyCompanyName__ 2008. All rights reserved. How can I change that to something useful? Update: found the answer here. ...

Purpose of UIViewController

Hi everyone. I'm currently learning Objective-C, coming from a Java background where I have no trouble making GUI applications. As such, the way I'm thinking about some of these problems may be a bit off. Here's the question (please excuse the ramble) - What is the purpose of UIViewController? Let me give a specific example. Say...

Can you create a "superset" target in Xcode ?

For the purposes of unit testing I'd like to create an iPhone project target in Xcode that includes all of the release application files, plus some additional files containing code useful for UI unit testing. I can do this by duplicating the original application target; however, the problem with this is that every time I add a new sourc...

when debugging in xcode an app that has cursor hidden, how can I force it to reappear

In debugging a game that is full screen (on one of my two monitors) when it crashes and the debugger (on the other monitor, not captured) displays the crash location, the cursor is still hidden. Is there any way to force the cursor to reappear? I can click around blindly and it works, but it's not terrible accurate. ...

NSbeep() on iPhone

Does NBeep() exist on the iPhone? I just want to play a short error sound to indicate that the key pressed is not a legal character. I will play this in my textField delegate that dissalows the illegal characters. This site is great btw! ...

Static Libraries on iPhone device

I have two projects, a Cocoa iPhone application and a static library which it uses. I've tested it successfully on the iPhone simulator, but when I try to deploy it to my iPhone device I get (symbol not found) link errors. If I remove the dependancy of the library the project builds/runs fine. I have made sure all the build settings a...

Any gotchas using my main iPhone for SDK development?

I own a total of one iPhones. I want to test my app on a real iPhone, which would mean allowing Xcode to get its grubby little protuberances on my only device. Is that wise? Are there any problems with using the same phone for testing and regular phone/music/other purposes? ...

Subdirectories within an iPhone application

Is there a way to have directories within an .app? At the moment if I add a file into Xcode, regardless of what Group hierarchy it is in, the file always lands in a flat filesystem within my application bundle. Just as an update, I discovered the command: /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp wh...

QMAKESPEC environment variable setting problem

refer to this post compile a xcode project in command line http://stackoverflow.com/questions/377992/building-xcode-projects-from-the-command-line the QMAKESPEC variable was unable to set to macx-g++. i was doing like this in terminal QMAKESPEC=macx-g++ but this still not able to generate a make file of my xcode project for me, so what i...

launch a xcodeproj from terminal

i trying to build and compile my xcodeproj in command line and it is work now so is possible to launch the xcodeproject from terminal instead from the xcode ...

Open an iPhone application from the terminal

Is it possible to open an iPhone application or an Xcode project from the terminal? I have already tried: open /path/to/project.app But this returns a warning and quits unexpectedly due to an image load error when it launches the simulator. Does anyone have any suggestions? ...

How to disable forward class compiler warning (undocumented class)

I'm currently writing an iPhone application that uses a UITabBarController with more than 5 Tab Bar Items. Thus, a 'more' tab is automatically generated (like in the YouTube Application). I found out that the corresponding view controller class is UIMoreListController, but I don't have any corresponding .h files. So, my code looks like t...

SCM for Xcode?

I am developing an application for the Mac as a small team (me + another person) effort. We are located in different cities, and have started to see the need for solid source control management. None of us have any experience with this, and both of us are relatively new to Cocoa/Obj-C/Xcode (but do have C knowledge). Does anyone have a...

How to deal with compiler optimization problems

I'm having an annoying problem with my iPhone app. Whenever I set the optimization level to something other than "None", I get computation errors. This only happens in when building for the iPhone SDK (the iPhone Simulator is always fine). I wouldn't mind disabling optimizations in release mode, but the application is a tiny bit too s...

Mac OSX - Xcode/Leaks problem

I'm new to development using Xcode, and am having trouble using the built-in Leaks Instrument. I have enabled guard malloc and put MallocStackLogging YES & MallocStackLoggingNoCompact YES in the environmental variables for the executable. Then running the process by clicking Run->Start with performance tool->Leaks But only object al...

Getting Started with C and Objective-C

I am eventually wanting to program in Objective-C to write programs for OS X and possibly the iPhone. I do not have any direct experience with C and I come from a web programming background. I am much more familiar with java syntax than C and Objective C. I am just looking for suggestions on how to get started. It looks like I need t...

How do you create hybrid XCode projects for Mac & iPhone?

Hello, I'm working on a project which shall contain two targets. One for building a Framework to use in Mac development and another to create a static library to use in iPhone development. In the common code it's no problem to #ifdef between the platforms, but I just can't get the targets and dependencies right. The first question is, ...

Linking Libraries in Xcode

Hey all, I'm using a powerbook (osx 10.5) and recently downloaded and installed FFTW 3.2 (link text). I've been able to compile and run some simple programs based on the online tutorial using the terminal: g++ main.cpp -lfftw3 -lm however, I can't get the same program to compile in Xcode. I get a linking error, "symbol(s) not found...

Best way to make an iPhone application multi-lingual

Can anyone tell me the best way to go about making an iPhone application support multiple languages? I am going to put separate versions for each language in the App Store, but what is the best way to represent this in XCode? ...

How do you debug your application if they got started using a custom URL scheme?

I'm developing an app for the iPhone, but I guess the question is the same on the Mac. What is your approach to debug the state of your application after it has been launched by its URL scheme? ...