iphone

Detect incoming phone calls

I need to determine when an incoming phone call arrives. I know that applicationWillTerminate will be called if the user takes the call and applicationWillResignActive when the popup with the confirmation message for the call appears, however: -applicationWillTerminate is also called when the app exits by user request or battery is about...

Discovering the user's first and last names?

I am trying to programmatically discover the first and last names of the iPhone user. Is this possible at all? Calling this ... getpwuid( getuid() )->pw_gecos == "Mobile User" ..alas. Iterating over the address book finds all address book records, but doesn't distinguish between the device owner and anyone else (that I can tell). Gi...

Can I use the same facebook connect api key/secret in both iphone app and website?

I have an iphone app and a website, and the iphone app can access the website's data through the api of my website. Now, the users can sign up the website through the facebook connect. The next step of plan is that the users should sign in the iphone with facebook connect, and sync the data between the iphone and the website. I have a...

adding a category for UIView animations

Hello, I would like to have a category for UIViewController containing few simple methods to move the view controller's view around, fading it etc... For example the method below fades in/out a the VC's view. I'm not using instance variables and the onTransitionIn: method is called, the problem is the view doesn't fade in/out. Can som...

Serving a json file for IPHONE app

I am trying to get an introduction to serving files to the iphone. I have watched tutorials on getting files from sites like Flickr and twitter. I need a tutorial to show me how to set up the site that is feeding that information. Most of those sites send you a json file. Can I just keep a dynamic file on a server using php? ...

presentModalViewController is not working for the button event in iphone?

Hi, In my application i have used the UiViewController and able to push the other view using the PushViewController. But, whenever i am using the presentModalViewController at that time i am not able to get whole functionality of the BackButton click event on the view which is working fine for the pushviewController.By using the debug i...

When is the right time to change the datasource for a UITableViewController

After rendering a UITableView with a given datasource, I want to be able to switch to a different one prior to calling reloadData. Tried doing it in the method - (void)viewDidAppear:(BOOL)animated; but as far as I can see this isn't called when all the visible cells are rendered. By placing a breakpoint it seems as if nothing is act...

NSMutable array invalid after objectAtIndex

@implementation Level @synthesize doors, rooms; - (id) init { self = [super init]; if (self != nil) { rooms = [[NSMutableArray alloc] init]; doors = [[NSMutableArray alloc] init]; } return self; } - (void)generate{ int room_count = 2; Room *room; for (int i=0; i<room_count; i++) { room = [[Room al...

iPhone Core Data Recursive Relationships

I'm having some trouble with a recursive relationship in core data. I've got a managed object called a "SearchCategory", and that category can have "Categories" and it can also have a "Category." In the managed object modeler, I've got two relationships set up on the SearchCategory entity, and both point back to the SearchCategory enti...

Any free polygon library for the iPhone?

I need a library that can manage polygon modeling and basic transformation like rotating and translating. I'd rather not redevelop everything from scratch Thanks ...

Programmatically turn on bluetooth in the iphone sdk?

I have seen a lot of questions about this but no one actually gives a real answer (frameworks to import, actual code etc). They only say with a private api and that will get your app rejected from the app store. I am aware that use of a private api will get my app rejected by I was wondering how to do it for personal use. (iPhone SDK 3....

After pushViewController, how to disable the backBarButtonItem?

After pushViewController, how to disable the backBarButtonItem, that going back will not be possible? tnx :) ...

iPhone MPMoviePlayer obtain buttons view.

Can anyone suggest me how to obtain the view that contains all buttons from 'MPMoviePlayer'? If you don't know, at least how you obtain the main view/window of the MPMoviePlayer. UPDATE: I need to do this to add a button on the controller view. It would look something like this: Thanks in advance! ...

Activity indicator not showing when there is loop code?

Hi, I am showing an Activity indicator in welcome screen as well as main screen. It is working fine in welcome screen. In main view, there is a 'for' loop code which does some task for 16 times. At this time, device looks like a bit hang, to avoid that i want to show activity indicator. When i add the standard activity code in main scre...

iPhone:How to find infrequent device crash?

Hi, I am getting infrequent crashes from my source code project. I couldn't find out the exact reproducible steps though i have tried to reproduce so many times. During dubug on the device is becoming very hard to reproduce it, because it happens somewhere and sometimes. Is there any logs printing while crashing the device (or) any othe...

iPhone - implementing reachability for multiple hosts?

I'm doing an app that will have to connect to several hosts. Originally I didn't include Apple's Reachability class, and just did it on my own synchronously, which I've since learned is a bad idea, and in practice I've seen the problems that Apple warns of. So now I'm going to do it asynchronously. The problem lies in having several ho...

How to add button like annotationView to the map ?

Hello i'm try to add button to the map, but i have some problem with AnnotationView I would like to stick the button to map and when map will be scrolling the button will be scrolling too. Any body help plz, can't find how to do, this. ...

Application Will Terminate Notification & Saving Drafts (Core Data)

Hi there, If the user is currently in my edit view controller, I want to be able to save the changes when the user closes my app. To do this I am observing the UIApplicationWillTerminateNotification of the shared application. In my app delegate, I use the applicationWillTerminate: method to close things down and release all my core data...

Set tabBarItem.badgeValue for not-yet-alloced viewController?

I have used the Tab Bar Application in New Project in Xcode. In IB, I have added NavigationControllers and I have five in total. On app launch the user login, and I would like to set a badgeValue for the fifth tabBarItem, but I am unable to do so, pretty much anywhere. I'd prefer to do it after the login code has run, but I am not sure ...

Multiple tabs controlling a single UIWebview

Hello, how do I use multiple UITabBar tabs for controlling a single UIWebView? An Example: Pressing tab1: UIWebView loads index.html Pressing tab2: the same UIWebView loads customers.html Pressing tab3: the same UIWebView loads tos.html My approach was to put the UIWebView in the AppDelegate and set self.webview of every ViewControl...