objective-c

Definitive answer to what playersToInvite is for.

The Game Center documentation indicates that the playersToInvite parameter is non-nil when your application is launched directly from the Game Center application to host a match. A few people have asked how this works exactly, i.e. there doesn't appear to be a way to select a friend from the Game Center application and invit...

How to release the elements of an NSArray, loaded by arrayWithContentsOfURL ?

I am too dumb to know the answer to this one - does anyone know the answer definitively? NSMutableArray *happyDictionaryEntries; @property (nonatomic, retain) NSMutableArray *happyDictionaryEntries; -(void) getStuffFromServer { .. self.happyDictionaryEntries = [NSMutableArray arrayWithContentsOfURL:[NSURL URLWithString:aUrl]]; } ...

How to pass a managedObjectContext to a second and third view...

I am trying to pass a context from my app delegate to my rootview, then to my secondary view. The secondary view is where all the data is really loaded, the rootview is just a quick synopsis of a few key points. When I instantiate the context in appDelegate i log to check if it is not nil: NSManagedObjectContext *context = [self managed...

Unable to show 2 moviePlayer in same class

- (void) Scrollviews { self.scrollView = [[[UIScrollView alloc] initWithFrame:CGRectMake(32, 110, 3000.0, 237.0)] autorelease]; self.scrollView.contentSize = CGSizeMake(NPAGES * 320.0f, scrollView.frame.size.height); self.scrollView.pagingEnabled = YES; self.scrollView.delegate = self; [self.scrollView setUserInteract...

Access an objects property dynamically using a string with property name in Objective-C

I have 2 objects, AddressBook and AddressCard. The AddressCard has the properties name, email, & birthday. The AddressBook has a lookup method that takes a string as an argument, and searches each added AddressCard for a match. In this lookup method I'd like to have an NSArray of each of the fields i'd like to search in the AddressCards....

How to stream MMS:// link on iPhone?

I have been trying to find the solution for this but I haven't found out anything yet. Please help me with this if you have any idea about this problem ...

Is prefs a predefined keyword when nesting method calls in Objective-C ?

Hi, I am working through a book on Cocoa and Objective-C. In the example for nested method calls: [NSString stringWithFormat:[prefs format]]; I am assuming that prefs is the return type for the nested method call to format...is this correct ? Thanks, Scott ...

SSL Wrapper around iphone's app

hello, I have an app that connects to an inhouse gameserver. I want to wrap the traffic in SSL to prevent hackers from sniffing the passwords and what not. Anyways, how do I go about doing that with an iphone app? I'm using CFNetwork to communicate to the server, and everything is in our own inhouse protocol instead of using http or some...

The graphing in Apple's stock app

Is the graphing portion of Apple's "Stocks" iPhone application available to developers? My guess would be that it is not. If I am right, on a rough scale on 0-100, how difficult would it be to reproduce? (I know this is a silly question, but anyway. Just want some idea.) Also, what framework do you think would be the most suitable for t...

Does CGContextDrawImage decompress PNG on the fly?

I'm trying to write an iPhone app that takes PNG tilesets and displays segments of them on-screen, and I'm trying to get it to refresh the whole screen at 20fps. Currently I'm managing about 3 or 4fps on the simulator, and 0.5 - 2fps on the device (an iPhone 3G), depending on how much stuff is on the screen. I'm using Core Graphics at ...

Callback for kAudioSessionProperty_AudioRouteChange not called in one case

Hi all, I want to be notified if headphones are plugged in or plugged out. I'm currently doing this using a property listener like this: AudioSessionAddPropertyListener (kAudioSessionProperty_AudioRouteChange, myCallback, self); This works perfectly well in all cases except in one, it goes like this: Launch, iPhone is unmuted, no he...

Disable Full Keyboard Access for App

Can "Full Keyboard Access" (System Prefs -> Keyboard -> (Radio) All Controls) be controlled with some API? It causes major issues when this thing is on in my app (like buttons not working as expected etc ... it has some custom UI) Regards, Erik ...

issue about subview retain superview in objective-C

Hi, here's a problem with memory management issue. Say i have a view A, it has a pointer that points to its subview B. I use @property(nonatomic, retain) refer to the view B. Now in subview B, i need a pointer to point back to its superview A. So i use another @property(nonatomic, retain) refer to its superview A. Here's my concern, i...

SIGKill Without warning or stack trace with NSLogv

I know this is a somewhat vague question, but during debug execution, the app I'm working on dies without any stacktrace or warning and with simply this message in the debug console: Program received signal: “SIGKILL”. I have NSZombieEnabled, NSDebugEnabled, MallocStackLoggingNotCompact and MallocStackLogging all set within XCode....

ignoring a range of items from an nsarray

I have an NSArray of unknown items. I know there will always be more than 10 items. I would like to assign all but the first 10 items to an NSString. Something like: NSString *itemString = (NSString*)[itemArray StartingIndex:10]; Is there a simple efficient way without iteration to accomplish this? Thanks! ...

Help needed on writing a TCP socket using NSStream in objective c

I current writing a TCP socket using NSStream. I'm able to open the stream but i can't write out anything (eg. a NSString or NSData). ...

Obj-C: Convert a video's current time(double) to frame(decimal).

Hi, My app plays a movie and I must keep track of, and interact with the playback time. I use the currentPlaybackTime property to grab a double value of the movie's playback time. I want to use this to trigger some if statements at certain points, But first it would be really helpful if I could convert the value into a value with only 2 ...

Pointer to good tutorial for SSL connection for iphone app?

Hi, I've scoured the web and stackoverflow for a good SSL tutorial for an iphone app. I have been unsuccessful at finding something straightforward and easy to comprehend. Any pointers on where to read more about it? I just want to see how i can have a secure connection for login and data transfer via SSL. Thanks! ...

Does the order of methods in my .m file matter to the compiler?

I think that i have noticed moving certain methods around causes errors when i compile that are remedied by putting the method back where it was. am i making this up? is there are rhyme or reason to the order that these need to be in? is decided by the order of my .h? what about delegate methods and inherited methods? ...

Backing up iphone app while still developing (before its on the app store)

I am developing an iphone / ipad application. My plan is to have my beta customers use it before I have submitted it to the app store to help me work out all the issues. Nonetheless, they will be entering real information to the application. Thus, I would like them to be able to back up the application to iTunes using the sync feature. ...