xcode

Link multiply small xcode projects

So I am working on a very large xcode project, with a lot of libraries, and sub directories which generates a huge pbxproj file, is there a way to generate smaller xcode projects or pbxproj files that can then be read into a main project. Similar to how visual studio has a main vcproj file and smaller vcproj files for each library/execu...

Xcode -revisions to code not making it into the build

I have recently noticed in my Xcode 3.1.3 that I can completely revise some code (i.e change the icon pic or even a whole background pic) or add/change some methods that work beautifully in the simulator but when I do a device build I get the old code, sometimes several revisions back. Even pics that are deleted out of of the project (r...

Strange Descriptions for Arrays in XCode debugger

When debugging my program in the XCode debugger, if I hovered my mouse over an array variable, the XCode debugger used to show me how many objects were in the array and I could even examine the objects themselves. Somewhere along the line this functionality was broken and now it just says there are "-1812597152 objects" in all my arra...

Uiswitch on/off

hi, m new to objective-c, i have made a application of login page in which i have used UISwitch to remember d login details if switch is in on mode. i have done with to remember the login details but problem is that how to use the switch on/off condition. Thanx in advance ...

is it necessary to release a NSInteger in iphone?

i am getting this error does some one knows about it??? 2009-07-08 18:42:36.778 FlashCards[1297:20b] Category Id=1 FlashCards(1297,0xa0690fa0) malloc: * error for object 0x4fd78a0: pointer being freed was not allocated FlashCards(1297,0xa0690fa0) malloc: * error for object 0x4fdc200: double free *** set a breakpoint in malloc_error_break...

Unit Testing of private methods in Xcode

I'm trying out test driven development in a toy project. I can get the tests working for the public interface to my classes (although I'm still on the fence because I'm writing more testing code than there is in the methods being tested). I tend to use a lot of private methods becuase I like to keep the public interfaces clean; however,...

Xcode 3.1.3 - Organizer The device is not activated. Please activate it using iTunes

Hello, I recently upgraded my XCode SDK to version 3.1.3 and my iphone OS to 3.0. It is important to note that everything was working fine when i had os version 2.2.1 in my iPhone. My iPhone Touch device is not jailbroken and I have a valid provisioning profile in the organizer which is linked to my iPhone Touch however it has a yellow ...

How to build & run Xcode with Applescript?

I'm trying to emulate Xcode's ⌘-R keystroke in another editor (namely, Vim); I thought I would be able to do this with some shell scripting & applescript, but it doesn't seem to be working correctly: open -a Xcode "MyProj.xcodeproj" osascript -e 'tell app "Xcode"' -e 'build' -e 'launch' -e 'end tell' The problem with this is it launch...

What does "error: redefinition" mean? and how do i fix it?

I got this error twice. it says "error: redefinition of '-[SampleTableViewController tableView:cellForRowAtIndexPath:]'" ...

How to debug a Screensaver in OS X

I was wondering if there was any decent way, other than NSLog-ing just about everything - to properly debug a Screensaver app bundle in OS X? The "Screensaver" is a project type in XCode, but there's obviously no Build and Go debugging. Further, I've found that in fact my bundle is getting loaded in to the /System/Library/Framework...

Is there a newer version than Xcode 3.1.2?

For some reason the Interface Builder of Xcode 3.1.2 has graphical bugs. It draws its interface badly and messes up everything. It's a graphics problem on a brand new MacBook Pro. Two months ago that was not the case. But Xcode doesn't offer me an update-function, does it? ...

Why do my OCUnit tests fail with "code 138"?

I'm currently trying to learn objective-c using XCode 3.1. I've been working on a small program and decided to add unit testing to it. I followed the steps on the Apple Developer page - Automated Unit Testing with Xcode 3 and Objective-C. When I added my first test, it worked fine when the tests failed, but when I corrected the tests...

Xcode iPhone - Adding framework works a little bit

No biggie, but when I add the AVFoundation framework for the iPhone, it turns red for some reason I'm unable to figure out why. The project will not compile unless I add this framework, and if I do, Xcode will mark the framework red (apparently that means xcode cannot find the framework), but yet it will work. Here are some screenshots:...

how to add ' in the nsstring in iphone?

i have a string like this nsstring *mystring=@"RahulVyas"; now i want to add this ' so the new string would be 'RahulVyas' any way to do this? ...

Xcode - renaming project causes problem

I'm currently working on an iphone application. I started working on this from a project template that I found on the internet. Now I want to rename this project. I've successfully renamed the actual project file, folder and the executables and some other stuff, but there is one weird problem. If I try running the application on my iphon...

Very basic XCode Objective-C question

I'm making a simple program in Objective-C. It has one class with a lot of methods. I'd just like to put the methods in another file... so I could move the following - (void) myfunc1 {...} - (void) myfunc2 {...} // more functions to another file and replace the above w/ something like #include "myNewFile.something" I'm fine w/ p...

How do I bind str and text?

(IBAction) changeProductText:(NSString *)str;{ lblProductTxt.text = str; } I have that and i am trying to make it so that i can have the str and @"text" but i don't know how to bind them together. Any thoughts? ...

Organizing code in Objective-C and XCode

I have some Objective-C code that looks like this: #define myVar 10 float f = 10.0; - (void) myFunc{ ... } #define anotherVar 20 float z = 30.0; - (void) myFunc2{ ... } // and so on It's all in one class. I'd like to put the first block of code into another file and just reference it somehow. So the above code would end up looking...

iphone SQLite Select Query doesn't work

Hi, In the code below, I am connecting to an SQLite Database, the SELECT query didn't work. I hope you can help me. Thanks if(sqlite3_open([databasePath UTF8String], &database) == SQLITE_OK) { // Setup the SQL Statement and compile it for faster access const char *sqlStatement = "select name,score from game Where name='interclock'"...

Error: expected ';' before 'interface' in Xcode

I'm trying to run through the Hello World tutorial for the iPhone and i get this error: Error: expected ';' before 'interface' I have checked and my files are identical (except for whitespace) to the tutorials, and i can't figure out why i'm having this problem. I can provide code if necessary. HelloWorldAppDelegate.h: // // HelloWorl...