xcode

Xcode does not recognise methods added through categories

I've created a category to add methods to NSManagedObjectModel. Everything works fine except Xcode keeps throwing warnings about NSManagedObjectModel not implementing the methods. How can I force it to recognise the method? ...

Simple way to separate UITableview datasource and delegate from main UIViewController class?

The typical UITableView usage pattern is to have the main UIViewController become a target datasource and delegate for the UITableView it is holding on to. Are there any simple and easy to follow tutorials that would help me figure out how to move the code that pertains to the UITableViewDelegate and UITableViewDataSource methods into a...

Why can I fill my NSArray just with one object?

Hello, why can´t I fill my NSArray? Where is my mistake? He always just fill one object/image to the nsarray. I set a NSlog to check which value string has and he shows me all the 20 urls. for (int i = 0, count = [bild count]; i < count; i = i++) { NSString * string = [bild objectAtIndex:i]; NSURL *url = [NSURL URLWithString:str...

Choosing external project to run when building a library in xcode

Is there any way (in xcode) to specify an external project to build and run directly while working in one of that project's dependent libraries? It is annoying to have to always switch back to the main project when I want to test my changes - something like this would be very helpful to know. ...

Using Subversion with DropBox

Hi all, Is it a bad idea to use DropBox as a backup system for Subversion repositories? Has anyone tried using Subversion with an an online file sharing utility like DropBox? What's your experiences? My concern is whether this will work - mainly because Subversion maintains locks and it's very specific about it. I'm not sure if DropB...

iPhone uinavigation - jump from pages

Hi, I'm a newbie to iPhone coding and am having problems with the UINavigation control. I have 3 views (main menu, news and login). The main menu is my base view in the root controller and then I push the login or news views onto the stack when the user clicks the button from the main menu. However, if I am on the news screen and want t...

Mac OS X. No such file or directory for Lua framework.

I have Cocoa project which uses Lua.framework. In the header file I try to include some .h files from this framework: ... #include <lua.h> #include <lauxlib.h> #include <lualib.h> ... And when I compile the source file I get this error: error: lua.h: No such file or directory error: lauxlib.h: No such file or directory error: lualib...

How NSZombie works when it finds error on iPhone SDK

Hi everyone, if set to on the NSZombie, it tells me that I'm releasing an object which is already released and gives me the memory address, very helpful... BUT I can't see which object it's... because the app stopped working... any help? thank you ...

How can I read out Joystick values in Objective-C under OS X Snow Leopard?

Hello, I'm trying to interface with Joysticks in Objective-C, basically I want to read out the analog position values. I'm new to objective-c, and even though I searched a lot, I didn't find a way to do this. There seems to be a way using GLUT, but the solution should work even without a window open, and I also wasn't able to understan...

Add (+) button in textField which will show up contacts tableview

Hi how can i show up View with Contacts list after pressing button. It's like in Mail.app a View appear after pressing (+) button with "Chose a contact to send" and after click it adds it into TextField ...

Calling one class file from another

I am new to the iPhone development environment so be gentle: Currently writing an iPhone game app that will also have a high score view. Was wanting to make this view so that it was on its own and I could call it from another class (.m file) Question is, how do you call another class file? I know I need to include the header from tha...

How can an instance of an UITableViewCell, which was created by an instance of my ViewControllers, tell the ViewController, to do something? (Read my text)

Hello, I created a instance of my ViewController(TimeLineViewController), which will be presented. This ViewController contains a UITableView, which gets the cells from a instance of my TableViewCell. So the ViewController creates an instance of the TableCellView. The TableViewCell contains a UITextView with enabled weblinks. Now I want ...

Cant set the height of my uitableviewcell right

Hello, I set the size of my UITableCell´s with this: - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { NSString * vergleich = [nachricht objectAtIndex:indexPath.row]; CGSize size = [vergleich sizeWithFont:[UIFont fontWithName:@"Helvetica" size:14] constrainedTo...

How can I write to the current directory in the iPhone SDK when running xcodebuild from the command line?

Hi folks. Does anyone know how to obtain the path to the current directory when running xcodebuild (mainly, the project directory) and write files to it? I'm trying to save the results of some unit tests to disk from my obj-c code, but I'd rather not dump them deep in the app's document path if possible. I might be able to append '../../...

Xcode linked project header files not found

Hi all, Here is the situation I have: ProjectA - Xcode static library project. ProjectA contains logical code group ExternLib with file ExternLib.h. ExternLib.h itself is in the folder Classes/lib/ExternLib (relative to ProjectA folder). Within ProjectA, I use ExternLib.h simply as: #import "ExternLib.h". This works fine. Next I have ...

cant get ifstream to work in XCode

No matter what I try, I cant get the following code to work correctly. ifstream inFile; inFile.open("sampleplanet"); cout << (inFile.good()); //prints a 1 int levelLW = 0; int numLevels = 0; inFile >> levelLW >> numLevels; cout << (inFile.good()); //prints a 0 at the first cout << (inFile.good());, it prints a 1 and at the second a 0....

Command line tool to add resources to an Xcode project

I've got an Xcode project that creates a standard application that can be branded in multiple ways and contain some custom content. At the moment I have a Resource "Resources > Tour Packages" with the custom files under this. At the moment every time I want to brand the app a different way I have to delete the old files from this resourc...

How to bypass code signatures on Snow Leopard?

Greetings everyone, Couple of days ago, I upgraded my Mac to Snow Leopard. I notice that all my settings are preserved and very impressed with Snow Leopard performance. But today I noticed that I was unable to build my iPhone application for "Device -> Release" mode. Xcode complaints that a valid signature is not found. I googled, but ...

Test universal binary for mac

Hi, I am developing a mac program in an intel mac, under OS X. It needs to be also an universal binary, so guess with Xcode one can create the universal binary (UB), am I wrong? But my question is if there is some kind of virtual machine or such other method, so I can test whether the binary powerpc part runs ok, but I have only the i...

Despite iPhone Base SDK set to 3.1, App Store lists app as needing OS 2.2

A follow-up (sort of) to this question: in the Xcode build tab, I set my Base SDK to 3.1 but after uploading to the App Store, I see it being listed as requiring 2.2 or later. Why is that? Both Base SDK and Deployment Target are set to 3.1. ...