iphone

Does iPhone OS 3.0 have a real garbage collector?

If not, are there any plans to add Garbage Collection to the iPhone? Related question: This question from January (pre OS 3.0) says the iPhone had no GC at the time. Thanks! ...

GKSession Problems - Objective-C GameKit

Ok, I've been trying to create my own GKSession object and the delegate method is giving me an error in the console that I haven't figured out how to fix just yet. I was wondering if anyone had any suggestions or had encountered this problem? *Just a note - the variable peerStatus is defined elsewhere in my code. The peer can either be g...

Why does release build fail and not debug?

I have a device/debug build that works fine. When I build for release and distribute onto the device, I get this error: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[UILabel setWidth:]: unrecognized selector sent to instance 0x1605a0' It is occurring in cellForRowAtIndexPath: cell.videoNa...

iphone 3gs video capabilities

I am creating an app that needs to capture contents of a video recorded in-app with the video camera api for "supporting devices" AKA 3GS. Was wondering if anyone knows if it is possible to do the following: Edit your video that was recorded in-app by virtue of cutting down frames to a specified duration. Say, 2 seconds. This might amo...

Pass and access structures using objective-c

I want to know how to pass structures to another function and subsequently access that structure in the called function. I'm developing for the iPhone and the reason I'm using structs is so that I can eventually pass data as structs to a server being built in C. Here's the structure: struct userInfo{ NSString *firstName; NSStri...

iPhone audio playback: force through internal speaker?

Does anyone know if it is possible to implement playback of an audio file through the internal speaker even if the headphones are plugged in? ...

iphone indexed table view problem

I have a table view in which I'm using sectionIndexTitlesForTableView to display an index. However, when I scroll the table, the index scrolls with it. This also results in very slow refreshing of the table. Is there something obvious I could be doing wrong? I want the index to remain in place on the right while the table scrolls. This i...

Animate cell height change in UITableView

I'd like to change the height of a UITableViewCell when it gets selected. I'm able to do this by defining - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath and calling the tableview's reloadData when the cell gets selected, but I'd like to have the change be animated. Any suggestions on how...

iPhone - Corrupt JPEG data for image received over HTTP

I'm getting an image over HTTP, using NSURLConnection, as follows - NSMutableData *receivedData; - (void)getImage { self.receivedData = [[NSMutableData alloc] init]; NSURLConnection *theConnection = // create connection } - (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data { [receivedData app...

iphone MGTwitterEngine - post a tweet with my app signature

I'm using MGTwitterEngine in an iPhone app, and it works great. The one thing I want to change is the "posted from MGTwitterEngine" that appears on Twitter. Obviously I'd like it to say "from MyCoolApp", and link to the app's website. When you register an app with Twitter (http://twitter.com/oauth_clients/create), you get this info: * ...

Protocol to secure a connection between a mobile device and a web service?

Hi, I'm looking for a protocol to secure a connection between a mobile device and a web service. I want to ensure that only the mobile device can perform actions on the web service and vice versa. Data doesn't need to be encrypted. I know Oauth, but it seems that it's more used to secure connections when you got 3 different entities (...

How can an iPhone access another non-iPhone device over wireless or bluetooth?

I'm trying to figure out if an iPhone can connect to another non-iPhone device over wireless or bluetooth and have seen conflicting information. Much of what I've found was before version 3.0 of the SDK came out, when it certainly wasn't possible. Looking at questions like this mention you can't connect to an arbitrary device unless if...

Uploading Video with iPhone

Is it possible to upload video to a server? I know that images are possible. If someone can just point me in the right direction that would be awesome. Thanks ...

Seems impossible: to animate the height change of row in UITableView

This seems like an impossible task after studying the docs from Apple. Is it possible to animate the height change of a table row? As far as I can tell, you can only animate inserts and deletes. You can also animate things inside a table view cell (the layout etC) but you can't really animate the height of a cell (and expect the rest o...

iPhone SDK2.0 on Devices running iPhone OS 3.0

Hi Guys, Sorry for the long post.... I'm trying to understand if the behavior I'm getting on my app is "normal". I have an app developed against the 2.0 sdk version (i.e. to make sure max #of devices can run it, as I don't use any "special" 3.0 features I tend to think the lowest denominator must be the best choice). So In Xcode (lates...

Push View Controller into Navigation Controller

Hi all, Some times when I push ViewController into Navigation Controller, the viewDidLoad() method of the View Controller is not called. And this cause my application to crash. I would appreciate any help. I forget to mention that I load the view from the nib before I push it to the Navigation Controller. Thanks, Sarah ...

Using NSThreads in Cocoa?

I wanted to know how to use threads in Cocoa. I'm new to this so I don't understand the documentation that well. The Top half of the code is for timing and the bottom half is for the date. Can anyone show me how to use a single thread and how to use 2 threads to handle both operations. NSDateFormatter *timeFormatter = [[[NSDateFormatte...

Delay when using AudioQueueStart()

I am using the Audio Queue services to record audio on the iPhone. I am having a latency issue though when starting recording. Here is the code (approx): OSStatus status = AudioQueueNewInput( &recordState.dataFormat, // 1 AudioInputCallback, // 2 &recordState, // 3 CFRunLoopGetCurrent(), // 4 kCFRunLoopCommonModes, // 5 0,...

Retrieving an iPhone photo saved to the photo library

I am saving images to the photo library and would like to retrieve them dynamically to display in future launches of my app. I use the WriteToSavedPhotosAlbum function, as below, but do not get any info to access the saved photo programmatically. UIImageWriteToSavedPhotosAlbum(UIImage *image, id completionTarget, SEL completionSelector...

How to I call a function at the same time on multiple iPhones?

I'm starting to use GameKit for a p2p project, and I want to call a function at the same time on both clients. Assuming their clocks aren't set to exactly the same time, how can I call NSTimer or whatever so my function is called at the same time on both clients? Thanks! ...