Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7159203
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:11:31+00:00 2026-05-28T13:11:31+00:00

How do I know who is calling me? Identify the number or even the

  • 0

How do I know who is calling me?
Identify the number or even the contact in my list case I have.

I can identify if have or not a call, with this code.

void (^ctCallStateMuda)(NSNotification *) = ^(NSNotification * notification) {
    NSString *callInfo = [[notification userInfo] objectForKey:@"callState"];
    if ([callInfo isEqualToString:CTCallStateIncoming]) {
        NSLog(@">>>>>> chegando");
    } else if ([callInfo isEqualToString:CTCallStateConnected])  {
        NSLog(@">>> atendendo <<<");        
    }  else if ([callInfo isEqualToString:CTCallStateDisconnected])  {
        NSLog(@"desconectado >>>>>>");        
    } else if ([callInfo isEqualToString:CTCallStateConnected])  {
        NSLog(@"discando");        
    } else {
        NSLog(@"nada");        
    }
};

CTCallCenter *callCenter;
callCenter = [[CTCallCenter alloc] init];
callCenter.callEventHandler = ^(CTCall* aCallIncomming) {
    NSDictionary *dict = [NSDictionary dictionaryWithObject:aCallIncomming.callState
                                                     forKey:@"callState"];

    [[NSNotificationCenter defaultCenter] postNotificationName:@"CTCallStateDidChange"
                                                        object:self
                                                      userInfo:dict];
};

[[NSNotificationCenter defaultCenter] addObserverForName:@"CTCallStateDidChange" 
                                                  object:nil 
                                                   queue:nil 
                                              usingBlock:ctCallStateMuda];
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T13:11:32+00:00Added an answer on May 28, 2026 at 1:11 pm

    You don’t have access to this information in the public SDK (a jailbroken iPhone is another matter). Apple prohibit apps from having access to any information relating to call history. The code you’ve posted above is so your app can detect when the user is receiving a phone call and adapt their interface accordingly, but that’s it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

As those who have worked on such a project you probably know this site:
Is there a way I can know who holds a reference to an object?
This question is for the people who know both Haskell (or any other functional
I'm mainly asking this to professionals who know the playing field of professional developing.
I know many people who use computers every day, who do not know how
Does anyone know how I can purchase the above SDKs? Calling the standard Sony
I know that calling a virtual method from a base class constructor can be
Can I know who clicked Like on my website ?
I have a compiled external library that I'm using in my (Objective-C++) code. This
Does anyone know who I contact to migrate an existing app to a different

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.