iphone

which database toll used for i-phone(Apple)?

I need help for database tool. ...

Can I access keychain from a webapp (javascript) on the iPhone ?

The question is pretty much in the title ;-) Do you know if there is a webkit API for reading/writing from the iPhone keychain ? That is, I would need to access the keychain from a webapp. Thanks in advance ! ...

Add sub views in Navigation Controller

I have a main view which has 3 labels positioned on the top. At the bottom there are about six buttons. On tapping each of the buttons, a different view is to displayed in the center area. Each of those views have a view controller of its own. In the viewdidload method I set the view frame's y position and height so that it fits in the...

Why won't MFMailComposeViewController send messages?

I am tring to send an email using xcode on Mac PC. For this I am using MFMailComposeViewController class and I have attached the code files: But when I click on send button of the modal view controller then it returns MFMailComposeResultSent object of MFMailComposeResult class but the email did not reach to the specified email id. When ...

iPhone SDK - Using the Speaker / Clicker / Beeper on a 1st Gen iPod

My current need is to provide an audio cue for an application with a timer, that would work on 1st gen ipods (i.e. iPods without a speaker). I know that the bundled clock application of the iPod can use the internal speaker/beeper/clicker to show that the timer has run out. Is there an api to interact with this speaker ? ...

UIViewController won't respond to presentModalViewController...

Hey., I've had a UITableViewController-Class. I've changed the UITableViewController Class to UIVIewController and made and specified the connections in IB new. Everything works fine, except [self presentModalViewController:.....] The compiler says that self my not respond to "self" and the app crashes when rotating the view. thanks fo...

Multiple annotations on a map in objective C for Iphone application

i am using MAPKIT, i want to addAnnotations to the map. i having say GPS coordinates of 4-5 locations, and i want to plot them on the map. i have added one annotation on the map.it works. But when i want to display multiple annotations, i have a problem i am following the same code specified in the below link. http://blog.objectgraph.c...

UILabel only displaying odd objects in NSArray

I have an int which defines the objectAtIndex, which gives it to the string, which then displays it in the UILabel, HOWEVER, when I modify the array (add a word to it in this case) when I have the UILabel go through the array it only displays the odd ones. I have done an NSLog and found out that it DOES PASS EVERY SINGLE THING to the st...

how to convert string to int in objective c

i am trying to display annotations in map. I have the lat and longi in string format. now i just need to convert it to int. NSString *s= @"18.65799"; location1.latitude =[s intValue]; NSLog(@"1%d",[s intValue]); NSString *s1= @"73.774262"; location1.longitude=[s1 intValue]; But when i display [s intValue]the out put i...

Determine a first use of an iPhone application

Hi, I develop an iPhone app and I want to show the user a welcome screen on the first load of the app after installation. That means that the next time the user will use my app he will not see that screen. Any ideas how to determine if this is the first load or not? (DB? File? Settings?) Thanks! ...

How do we check if the iphone is on standby mode?

How can we check if the iphone has gone into a standby mode and returns from that mode programmaticlly? I am using this to force it not to sleep during the game: application.idleTimerDisabled = YES; But if the user uses the sleep button it messes up with my game state in my code. Any help would be appreciated, thanks in advanced. ...

Using file as input, iPhone App

I have iPhone Library in c (it is created from c source in MAC). There is a method that read a file using file path. Now I want to input the file path in Objective-C to that method. My questions are: Is it possible to do? I mean use c library to read file on iPhone. if it is possible, Where is the location in my project to put the ...

iPhone Development xcode : Putting user input (names) into text array

I am trying to load names in an array using UIAlert and then print them one by one. I can not figure this out can anyone help me with this. I would really your help apprecaite ...

Interacting with IPhone while in sleep mode

I want my app to keep running and interacting with the user, even if the user presses the sleep button. So far I have learned, that my app can stay alive with the following code: NSTimer *timer = [NSTimer timerWithTimeInterval:0.5 target:self selector:@selector(timerFireMethod:) userInfo:nil repeats:YES]; [[NSRunLoop currentRunLoop] ad...

Xcode documentation links behave crazy

The links in Xcode documentation, that mean the methods in the "Tasks" for example, when i only put the mouse on the links, then the page go up. What happen to Xcode? ...

Threading mechanism: preparing and releasing a cache in the background

Preface: This has become a quite a long post. While I'm not new to programming, I have close to zero practice around threading and could need some help here... This is probably a common problem that could be described in shorted words, but I'm a bit overwhelmed with it. Some background first... I'm writing code for the iPhone where I ...

How to debug why a sound won't play via AVAudioPlayer?

I have a simple iPhone app with several sounds already playing. However, one in particularly won't. The code block I've hacked up is: NSString *soundPath2 = [[NSBundle mainBundle] pathForResource:@"gameover" ofType:@"wav"]; NSURL *soundFileURL2 = [NSURL fileURLWithPath:soundPath2]; NSError *err; AVAudioPlayer *sound2 = [[[AVAudioPlaye...

Number of weeks in month

I have the following code: NSDate *dateNow = [[NSDate alloc] init]; NSTimeInterval timeDifference = [usersDate timeIntervalSinceDate:dateNow]; // Get the system calendar NSCalendar *sysCalendar = [NSCalendar currentCalendar]; // Create the NSDates NSDate *date1 = [[NSDate alloc] init]; NSDate *date2 = [[NSDate alloc] initWithTimeInterv...

iPhone - Annotation image disappears on touch

I am annotating my map and setting an image just fine, but when I tap the annotation on the MapView, the image goes from my custom image back to the red pin. Why is this? - (MKAnnotationView *)mapView:(MKMapView *)newMapView viewForAnnotation:(id )newAnnotation { MKPinAnnotationView *a = [ [ MKPinAnnotationView alloc ] initWithAnno...

NSURLConnection leakage

Hi, I'm following the official Apple sample http://developer.apple.com/mac/library/DOCUMENTATION/Cocoa/Conceptual/URLLoadingSystem/Tasks/UsingNSURLConnection.html While examining my code with Instruments I found a leak, caused by the non released NSURLRequest. I've now included a [request release] shortly after NSURLConnection *con...