xcode

find and replace / refactoring programmatically for files in mac

Hi, I want to make a program that will search and replace some words occurrence in a file. I am using xcode. I want to do this programmatically using some standard free API in a MAC application. ...

How to choose between a window , view or a navigation based application while developing for the iphone?

I am a complete newbie(as is already evident) and I can't just figure out when to choose what. I have been through countless googling operations but found no help on the said question, hence had to ask here. It would be great if any of you could explain or even point me to some online resource which does it. Thanks again for your time. ...

MKMapView not allowing user interaction on Ipod Touch OS 3.1.3, works correctly on simulator 3.2 / 4.0

Hi, I have been coding and testing an app which uses a navigation controller, tab bar and table views together as shown in this tutorial video: I have also coded a MapView page which shows custom annotations. This seems to work fine in every version of the simulator I have tried it on. This morning I have finally got the app running on...

UIWebView - adding an object to the address

I have a UIWebView that I'd like to load a web page and also append an object to the end of the address. this is what I have: NSString *urlAddress = @"http://www.wikipedia.org/%@",recipeName; the name of a particular recipe would be appended to the end of the URL I'm getting the "statically allocated instance of Objective-C class N...

how to config Adhoc for Xcode 3.2.4 ?

it not show the same as old version it only uncheck get-task-allow in this version show like this how i config it? <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt; <plist version="1.0"> <dict> <key>application-identifier</key> <stri...

What's the difference between the RootViewController, AppDelegate and the View Controller classes that I may create?

I am trying to learn programming for the iPhone and I keep seeing these files and I am not sure when is each file and content of those files referred to in the execution of a program built for the iPhone. I am trying to follow tutorials and tips available online but nowhere is there a point by point comparison or something like that. It ...

UIWebView - NSStringWithFormat problem

I'm trying to get a UIWebView working with the following code: NSString *urlAddress = [NSString stringWithFormat: @"http://www.wikipedia.org/wiki/%@",recipe.name]; recipe.name is the entity and property from the core data model I used NSLog to test the 'recipe.name' and it is outputting correctly to the console I tried this ...

Anyone done an Objective-C Xode version of Osherove´s TDD Kata "String Calculator"?

Always trying to code better and I am interested in doing TDD for Objective-C and Xcode. Do you know any post that implement something like Roy Osherove´s "String Calculator"-Kata Update: trying to find out how to speed up TDD on iOS ...

SenTestKit: cleaning up after ALL tests have run?

I am using SenTest in XCode for my unit tests. I must run a command-line task for my unit tests to test. I can do that in the +initialize method of my test class (subclass of SenTestCase, of course). I would like to terminate the command-line task when the tests are done. Since there's not an opposite of +initialize, I'm stumped. Is th...

Is it possible to download an older version of XCode?

I don't develop in XCode very often, and recently MacPorts told me I needed to get 3.1 in order for a package to work. I went to apple, and they offered me the latest version, which turns out only to work for OSX 6. Since I have OSX 5, it doesn't help me any. Is there any way to get xcode 3.1.* from apple at this point? ...

How to listen on a network port in Objective-C

Hi! I am trying to make an application for iPhone that can listen for traffick on a specific network port. A server on my network is sending out messages (different status messages for devices the server handles) on a specific port. My problem is that when I make a thread and makePairWithSocket I block the port for others who want to s...

NSCalendar to Display Weekday

Hello, Im using an NSCalendar to display the week day, I have no problem displaying the weekday in an integer, but i am confused as to how i might get it to tell me the weekday, i.e. "Thursday." I read that %A, and %a might do the trick but I do not know how to implement them. My code is below. NSDate* now = [NSDate date]; NSCalendar *...

iPhone xCode changes ignored

I've been following a tutorial using Cocos2d and I've been learning a lot. I got to the part inserting a "Game over" bit. Previously it would just NSLog "You lose". I went over to a different project and started something else. Then I came back and removed the NSLog line and changed it for the GameOverScene (replaceScene). However, ...

Make choice of Optimized (armv6 armv7) architecture appear in XCode project settings

In XCode, when I open project settings, I only see the following two choices for the setting "Architectures": 'Standard (armv6 armv7)' and 'Optimized (armv7)'. How can I get the choice of 'Optimized (armv6 armv7)' to appear? I'm using XCode 3.2.3. ...

MPMoviePlayerViewController problem

How can I play a movie in my app? I tried using this code, but xcode gives me this error: NSBundle *bundle = [NSBundle mainBundle]; NSString *moviePath = [bundle pathForResource:@"welcome" ofType:@"mp4"]; NSURL *movieURL = [[NSURL fileURLWithPath:moviePath] retain]; movieView = [[MPMoviePlayerViewController alloc] initWithContentURL: m...

Whats the best way to create an iPhone and an iPad application simultaneously?

I have an iPhone app that I would like to port over to the iPad, but I would like to have as little duplication as possible. How do people usually go about doing this? In xcode can you have different targets for iPhone and iPad and perhaps do some pre-processor checks? Or is it best to simply have two separate projects altogether? Not...

iPhone Submit to Apple - validate application does nothing

I've submitted all the details into iTunes connect and my app status is 'prepare for upload'. However, after I build and archive and select 'validate application', nothing happens. Any ideas what could be causing that? ...

Fast Fourier Transform for Noisy Time Series Data

I've got a sample size of 180 data points. Its somewhat of a noisy sine wave. Trying to figure out the period / frequency of the data . Working in Xcode - read over the Accelerate framework but it seems very complex. Any suggestions on how to get the period / frequency of the data ? ...

How do I set up several custom UIViewControllers under one central view controller programmatically?

Hi. Being new to Xcode and Objective-C I find it hard to get my head around the Interface builder and Objective-C when doing things that are following the basic pattern. I have created a subclass of UIViewController that I want to instantiate several times to make a grid with each row being controlled by an instance of this class. So the...

How to handle class methods being called again before they are finished?

Hi. What is the best way to handle this situation on an iPhone device: My program ramps the pitch of a sound between two values. A button pressed calls a method that has a while loop that does the ramping in small increments. It will take some time to finish. In the meantime the user has pressed another button calling the same method. No...