My app allows users to call another with click of a button. But user's don't want to share their number. That is when user tries to call another one , app will hide their mobile number and display only their name saved in DB or any random digits. Is it possible in iOS?
I know how to do mobile calling in iOS.
NSString *phNo = #"+912436580";
NSURL *phoneUrl = [NSURL URLWithString:
[NSString stringWithFormat:#"telprompt:%#",phNo]];
if ([[UIApplication sharedApplication] canOpenURL:phoneUrl]) {
[[UIApplication sharedApplication] openURL:phoneUrl];
} else
{
UIAlertView *calert = [[UIAlertView alloc]
initWithTitle:#"Alert"
message:#"Call facility is not available!!!"
delegate:nil
cancelButtonTitle:#"ok"
otherButtonTitles:nil, nil];
[calert show];
}
Is it possible to hide the calling number? Please help me.
It is impossible:
1) You must be able to know what number you are calling, it is very important so that you avoid fees for surtaxed numbers, and apple won't let you do otherwise.
2) Even if you manage to hide the phone number, it would still appear on the bill from the user mobile operator.
Only workaround would be to call through a secure connexion to a SIP server (Without using voice call feature of the phone), but then it wouldn't transit through the phone app, and the usual voice plan of the user.
I think it is not possible.
The Call application only allow you to pass numbers to call and you do not have control on what to show as Title (Name OR Number) while calling using Call app of device.
But if you are calling to a Number which is in your device Contact then it will show Name of the person matching Number.
But it is not possible to show your desired Name while calling from your application.
Related
We are using the HERE URL Scheme to pass coordinates. E.g. here-place://{lat},{lng}
NSString *mapDirHere = [[NSString stringWithFormat:#"here-route://%1.6f,%1.6f,%#/%1.6f,%1.6f,%#", latitude, longitude, NSLocalizedString(#"Current Location", nil), self.selectedCoordinate.latitude, self.selectedCoordinate.longitude, self.titleName] stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:mapDirHere]];
This does open HERE with the correct route, but the "Start" button is never activated, so our users can't start the route.
Has anyone else seen this?
The HERE iOS SDK comes with an example for starting and stopping navigation as you would like to implement in your use case.
https://github.com/heremaps/here-ios-sdk-examples/tree/master/turn-by-turn-navigation-ios-swift
All examples are updated with every update of the SDK so check them out at:
https://github.com/heremaps/here-ios-sdk-examples
dear all:
I inherited a program that can be compiled to two iOS apps, one for traditional Chinese and one for simplified Chinese.
The apps have inAppPurchase and worked fine in the last version.
Then this year, I revised the program without changing the inAppPurchase process.
But after the submissions, apple rejected the traditional Chinese app saying that it would be stuck in the inAppPurchase page.
But the simplified Chinese app was approved.
I then traced the program to the following code.
It seems that my apps always get the empty response set for productsRequest.
However, I must say that I did not do sandbox testing since I don't know how.
I am not sure why it worked fine in last year's version but failed in this year's.
Is there change to some default assumption on bundle id, application id, .. etc.
I checked all my program and could not find where I can set up the app id for the productsRequest statement.
My program is just standard as follows.
Any help will be appreciated.
// determine whether payments can be made
if (![SKPaymentQueue canMakePayments]) {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:#"warning" message:#"ineffective" delegate:nil cancelButtonTitle:#"OK?" otherButtonTitles:nil];
[alert show];
}
else {
[buttonPrice setTitle:#"waiting for price" forState:UIControlStateNormal];
[buttonPriceAll setTitle:#"waiting for price" forState:UIControlStateNormal];
// Request product data
productsRequest = [[SKProductsRequest alloc] initWithProductIdentifiers:[NSSet setWithObjects:bookProductIds[0], bookProductIds[purchaseVolume-1], nil]];
productsRequest.delegate = self;
[productsRequest start];
[self operationStarted];
}
i am trying to provide the rate this app functionality into my application hence i added the below code
- (void)gotoReviews
//------------------
{
NSString *str = #"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa";
str = [NSString stringWithFormat:#"%#/wa/viewContentsUserReviews?", str];
str = [NSString stringWithFormat:#"%#type=Purple+Software&id=", str];
str = [NSString stringWithFormat:#"%#APPid", str];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:str]];
}
str = [NSString stringWithFormat:#"%#APPid", str]; here i have to mention my app id.i see the appid into the provisioning portal as following 546F5QMTE4.com.XXXX.XXXX into the APp id section.
Is that the "546F5QMTE4" string need to placed? am i right is that correct id?
please let me know
You can do this in many ways:
Direct approach:
#define APP_ID XXXXX //id from iTunesConnect
NSString *reviewURL = [NSString stringWithFormat:#"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=%d",APP_ID];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:reviewURL]];
Try with Appirator in app delegate:
[Appirater setAppId:#"552035781"];
[Appirater setDaysUntilPrompt:1];
[Appirater setUsesUntilPrompt:10];
[Appirater setSignificantEventsUntilPrompt:-1];
[Appirater setTimeBeforeReminding:2];
[Appirater setDebug:YES];
You can get source: Here.
Add Appirater.h and Appirater.m to your project.
For more information about integration: Here
:)
No, it is not that number. You have to go to the iTunesConnect -> Manage Your Apps, choose your app, then look under "App Information" for Apple ID (digits only).
Of course be sure that you have actually a record for your app. If not, just make it (Add New App button).
iRate is best https://github.com/nicklockwood/iRate
The one that I use and works wonders on iOS 5+ (also available for Mac OS X, but this answer is focused on the iOS portion) and up on all devices (iPad, iPhone, iPod Touch) is iRate.
It uses a uialertview and storekit to ask the user for a rating (or to remind them later). Everything is customizable, from the name of the Cancel Button Title to the Interval at which it reminds the user.
By default, iRate automatically opens when certain requirements are met (ex. app launched X number of times, user passed X number of levels), but you can also use a variety of methods and your own logic (with the help of iRate methods) to manually display an iRate popup.
Setup
To install,
just drag the header (.H) file the implementation (.M) file, and the iRate Bundle (for localization) into your project.
Import the header in your AppDelegate: #import "iRate.h"
Add the StoreKit Framework to your project - More on StoreKit from Apple Documentation
Add the following method to your app delegate: + (void)initialize
The properties can be set in the initialize method, however none of them are required (iRate can automatically find all of this information).
No, it isn't. It's rather a numeric ID with a few digits, something like this:
http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=389801252&pageNumber=0&sortOrdering=1&type=Purple+Software
This will only be live when your application has been approved by Apple and it's already on the AppStore (in case of an intentionally delayed launch).
Furthermore, the way you're composing that poor URL string is simply horrible. Don't abuse format strings! You have a constant string here, so you don't even need any call to + [NSString stringWithFormat:]. Even if you wanted to alter the app ID, you could do that using one single formatting statement:
NSString *str = [NSString stringWithFormat:#"http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=%#&pageNumber=0&sortOrdering=1&type=Purple+Software", appID];
I want to ask that how I can detect whether my AddressBook was first accessed by an app on ios6.0. I have learnt that no matter an app was reinstalled or not , the system only thinks that the first installation an first launch is the first time an app launched. the question is that I want to remind an user to allow the app access AddressBook with an UIAlertView,but this alertview will appear shortly after the system's alertview .How can I avoid this condition. Any help will be greatly appreciated.
You should basically ignore ABAddressBookRequestAccessWithCompletion. It is useless. If you want to know whether you have access to the database, call ABAddressBookGetAuthorizationStatus().
Further Discussion
ABAddressBookRequestAccessWithCompletion is said by the docs to request address book access from the user. But it doesn't. I will now demonstrate that ABAddressBookRequestAccessWithCompletion is useless. There are two situations:
(1) If this is a completely unknown new app, ABAddressBookRequestAccessWithCompletion is otiose: access will be requested from the user automatically when the app tries to access the address book, so there is no need for ABAddressBookRequestAccessWithCompletion.
(2) If the user has either denied or granted access, ABAddressBookRequestAccessWithCompletion is a no-op! Calling it does nothing; it does not put up the access request alert!
So ABAddressBookRequestAccessWithCompletion is just a bug and should be ignored.
A Major Correction
EDIT In iOS 6.1, this behavior appears to have changed. (I am assuming that my tests on iOS 6.0 were valid, but I have every reason to believe they were.) Now, however, in iOS 6.1, ABAddressBookCreateWithOptions never causes the authorization alert to appear. The only way to make it appear is with ABAddressBookRequestAccessWithCompletion! Thus this function is now essential; if ABAddressBookGetAuthorizationStatus that access is undetermined, you must call ABAddressBookRequestAccessWithCompletion or you won't get access.
I have solved it by this way.
__block BOOL accessGranted;
- (IBAction)accessAddressBook:(id)sender {
CFErrorRef error;
ABAddressBookRef addressBook = ABAddressBookCreateWithOptions(NULL,&error);
ABAddressBookRequestAccessWithCompletion(addressBook, ^(bool granted, CFErrorRef error) {
// accessGranted = granted;
if (!accessGranted && !granted) {
UIAlertView * alertView = [[UIAlertView alloc]initWithTitle:#"Deny Access" message:#"Deny" delegate:self cancelButtonTitle:nil otherButtonTitles:#"cancel", nil];
[alertView show];
[alertView release];
}
});
}
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
if ([alertView.message isEqualToString:#"use contact"] || alertView.message == #"use contact") {
accessGranted = YES;
}
}
The system already shows an alert when you call ABAddressBookRequestAccessWithCompletion()
just augment the system app with your own string.
You should have in your InfoPlist.strings:
"NSContactsUsageDescription" = "Tap 'OK' or this app is useless.";
Some time ago, I wrote a small app, which needs to create outbound phone calls on iOS. I used an URL to prepare the call like described here.
Since I never found an iOS method to perform the call - without a 'Would you like to call...' confirmation dialog - I finally dropped the project.
Recently I found 1-2-Contact, which does just this: If I press the phone icon, the phone call gets established without a confirmation dialog.
Does 1-2-Contact use a private frameworks? Or does a 'initiate phone call' method exist?
Try the following:
NSString *phoneNumber = #"9123123"; //your number
NSString *telString = [NSString stringWithFormat:#"tel:%#"];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:telString]];
Works for me.
Edit 1:
NSString *dtmfAfterPickup=#"0";
NSString *telString = [NSString stringWithFormat:#"tel:%#,%#", phoneNumber, dtmfAfterPickup];