xcode

controlling which project header file Xcode will include

My Xcode project builds to variations of the same product using two targets. The difference between the two is only on which version of an included library is used. For the .c source files it's easy to assign the correct version to the correct target using the target check box. However, including the header file always includes the same ...

iphone sdk - Itunes connect how to change device requirements?

What is it im supposed to set in the plist so that it shows that it does not work on the ipad on itunes? its somthing to do with this http://developer.apple.com/iphone/library/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/AdvancedFeatures/AdvancedFeatures.html but I dont see anything that seems appropriate? Im still kind of...

How to test if a web service is available.

I am retrieving data from a web service with... NSString *myDataString = [[NSString alloc] initWithContentsOfURL:url encoding:NSUTF8StringEncoding error:&outError]; How can I handle a situation where the web service is not available? As it is now the app simply hangs up. Is there a way to test if a site is available? olso, initWithCon...

execute code only once in objective c. not every time the app launches

I want to delete a table from a sqlite3 db at certain times, i.e. after its been uploaded to a server. i want to set a flag that will mean the table does not get deleted the first time the app is launched. after that the logic will take care of when the table in the db is deleted. i'm currently using nsuserdefaults to set a flag which...

How do I use UIImagePickerController just to display the camera and not take a picture?

Hello All: I'd like to know how to open the camera inside of a pre-defined frame (not the entire screen). When the view loads, I have a box, and inside it, I want to display what the camera sees. I don't want to snap a picture, just basically use the camera as a viewfinder. I have searched this site and have not yet found what I'm looki...

Core data, threads saving to a persistant store w/out locking, whats could go wrong?

My application downloads and caches photos into coreData in background threads while still allowing the user to poke around in the application. Currently after a photo's data is done downloading I start a thread to save it to coredata using the suggested shared storeCoordinator and thread-owned context then merge on the main thread, I a...

iPhone UIButton won't disable after setting enabled = FALSE

I'm doing the HelloPoly example from the Stanford class and trying to disable the increase/decrease buttons when appropriate #import <Foundation/Foundation.h> #import "PolygonShape.h" @interface Controller : NSObject { IBOutlet UIButton *decreaseButton; IBOutlet UIButton *increaseButton; IBOutlet UILabel *numberOfSidesLabel...

Adding a button inside an image.

CGRect frame = CGRectMake(round((self.view.bounds.size.width - kImageWidth) / 2.0), kTopPlacement, kImageWidth, kImageHeight); self.containerView = [[[UIView alloc] initWithFrame:frame] autorelease]; [self.view addSubview:self.containerView]; // create the initial image view frame = CGRectMake(0.0, ...

Detect phone calls in iPhone

Hi. I'm developing an app in which, among other things, the user can input a phone number. Later, while seeing the inputed information, I display the phone number in a UITextView which detects the phone number automatically. In an iPhone, when the user presses the phone number, he is automatically asked if he wants to make a call. This...

How do you uninstall old custom installs of Xcode?

Hi, When I install a beta, I do a custom install into a separate folder to the latest release version. I have several old beta installs. How do I uninstall the old custom versions of Xcode? Can I just trash the folder? Our do I need to use Terminal? The release notes suggest to use this: $ sudo /Library/uninstall-devtools -...

Stopping network activity indicator.

I used the below code to load a webpage. Everything works fine, but I want to stop the network activity indicator after completing loading the webpage. How can we know that the webpage is loaded completely. Anyone please help. UIApplication* app = [UIApplication sharedApplication]; app.networkActivityIndicatorVisible = YES; // to st...

Debugging on an iPhone device

I have a developer license and I've generated .mobileprovision and .cer files. I've put the provision file on my device, double-clicked the .cer file and added it to the login keychain. But when I'm trying to build the app in XCode, I get the error: CodeSign error: code signing is required for product type 'Application' in SDK 'Device - ...

Xcode code generation

I was wondering if there is a tool (automator script or a third party) to generate code for simple scenarios like add another property. I don't like going to two or three places and write the same thing over and over again. instead I want to say "I want a new property of type int with name X" and it generates the lines in .h and .m files...

iPhone xCode - How to convert NSString HTML markup to Plain text NSString?

Been searching the net for an example of how to convert HTML string markup into Plain text. I get my information from a feed which contains HTML, I then display this information in a Text View. does the UITextView have a property to convert HTML or do i have to do it in code. Tried: NSString *str = [NSString stringWithCString:self.fu...

Detect iphone region

Hi. In my app, the user is supposed to insert a phone number, which is then displayed somewhere else. In the contacts application, when displaying a phone number, it automatically appears in the format of the language selected by the user. Is there a way to do this automatically, or a way to detect the region and then adapt the displa...

Leaks in my UIScrollView helper class

Hi, I want to publish tutorial about how to easily create an UIScrollView on http://www.xprogress.com/ and I just want to check with you guys if the code is alright before I publish anything. Any help will be appreciated and I'll put your name / website on the bottom of the article :) Thanks a lot :) Ondrej header file: /// /// IGU...

Automatically Creating A Zip after Code Signing in Xcode

I have a custom script step in my build process that zips the executable. However this is executing before the executable is signed which is pretty useless. Is there a way to zip the build output after the code is signed, within the Xcode build process. I can certainly do it externally if i need to, but I'd like to make it part of my Xc...

iphone project configurations and active sdk targets

I'd really like to have the various iphone configurations each targeting it's own sdk; right now I've set them up in this way: simulation : base sdk -> iphone simulator 3.0, no code signing debugging : base sdk -> iphone os 3.0, signed with provisioning certificate distribution: base sdk -> iphone os 3.0, signed with distribution cer...

Opening a View with a Table without a NavigationController

Hiya, I'm pretty new to developing with Cocoa Touch/XCode and I came across a problem. I'm making a sort of RSS reader for a newssite and I have 5 views of tables navigated with 5 tabs in a TabBarController. If someone selects a newsitem I want another view to open showing the complete newsitem. My problem is that it won't work. This ...

UIViewController in NSObject not presenting when calling presentModalViewController

Hi, i'm new with iPhone developpement and i try to lunch a UIviewController when the user pressed a button witch will allow the user too send an email. So my AppControler is a NSObject witch contains a UIWindow and a UIViewController* myViewController When i detect the click on the button i create this: MFMailComposeViewController *p...