iphone

write() causes fatal crash when filedescriptor becomes invalid

I'm writing an iPhone App with a webserver in it. To handle a web request, I take the web request and write() to it the data that I want to send back. When I try to download a moderately sized file (3-6MB) it works fine, but if I cancel the download halfway through, the app crashes and leaves no trace of an error. I'm thinking that the ...

NSData to NSString by changing the value null is returned. I need you help

*cipher.h, cipher.m all code : http://watchitlater.com/blog/2010/02/java-and-iphone-aes-interoperability Cipher.m -(NSData *)encrypt:(NSData *)plainText{ return [self transform:KCCEncrypt data:plainText; } step1. Cipher *cipher = [[Cipher alloc]initWithKey:@"1234567890"]; NSData *input = [@"kevin" dataUsingEncoding:NSUTF8StringEnc...

what causes a bad token on iPhone- NSLog(@"token:%@",[devToken description]); crashes

I am getting a bad token passed to me in - (void)application:(UIApplication *)app didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)devToken this code crashes on my iPhone but not my clients. - (void)application:(UIApplication *)app didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)devToken { NSLog(@"token:%@",[dev...

Problem with UITabBar + NavController in secondView viewDidLoad isn't called

My Application is a Tabbar with a navController in each of it's tabs. Now, the problem is to add a custom info button to the navController in the SecondView. I've created the App in InterfaceBuilder and entered the name of the nib to Load there. If I run my App now, the SecondView is shown, but the problem is, that the viewDidLoad is not...

How do I reset the scale/zoom of a web app on an orientation change on the iPhone?

I'm having the same problem that a couple of others have had with getting the correct behavior in a web app on an orientation change, and there doesn't seem to be an obvious solution - I've seen this question asked a couple of times on Stack Overflow and no one's yet been able to answer it. When I start the app in portrait mode, it work...

How to send email when a link is clicked?

In my iPhone application I had an email address. If anyone touches touches that link an email should send to that email address. Is there any way for doing this? Anyone please help.. ...

UIWebView leak? Can someone confirm?

I was leak-testing my current project and I'm stumped. I've been browsing like crazy and tried everything except chicken sacrifice. I just created a tiny toy project app from scratch and I can duplicate the leak in there. So either UIWebView has a leak or I'm doing something really silly. Essentially, it boils down to a loadRequest: cal...

Am I leaking memory here?

Consider the following method, where I build a string and return it. I would like to release the building blocks of the string, but then the string is based on values that no longer exists. Now what? Am I leaking memory and if so, how can I correct it? - (NSString) getMiddahInEnglish:(int)day{ NSArray *middah = [[NSArray alloc] initWi...

UINavigationController (drawRect:)

Hi, I created an application with a TabBarController, 4 TabBarItems and every TabBarItem have is own NavigationController file (everything created in IB). I'm using the drawRect function to design my navigationBar: @implementation UINavigationBar (customImage) -(void)drawRect:(CGRect)rect { UIImage *image = [UIImage imageNamed:@...

How can we add an icon for a finished iPhone application?

How can we add an icon for a finished iPhone application? Simply giving an image in the project folder will solve my problem ? Can anyone please help me! ...

Updated iphone application not live yet

Hi All, 3 weeks back we uploaded an application on the iTunes(V1.0). On Thursday we updated that application with new build (V1.2). I clicked the "Update" button on itunesconnect.apple.com and followed uploaded the new binary and new contents. On the next day the Description and price tag are updated successfully, but the build versio...

Building and versioning on Iphone

Hi, I created an app long time ago using the last SDK on Mac Leopard, I upgrade to Snow Leopard and so now I use the new SDK and can build app for Iphone 3.1.3, I've got a problem now because I can't build my app on my OS Iphone device 3.1 or 3.1.2 How can I change it and allow my app to aso build in older version beginning to 3.1 ? T...

back button wont work.. Iphone

Hi, I have 2 page controls in my app, one for category and when i click details button of that category other page control comes. I have pushed the first view controller and used present modal view controller. Now a need to go back to the home page from the category page control but the view did load and view will appear wont work. Tha...

How to implement VOIP + SIP in iPhone?

Hello all, I want to develop a VOIP application for iPhone . But I don't know the basics of VOIP concepts and also If there are any sources or library available that can I use in my application . So If anyone can provide me VOIP learning resources or library or anything that is useful in terms of VOIP and iPhone it will be precious to...

How can I zoom an image in my iPhone application?

I had an image in image in my iPhone application. The text in the image is not readable as it is very small. How can I zoom it at run time? Anyone please help.. ...

UIImagePickerController does nothing when using camera after I hit "Use" button

Code below. When I hit the "Use" button after taking a picture ... the application becomes totally unresponsive. Any ideas what I'm doing wrong? The "addPlayer:" method is called when a button is pressed on the UIViewController's view. Thanks - (IBAction) addPlayers: (id)sender{ // Show ImagePicker UIImagePickerController *i...

How to uninstall Iphone sdk?

Hi guys, Here Im getting a problem when Im uninstalling the Iphone sdk through terminal with the command as: sudo /Developer/Library/uninstall-devtools mode=all;; When I used this its displaying the command is not found. Is there any other method to unistall Iphone sdk? Anyone's help will be much appreciated. Thank you, Monish. ...

Calculating File size before download

Ok ! Coming to the point directly. What I want to do is explained as follows. I have an url of MP3 file. ( for example Sound File ) Now, When user starts application. Download should start & for that I have implemented following methods. -(void)viewDidLoad { [super viewDidLoad]; NSURL *url=[NSURL URLWithString:@"http://xyz.pqr.com/ab...

want to know the exact size of a data contend in any specified url

hi all i want to know that while specifying url in my iphone native application for downloading purpose it works fine but if i want to know the exact size of data either in kb or in Mb coming from that url how could i do that plz guide me to do that demonstarting a sample code would be a big boost thanks ...

How to turn off the bounce in UIWebView

Hi all, can you just help me turning off the bounce in the UIWebView. Because when we over scroll it it displays the unnecessary space with the grayish back ground. Thanks in advance. ...