As for the iOS app, there are 3 ways that I know about making calls:
One. Using OpenURL (tel)
Features: direct dial, not pop-up hint. And, after the call, stay in the address Book, do not return to the original app.
Call-(void) Callphone: (NSString *) phonenumber{ //phonenumber = "18369 ..." Nsmutablestring * str=[[nsmutablestring alloc] initwithformat:@ "tel:%@", PhoneNumber]; [[UIApplication sharedapplication] Openurl:[nsurl urlwithstring:str];}
Two. Using Requestwithurl (recommended)
Features: Pop-up prompt before dialing. And, you will return to the original application when you finish dialing.
Call-(void) Callphone: (NSString *) phonenumber{ //phonenumber = "18369 ..." Nsmutablestring * str=[[nsmutablestring alloc] initwithformat:@ "tel:%@", PhoneNumber]; UIWebView * Callwebview = [[UIWebView alloc] init]; [Callwebview loadrequest:[nsurlrequest Requestwithurl:[nsurl Urlwithstring:str]]; [Self.view Addsubview:callwebview];}
Three. Using OpenURL (telprompt)
Features: Pop-up prompt before dialing. And, you will return to the original application when you finish dialing.
Note: There has been no telprompt in Apple's official documentation, which was previously used and rejected when uploading the audit.
Call-(void) Callphone: (NSString *) phonenumber{ //phonenumber = "18369 ..." Nsmutablestring * str=[[nsmutablestring alloc] initwithformat:@ "telprompt://%@", PhoneNumber]; [[UIApplication sharedapplication] Openurl:[nsurl urlwithstring:str];}