How to make a phone call from Apple?

Is there a way to make phone calls from an extension WatchKit

?

Below is my code.

NSExtensionContext *ctx = [[NSExtensionContext alloc] init];
NSString *cleanedString = [[@"1234567890" componentsSeparatedByCharactersInSet:[[NSCharacterSet characterSetWithCharactersInString:@"0123456789-+()"] invertedSet]] componentsJoinedByString:@""];
NSURL *telURL = [NSURL URLWithString:[NSString stringWithFormat:@"tel:%@", cleanedString]];
[ctx openURL:telURL completionHandler:^(BOOL success) {
    NSLog(@"fun=%s after completion. success=%d", __func__, success);
}];

      

+3
ios watchkit phone-call


source to share


No one has answered this question yet

See similar questions:

0
How to programmatically make a phone call from the apple watch app?

or similar:

1665
How can I get the UITextField to move upward when there is a keyboard - when starting editing?
429
How to make a phone call when clicking a link on a web page on a mobile phone
303
How to make a phone call using intent in Android?
136
Make a program call
114
How do I make a program call programmatically?
3
Phone call from Watch OS2
2
ShareKit - Share on Facebook
1
nsurlsession for multiple request in a loop
0
Is there a way to make a phone call from Apple Watch
0
Phone call from Apple Watch using OpenSystem API?



All Articles
Loading...
X
Show
Funny
Dev
Pics