Making a faux iPhone dialer - ios

I want to make a joke application for a friend (not for general sale) that looks exactly like the iOS Phone application but so that whatever number is dialled into the application it appears to dial that number but actually dials a preset number in the background.
The way I figured to do it would be through the following:
User enters a number and hits the call button
Save the number entered as a contact's name and programmatically set the number of that contact as the preset number
Get the application to ring the preset number, to which it would switch over to the real iOS phone application and dial, but with it being a saved number in the contacts it will display the name, which is the number entered by the user.
Delete that contact upon re-opening the application as for it to not ask which number to dial the next time.
This is the only way that I can think of pulling this off, but it seems like it will look unconvincing; especially when it switches over to the real Phone application. Can anyone think of a better way? Such as calling from within the application?
I wouldn't usually take junk requests like this but it made me curious as to pull it off best.Thanks

If you are not going to publish this, then there is no reason why you shouldn't use private apis. See this answer (How to directly make a phone call with private API CTCallDial()?)

Related

Is it possible to send an SMS message from an iOS app to the current caller when a call is in progress?

I have searched and have not been able to find a definitive answer. I know that it is not possible to get the phone number of the current caller using Objective-C, but I don't need the number.
I want to send a text message to the current caller. Does iOS have a method to allow you to send a text message from an app to the current caller.
The scenario is this:
End user calls another user
They put the person they called on speaker phone and navigate to my app
The app has a button that allows them to share information via SMS to the person they are talking to while they are talking to them without having to do anything more than click a button (the user doesn't have to type the other person's phone number manually to send the SMS).
Sukhdeep is correct.iOS will never allow you to perform Messaging without user involvement.
The answer is No.
Apple will never allow you this.

IOS: How to verify user's phone number using codes

i am working on an app in which i take a field of mobile number of user after entering mobile number there is a option for verify phone number.
but i don't know the functionality of how to verify a user's phone number within the app using codes.I search for similar type of questions but didn't get the exact solutions.
i am sending a screenshot of my app where i want to put that functionality.
i didn't apply any codes for this
please help
You need a backend that can generate and save codes for each phone number and also send a text message with those codes. So the flow is as follows:
User enters their phone number in the app and presses the "Verify Number" button.
You send a request to your backend with the number provided. In the app, you also displays a text field for user to enter the generated code and a new button like "Check code".
The backend generates a new code (just a random one), stores it to the database (like ID,PhoneNumber,GeneratedCode,DateOfGeneration) and sends a text message with the code to the phone number specified.
When the user receives the message he or she enters the code to the checking input field and presses the "Check" button.
The mobile app sends another request to the backend with the phone number entered earlier and the code entered by the user now.
The backend looks to the database for the "Phone number" - "Code" pair and responds with failure (the code is incorrect, try again) or success (the phone is verified).
Unfortunately, there's no way to access text messages received by user from within an app on iOS devices (unlike Android). The proof link was already provided. So the user has to manually enter the verification code from the message.
Ok I tell the information how was I already did my project in before
Step-1
when user press the Verify Number button
initially I check the phone number is valid or not(means phone number count/length).
second I generate the random number on progrmatically like NSUInteger r = arc4random_uniform(16);
Step-2
send the random number to server along with the vaild phone number , the server send the random number to the particular mobile number using SMTP Server.
Step-3
in your hand you have the random number , so open the UIAlertview for user type the valid random number , if user typed the vaild number show the Next Screen else show the Alert.
To verify any mobile number you can use third party api's which are available for mobile as well as backend server. You can use Twilio Messaging Api. To use this API follow below steps:
Register account on Twilio and get key from account.
Get user's phone number from mobile application.
When user click on the "Verify Number" button, call web-service with the number.
When you'll call the web-service, write a logic to send the random number with the Twilio messaging api to send message to user.
When user get this number through SMS, You can tell user to enter the number and verify it.
Also, there is another api which you can directly integrate into your mobile application. You can find this Sinch Api here.
To verify against your device's phone number, first, you need to get the phone number from your device and then you can compare against. However, after iOS 4, getting phone number of your device is quite impossible. Even if, you do get the device's number using some private api which I am not sure works entirely, there is a huge possibility for Apple to reject your app.
Refer to the following stack overflow discussion-
Programmatically get own phone number in iOS
Just a suggestion: You probably want to look for a work around based on your business goal. For example, rather than checking for device's phone number directly. You can generate a code and send that to the number specified by the user and then enter that code to verify that the user has that device.

How to read call duration and phone status on iOS 7?

I understand we cannot extract phone number/ call log from iOS 7. However, how do I give the user a pop-up every time an incoming or outgoing call ends. This pop up will open a form from the App that will already have call duration pre-filled and the user will fill the rest of the call.
I know similar topics exist, but nothing precisely on iOS 7.
That's not possible with current versions of iOS (or iOS 8). I wouldn't expect such a facility becoming available any time soon because it doesn't feel like something Apple would allow.

ios device phone number policy

I've spent the last few hours determining that I am not able to retrieve the phone number from the iOS device.
Where in the policy does it disapprove retrieving the device phone number? (my interpretation of the policy is that its ok to use the phone number as long as its used as part of your service and you have the users consent)
Are their methods to automatically pull the device phone number? (I found 2 deprecated methods but nothing for > iOS 6)
There is no policy disapproving retrieving the phone number because there is no way to get the phone number directly.
There is no way to get it without asking the user for it.
There is no valid reason to ask a user for their phone number. Why do you think you need it? No app should require a phone number to function.

How to implement an iOS app personalized start page?

I'm developing my first iOS app and I'm facing a challenge.
I'd like to present new users a personalized screen when the app starts at the first time. Let me explain more.
The flow should be more or less like this:
My app isn't installed on the user's device.
Then the user gets an SMS on his iPhone with a short message and a link to install my app. The message is part of a conversation. Another user of this app had sent this message (through my backend) in order to join this user to the conversation.
This install URL doesn't necesarrily link directly to the itunes store, it can link to a conversations specific link such as myapp.com/conv/12345
The page at myapp.com/conv/* will detect the device and if it's an iPhone would redirect the user to the appstore to install myapp.
The user then installs myapp and launches it.
Now I'd like to present the same conversation 12345 to the user, before he even needs to login, register or what have you. That's the difficult part... I don't want the user to start an a blank page, I'd like to take it right to the conversation 12345 page.
I assume steps 1-5 are easy, but I can't think of a way to implement 6. I admit that I'm not familiar enough with the intrinsic of the appstore but as far as my understanding goes, "all apps are made equal", I mean the app itself when it gets installed it has no context, it doesn't know what "caused" it to be installed, it isn't aware of the click on myapp.com/conv/12345. Is this correct?
If there was a way for an app to know something like a referrer URL for the instllation or something along these lines that would be awesome.
If there was a way for app to query the device for its phone number
then I could make this work (b/c the SMS was sent to a specific phone
number, so I can track the most recent conversation sent to this
number on my backend). But since apps are sandboxed, accessing the phone
number is off limit.
Well, I suppose I could ask the user to type a unique code from the SMS when the
app starts, say 12345 and then I'd be able to display the
conversation to him. But that's problematic in two ways, first,
security - the user can join a conversation not meant
for him, and second, that's less than optimal
user experience, I want this to work like magic, I don't want to make
users memorize and type strings into my app the first time they
install, I'm sure they won't appreciate it... (they could
copy-paste, but still...)
Another option is asking the user to type his phone number. But that
again has a few drawbacks, one is that again it's less than optimal
UX, I'm asking a user to type his phone number to an app he doesn't
yet know or trust, second I'll need to verify (authenticate) the
phone number, I mean what prevents that user from typing a phone
number that doesn't belong to him?
If I had access to the SMSs then I could dig up that code, but I find
it hard to believe that apps get access to SMSs, it's just sounds
like another reasonable sandbox restriction. Of course I'm not
speaking of jailbroken devices.
BTW, if the user just went over to the appstore to install my app (and didn't go through a conversation SMS) that's fine, in this case I'll just present a normal register/login page. The interesting case is where the user was already part of the conversation when receiving the SMS and now I want him to (effortlessly) become part of the same conversation through my app.
To sum up - is there a trick to present "personalized" pages the first time an app is installed and launched that would get that user right into the context of the conversation sent to him over SMS without having to request additional input?
Thanks!
It's impossible to do. Your application is installed without the knowledge you need whatsoever. As you pointed out, it's a reasonable sandboxing restriction.
What you could do is a challenge-response based system, but it would be about as intrusive to the user as is registering/login in.
Ran, you can keep a flag in NSUserDefaults (equivalent to Android's SharedPreferences)
http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSUserDefaults_Class/Reference/Reference.html

Resources