iphone

iPhone SDK - navController pushViewController - not responding..

I have a view that has a navigationController with two buttons, START (essentially a login button) and SETTINGS. When I click SETTINGS, the settings view appears and dismisses as planned. I can click on settings and then click back many times without anything crashing. Good. Now, when a user clicks START, I call the SHOWLOGOFFBUTTONS me...

Is there a preferred method of database management/object persistence on the iPhone?

I've seen several approaches, and each seem to have significant plusses and minuses. I'm learning iPhone development, I'm building a relatively simple app, which, at it's core, is really not much more than CRUD operations on 3 or four related entities. I'm used to ActiveRecord-type object persistence. The implementations for Cocoa Touch...

Unix Error on Mac

Hello, I've been trying to upload my app to an Iphone, but I get the error: "terminate called after throwing an instance of 'Security::UnixError' what(): UNIX error exception Command usr/bin/codesign failed with exit code 6" Any idea of what in the world... ? ...

iPhone/iPod receive messages from C# tcpip server using CocoaAsyncSocket

Hello, i'm trying to send/receive data over wifi to an iphone/ipodtouch app from a C# tcpip server. for this i used cocoaAsyncSocket from the google project. If i push a button and i send a request from ipod to server it returns the requested data(song title for example)..i want to know every second what song is playng...so from C# serve...

How to write a simple Ping method in Cocoa/Objective-C

I need to write a simple ping method in Cocoa/Objective-C. It also needs to work on the iPhone. I found an example that uses icmp, will this work on the iPhone? I'm leaning towards a solution using NSNetServices, is this a good idea? The method only needs to ping a few times and return the average and -1 if the host is down or unreach...

What are the ramifications of deleting your old distribution certificate if you have lost your private key? (iPhone SDK)

If I lost/have no access to the private key associated with a distribution certificate: Can I just create a new one? If I do, will it produce any problems during the submission process? Will apps signed with the old certificate stop working? Will I be able to update apps signed with the old certificate? ...

iPhone development with an Intel GMA 950

Hi, I am thinking about purchasing a used MacBook with an Intel GMA 950 graphics card for iPhone application development. Will this card present any problems? So far I have only been able to find this thread: http://forum.unity3d.com/viewtopic.php?t=17454 but I don't have enough experience to understand what they are talking about. A...

is the main.m really the place, where the autorelease pool of the main run loop is created by every event?

#import <UIKit/UIKit.h> int main(int argc, char *argv[]) { NSLog(@"new event..."); NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; int retVal = UIApplicationMain(argc, argv, nil, nil); [pool release]; return retVal; } If that's the case, then the main() function would have to be called on every event, ...

Laying out UIButtons - easy way?

I am making a table which has a row that looks like the "To:" line in the Apple Mail app. When you add new people to Mail from your address book, their name shows up in a rounded button. I can create the button and use sizeToFit to make it fit snugly around the text - no problem. However, once I do that, I can't figure out how wide the...

How does multithreading on iPhone OS work? How do I use it?

I am curious about threads on iPhone. Are they easy to establish and to maintain? How does it work on the iPhone? Is it real multithreading? ...

Is there a way to see what's exactly going on in UIApplicationMain()?

A long time ago I came accross a piece of code from an Cocoa Touch class. I was able to see what's going on exactly. Unfortunately I dont remember where that was. I'd like to see what UIApplicationMain() exactly does. Just for interest. ...

Should I -drain or -release an autorelease pool in iPhone OS?

The doc says: In a garbage-collected environment, sending a drain message to a pool triggers garbage collection if necessary; release, however, is a no-op. In a reference-counted environment, drain has the same effect as release. Typically, therefore, you should use drain instead of release. If I get that right, they ...

Is it possible to add an object to a specific autorelease pool?

In the docs there is an addObject: method of NSAutoreleasePool. I thought about this: NSString *myString = [[NSString alloc] initWithCString:"Does this work?"]; [thePool addObject:myString]; [anotherPool addObject:myString]; Is that possible? I always read that I can only add objects to the topmost one on the autorelease pool stack. ...

iPhone 3G Connection Enabling

Hi, My application needs Internet Connection. It seems like if I keep my iPhone idle for a while it shuts down its 3G connection. Once I wake it up (slide to unlock) and run my application, it cannot connect to the Internet. I have to run Youtube or Safari first, then it gets the Internet connection, then I have to shut down Youtube/ Sa...

do I need to explicitly alloc my NSNumber?

I am defining a number, as follows: NSNumber *nn0 = [NSNumber numberWithInt:0]; It works fine without any alloc. My understanding is that if I use numberWithInt, alloc and init are called automatically. If I try to release at the end of my function, I run into problems: [nn0 release]; I get a runtime error. My question is: if I us...

jpg or png for UIImage -- which is more efficient?

I am grabbing an image from the camera roll and then using it for a while as well as save it to disk as a PNG on the iPhone. I am getting the odd crash, presumably due to out of memory. Does it make a difference if I save it as PNG or JPG (assuming I choose note to degrade the quality in the JPG case)? Specifically: is more memory t...

how to handle network switching in iPhone?

Hi All, I just developed an iPhone audio streaming application...Now it can play audio files without any problems..The problem arise when the iPhone network switches from 3G to WiFi and viceversa..I need to pause the stream while network switches, but I couldn't able to resume playback when network comes..Can anybody point me to how to ...

iPhone - UIImagePickerController shows a white screen sometimes

Hi I am using a shared instance of UIImagePickerController in my application. I am using the Camera Roll as the image source. Sometimes when the image picker opens, instead of seeing the photos gallery, I am able to see only a blank white screen. This issue is not reproducible every time and happens only some of the times. Has someone...

how to add a simple new UIView in a window based application programmatically in iphone?

i want to add a new View Which Contain Anything in a window based application programmatically could someone tell me a step by step process to do this and also how to add controls on that new view programmatically. i have created a new view and added a label in that now how do i add a button and i want to change the text of label when i...

UILabel - autoresize

Hi, How is it possible to resize size of text in UILabel in order to fit in the label? (I don't want those 3 dots to appear) Thank you in advance. ...