Modification programs Telephone (Objective-c)?

There's this app:

When you have an incoming call show the message "call: -phone number-"

Here is the code that presumably marks an incoming call.

On the comment the code which shows this message.

How to do it?

Language Objective-C, never with him did not have the head already swells.

pjsua_call_info callInfo;
 pj_status_t status = pjsua_call_get_info(anIdentifier, &callInfo);
 if (status == PJ_SUCCESS) {
 [self setState:callInfo.state];
 [self setStateText:[NSString stringWithPJString:callInfo.state_text]];
 [self setLastStatus:callInfo.last_status];
 [self setLastStatusText:
 [NSString stringWithPJString:callInfo.last_status_text]];
 [self setRemoteURI:[AKSIPURI SIPURIWithString:
 [NSString stringWithPJString:callInfo.remote_info]]];
 [self setLocalURI:[AKSIPURI SIPURIWithString:
 [NSString stringWithPJString:callInfo.local_info]]];
 NSString *string1 = @"Calling: ";

 //Here you need to show the message "calling: the room" 

 if (callInfo.state == kAKSIPCallIncomingState) {
 [self setIncoming:YES];
 } else {
 [self setIncoming:NO];
October 8th 19 at 03:29
2 answers
October 8th 19 at 03:31
UIAlertView *alert = [[UIAlertView alloc] init];

[alert setTitle: @"Error"];
[alert setMessage: @"Network is unavailable"];
[alert setDelegate: nil];
[alert addButtonWithTitle:@"OK"];

[alert show];
[alert release];
October 8th 19 at 03:33
If you want a window with a message,

 UIAlertView *av = [[[UIAlertView alloc] initWithTitle:@"message Header"
 message:@"message Text for message number, in this case, the variable string1"
 otherButtonTitles: nil] autorelease];

 [av show];

If ARC is enabled, remove the autorelease and this square ([]) brackets that matches him.

Clarification: You asked "How to get the message or get the phone number and display it in the message."
The answer above on the first option.

Find more questions by tags Objective-C