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 8851409
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T13:08:56+00:00 2026-06-14T13:08:56+00:00

I have an app with 4 UIButtons and I want to pre-program phone numbers

  • 0

I have an app with 4 UIButtons and I want to pre-program phone numbers to each of them. I have written it like this:

- (IBAction)callFirst:(id)sender {
[NSURL URLWithString:@"tel.0739421700"];
}

- (IBAction)callSecond:(id)sender {
[NSURL URLWithString:@"tel.0705652000"];
}

- (IBAction)callThird:(id)sender {
[NSURL URLWithString:@"tel.0705666900"];
}

- (IBAction)callFourth:(id)sender {
[NSURL URLWithString:@"tel.0702857900"];
}

When I just open the app on the simulator it takes me to the log and shows errors. How should I write it instead?
This is what comes up when I run it. The “return UIApplicationMain… ” part is marked with green arrows on its edges. On the right it says ” Thread 1: signal sigabrt” Its from the main.m file:

#import <UIKit/UIKit.h>

#import "AppDelegate.h"

int main(int argc, char *argv[])
{
@autoreleasepool {
    return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}

thanks in advance!

  • 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-06-14T13:08:57+00:00Added an answer on June 14, 2026 at 1:08 pm
    1. You didn’t open the url
    2. you used the wrong url scheme

    something like this should work:

    - (BOOL)callPhoneNumberWithString:(NSString *)phoneNumberString {
        NSURL *url = [NSURL URLWithString:phoneNumberString];
        if ([[UIApplication sharedApplication] canOpenURL:url]) {
            [[UIApplication sharedApplication] openURL:url];
            return YES;
        }
        return NO;
    }
    
    - (IBAction)callFirst:(id)sender {
        [self callPhoneNumberWithString:@"tel:0123456789"]; 
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create a view like this in my iPhone App: I do
I have some uiButtons in my table view and i want to load them
I have 9 views with 5 57x57 UIButtons on them. I want to be
I have multiple UIButtons in my app. I also use interfacebuilder. In my .h
we have app hosted on google app engine for java. In this app we
I have app in which i have recorded sound files i want that i
I have a main view screen with navcontroller in my app with two UIbuttons.
Hi I have two UIButtons in an iOS app. One is to post to
I have multiple objects, each with a series of attributes. I'd like the user
Anywhere there is a UIButton in my app i would like it to have

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.