xcode

Could not receive a message from the device (iPhone)

I built and run an iPhone application on iPod Touch 2.2.1 device, got some problems and made a fix attempt. Now trying to re-build & run the application gives two (2) error popup notes: Could not receive a message from the device [OK] Google couldn't find this! The device itself is working happily, I can even launch and use the app...

Can I change the size of the Xcode IDE fonts?

I'd like to change the font size of the "Groups & Files" panel of the Xcode IDE. I know how to change the "Fonts & Colors" in the preferences, but those (seem to) only affect the code window, not the rest of the IDE. Any ideas? Thanks! ...

iPhone: rename resource on copy to bundle?

Hi all, I have an iPhone project (Xcode, Objective C++) with two targets - A and B. I want these targets to have different launch screens. The launch screen has a hard-coded name Default.png. I made Default_A.png and Default_B.png. At first, I tried to add both images to the project in separate folders (folders, not groups) under the s...

Stop Xcode from converting text into hyperlinks?

I've got Xcode 3.2.1, and enjoy using it, but when I'm editing a file with hyperlinks in the text (for example, a comment with a reference: # see http://example.com) Xcode turns the text into a clickable hyperlink. This is a royal PITA when trying to edit that hyperlink, as it means I can't click inside it to edit a piece of the link --...

Display Window with Cocoa Framework in Xcode

I'm building a framework in Xcode, and I need to display a window when a function is called. How do I get my framework to display a window that I build in Interface Builder? Step by step instructions would be greatly appreciated! Thanks, Chetan ...

Is there an equivelent to instruments for someone that doesn't want to compile their app?

I don't want to compile my app every-time I want to test it in instruments is there any other program or way of utilizing this benefit without having to compile every-time? ...

iPhone Implementing a Favorites list without Core Data?

I would like to add a separate tableview to my application which would provide the user with a list of their favorite books, separate from the tableview of every book in the application. They should be able to add and delete favorites from this tableview. These favorites would then be saved so that they aren't lost whenever the applicati...

Xcode STL C++ Debug compile error

I have some file writing code that works as expected, but prints an error on Debug mode, no output errors in Release. Code: #include <iostream> #include <string> #include <fstream> #include <sstream> using namespace std; int main (int argc, char * const argv[]) { string cppfilename; std::cout << "Please enter the filename to...

OFHighScoreService was not declared in this scope

Hi, I have OpenFeint integrated, compiling and launching when my app launches. Following the OF website instructions of: 1. Add a leaderboard to your application from the Developer Portal. 2. Note the Unique Identifier of your new leaderboard. 3. In your application, submit the player’s score like this [OFHighScoreService ...

Can I write Java code in XCode 3.2.1?

I would like to know is there any way to program (write, compile and execute) Java in XCode as I don't see any Java templates. Does that mean that it's not possible? ...

Protecting files in desktop Mac .app

I'm mainly write iPhone apps but am familiar with some desktop Mac authoring. I need to create a Cocoa app that will include several wav sound files (included in bundle). I don't want a user viewing package contents of the .app file and then extracting all of the sound files from it. Is there a way to protect those files? ...

Creating static library for all builds

When I get a 3rd party static library, I can use it in my debug or release builds for both the simulator and device. However, when I build locally, it is targeted for debug simulator/device or the same for release. I then have to coordinate my host app to match the library build. How can I create a single static library build that wor...

'SomeViewController' may not respond to '-alloc'

I'm currently setting up this view to be swapped with another in an iPhone game. When I use this code... - (void)viewDidLoad { menuViewController = [[menuViewController alloc] initWithNibName:@"SomeViewController" bundle:nil]; self.menuViewController = menuViewController; [self.view insertSubview:menuViewController.view a...

xcode macros objective c not working

In xcode if I type in if then hit escape it gives me an option to autocomplete to an if block macro. I just saw that there is a list of objective c macros like this for example a is supposed to be alloc init call. However when I type in a then hit escape it says no completions found. What am I doing wrong here? ...

How is the Xcode "Copy Bundle Resources" build phase setenv PATH value derived?

On my MacBook Pro (running 10.6.2) an Xcode (3.2.1) project build is failing with the error: copyplist failed with exit code 127 When I examine the build results I see that the copyplist script is reporting: sh: plutil: command not found Earlier in the build results for CopyPlistFile I see the line: setenv PATH "/Developer/Platforms...

What does "-(void)" mean in this function declaration? `-(void)awakeFromNib`

How come whenever i have to use awakeFromNib protocol, i have to put it in this format? -(void)awakeFromNib What is the need for -(void)? Thanks, FlaminLardMan (p.s. im a noob at xcode and objective-c) ...

How to launch an app in debug mode from xcode with a URL

Is there a way for xcode to launch an application with an app URL? I've read the answer to this question http://stackoverflow.com/questions/1239000/debugging-app-when-launched-by-push-notification, and it works great for single tests. I'm trying to write unit tests for launching the app with lots of different URLs, and using the previo...

In XCode, when you create an instance of a class in IB rather than in the code, what is the name of the instance object?

If I create a new instance of a class with IB I can't send messages to it because I don't know its name. I have asked several people and they always say 'you just use files owner' but that doesn't answer my question. What is the instances name? ...

How to "Build and Run" without attaching to gdb in Xcode?

For both iPhone and desktop applications, when you choose "Build and Run" from the Run menu (or press cmd+return), Xcode launches gdb and then runs the application with gdb attached. This allows you to inspect stack state if the program crashes but adds significant overhead to program launch time, which is somewhat useless if your progra...

Objective-C: variable optimized away by compiler

I am trying to run the following code: 1. NSURL *checkLicenseURL = [NSURL URLWithString:@"check_license.php?accesskey=&license_key="]; // call server API 2. NSError *err = nil; 3. NSXMLDocument *xmlResult = [[NSXMLDocument alloc] initWithContentsOfURL:checkLicenseURL options:NSXMLDocumentTidyXML error:&err]; But when looking at variab...