xcode

resetting copyright macro in XCode

Ok this is really stupid but for the life of me I can't figure out how to do this. How do you reset the copyright macro that gets placed into the header of each new file? Mine still say MyCompanyName which is irritating. ...

How to reference a environment variable inside Obj-C code

I define a path variable in Xcode source tree called "MY_SRC_DIR". I would like to get the value of this environment variable and put it in a NSString in the obj-c code. For example, -(NSString*) getSourceDir { return @"${MY_SRC_DIR}"; // not the right solution and this is the question } ...

iPad search bar bad memory access?

Hello all, So I am trying to implement a search bar in my app and am very close but can't seem to figure out where this memory error is occurring. This is what part of my search method looks like: filters = [[NSMutableArray alloc] init]; NSString *searchText = detailSearch.text; NSMutableArray *searchArray = [[NSMutableArray alloc] in...

Xcode 3.2.4 and Mac OS X 10.5

Hi. I have a simple question: does Xcode 3.2.4 work on Mac OS X Leopard (10.5) ? ...

Call Google Maps with Url from Objectve-C

i call the url of googlemaps to show a position to a given lat and long. How can i mark this position on the map with a pin ? NSString *latlong = [NSString stringWithFormat:@"%@,%@", einBetrieb.lat, einBetrieb.lng]; NSString *url = [NSString stringWithFormat: @"http://maps.google.com/maps?ll=%@", [latlong stringByAddingPercentE...

iOS4.2 and iOS4.1 on the same machine?

I'd like to start testing iOS4.2 so I downloaded xcode 3.2.5 and iOS4.2 beta SDK. Unfortunately, I think it installed over my previous xcode 3.2.4 and SDK 4.1. Short of downloading 3.2.4 and 4.1 and installing to another directory, is there a way to get the 4.1 SDK into 3.2.5 and compile both SDK versions? Thanks! ...

How to change textfield height for an ipad using interface builder?

We're using Interface Builder for developing an app for the iPad and we can't figure out how to increase the height of the textfields. When we were using IB to develop an application for osx, you could go to the textfields attributes and under the control section you could set line break to word wrap instead of clip. When we try to ...

iPad SplitView Application not taking up entire window

Hey guys, I am working on a split-view based application for the iPad. I created a menu overlay system that has a button that leads into the split-view application. See comment for image When you click the enter button, however, it results in this: http://commandoswat.webs.com/Screen%20shot%202010-09-16%20at%201.37.11%20PM.png Here i...

Where does xcode take application's Identifier from?

Hi guys , I think my head soon explode. I've been working on my application for some time and finally git an iPhone for testing on device, now I'm trying to run my app on iphone but can't do it. I've done all necessary steps but getting an error [BEROR]Code Sign error: a valid provisioning profile matching the application's Identifi...

Xcode -- how do I set $(SRCRoot)?

I am working with someone's library . . . they have set $(SRCRoot) to the location the library was in on their computer. On my computer, it is in a different location. This is screwing everything up. How do I change it? ...

how do I force Xcode to rebuild the Info.plist file in my project every time I build the project?

Apparently the file gets cached, so it only gets built when it gets changed. I have environment variables set to increment my version number though, and such, and update them independently of the plist (in the project build settings, actually). Is there a script that I can use as a script build phase that will force the Info.plist to up...

Duplicate symbol from single library in iOS4.1 SDK

I am developing an iPhone application. I am unfamiliar with Xcode, so please bear with me. I have the iOS 4.1 Device SDK. When I select "Simulator" in the "Active ..." drop-down box, my application compiles without errors and runs in the iPhone simulator. When I select "Device" in the drop-down box, however, I get the following linker e...

Interface Builder Master/Detail bindings for Core Data

I have been working on a master/detail core data program for a while now and have a good start. I'm stumped when it comes to the correct binding for the detail array controller. It seems that I have tried every combination of managed context with content array binding or managed context with content set binding. I have one array contr...

iPad app documentsw folder

Is there a way to tell iTunes not to backup the contents of the apps documents folder? ...

How to delete /* and */ quickly in XCode

In XCode there are some useful functions commented out with /* and a corresponding */. Is there a shortcut that will quickly remove these? Can a shortcut be made using AppleScript, or is there a better way? ...

How to add and delete items in an array from inside a child view

Let's say I declare an NSMutableArray in the class file foo.h. Then in the viewDidLoad method in foo.m I populate the array. Inside foo.m I can add, delete, or modify array elements. Then let's say the following code executes inside foo.m [self.navigationController pushViewController:bar animated:YES]; This will switch the view and p...

xcode : How do I make sure the deployment target of my binary is set at 3.0?

How do I make sure the deployment target of my binary is set at 3.0? My base SDK is 4.0 because I'm using xcode 3.2.4 and this is the only SDK I can use. I thought it was possible to get the binary to target 3.0 using the settings in the Build properties but when I upload the binary to iTunes Connect it still says the minimum os is 4.0. ...

Can't remove object from NSMutableArray

Hi guys, i am trying to remove objects from my NSMutableArray but i keep getting bad_access error. I used "removeAllObjects" and "removeObjectAtIndex" but none of these work. If i add objects to this array , everything is fine. What i want to do is to clear my array before filling it again. I didnt release the array before trying to...

How do I get Xcode to treat an Info.plist as an iPhone/iPad Info.plist?

I have two cocoa-touch apps in one Xcode project. Xcode gives me iPhone/iPad related options for keys in the first's Info.plist, such as "Launch Image (iPad)". But, Xcode gives me Mac OS X options for keys for the second, such as "Java classpaths" and "Quick Look preview height." Here's how the project was built: I created the new pr...

createEditableCopyOfDatabaseIfNeeded create an empty copy of db!!!

Hi! I'm using the "famous" :) function createEditableCopyOfDatabaseIfNeeded for create an editable copy of my db in an iphone app.. The function copy the original db in the documents directory only if there isn't already a copy of the db.. pretty simple.. but now I'm in trouble because I don't know why but with SDK 3.2.3 in iOS 4.1 the f...