Uber Deeplinking on iOS - ios

I am trying to generate a deep link that will open the app, set pickup location to current location and dropoff address to Uber's HQ.
Here is what I have:
uber://?action=setPickup&pickup=my_location&dropoff[formatted_address]=1455%20Market%20St%2C%20San%20Francisco%2C%20CA%2094103
Unfortunately, no destination address is being pre-filled once in the app.

Hey I was running into the same problem and this is the way I got it to work. First, you need to add your client id to the url. So in your case change
uber://?action=setPickup&pickup=my_location&dropoff[formatted_address]=1455%20Market%20St%2C%20San%20Francisco%2C%20CA%2094103
to
uber://?client_id=YOUR_CLIENT_ID&action=setPickup&pickup=my_location&dropoff[formatted_address]=1455%20Market%20St%2C%20San%20Francisco%2C%20CA%2094103
where YOUR_CLIENT_ID is the client id given to you by Uber.
To get a client id you must register your app with Uber at https://developer.uber.com/.
Hope this helps!

The dropoff address will show appear once the user drops a pin to select their pickup location.

Related

Touch ID Passcode Integration in iOS

I'm working on iOS app in which I need to integrate touch id and passcode, i googled and found many tutorials for touch id, I followed this and done successfully. Every thing fine but on popup which is saying Enter Password
as shown in following pic i have few queries.
Is it possible to use apple default passcode view as shown in lock screen?
If Yes, then will apple allow to upload app onto appstore?
Looking for help.
Thanks
to hide password option try this..
var LocalAuthentication = LAContext()
LocalAuthentication.localizedFallbackTitle = "" // Add this line
tutorial which you have mentioned is using only Biometrics authentication with deviceOwnerAuthenticationWithBiometrics which Indicates that the device owner authenticated using Touch ID refer this .
If you want to authenticate with any of one (Touch id or passcode) , use deviceOwnerAuthentication instead.
replace
[context .evaluatePolicy(LAPolicy.deviceOwnerAuthenticationWithBiometrics ..
with
[context .evaluatePolicy(LAPolicy.deviceOwnerAuthentication ..
We can't use Apple's default lockscreen view inside our apps, However you can use this library on github.

iPhone detecting ID numbers in email messages

I am building an application for use by my company that has a number of features. One thing I am interested in adding if at all possible is linking a specific format of internal ID to my application if it exists in an email, much the same way that UPS/USPS/FEDEX tracking numbers are converted into links in the email app.
Is it possible to build an app extension that would create a link from an ID that is in an email, and launch my application when it is clicked?
For example, if the following ID (1453833784.127410) is in the body or the subject of an email message, the end user could click it and have it launch the app.
My experience in app extensions is limited so any assistance would be appreciated.
Thank you
No, this is not possible. There is no API that can hook into the Mail app (or any other app) such that text in a certain format gets translated into a URL for a 3rd party app.
If you have any control of the email generation, the creation of the original email should be updated to include the link.
You can use custom url schemes for example:
When user click the link yourapp://1453833784.127410 in the email if the app install it will open the app to handle the url via application:openURL:options: in app delegate
You can define custom url schemes in your app's Info.plist
URL types <Array>
Item 0 <Dictionary>
URL identifier <String> com.example.yourapp
URL Schemes <String> yourapp
This custom url schemes solution should work on Android app too.

How to open Apple Maps from another app

My company created an app that sends location deals in an app inbox. I want to send directions in the appmail so that if someone clicks on 'Click here for directions' it will automatically open directions from current location to the requested point in the Apple Maps app.
When I email the URL to myself and open it with AppMail, it works perfect.
When I send the URL via AppMail, it opens the URL in safari via GoogleMaps.
This is the URL I'm using.
>>Click Here for Directions<<
You need to change:
http://maps.apple.com/?...
To one of:
http://maps.apple.com/maps?...
or
http://maps.google.com/maps?...
The apple.com URL is technically the correct one, but the google URL is the only one that will work properly on older versions of iOS, and new versions of iOS also support it as well (although I don't know how long that will last).

iOS How should I open phonebook through coding

I am doing one project in that I am sending messages to multiple user.
When I am composing message I took one textfield for enter contact. When I click on contact textfield I want to open phone contact (like In Phone default compose message view how the all contacts appears when user click on "To") view.
In Android development we can open the phone contacts bye using "contact intent" I want to create like the same.
By using ABAddressBook I am able to fetch all contacts. But I dont want to create custom phonebook contact. So please help me that is there any default method to get default phone contacts controller in iOS.
For example how we directly open the setting page by using
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"prefs://"]];
this . I want the something like this to open the phone contact and once i finished any action(i.e selected any contact number) then it will get back to my app
Use the ABPeoplePickerNavigationController: https://developer.apple.com/library/ios/documentation/ContactData/Conceptual/AddressBookProgrammingGuideforiPhone/Chapters/UI_Controllers.html#//apple_ref/doc/uid/TP40007744-CH5-SW1

custom URL Scheme in iOS 6 not working?

My app uses a custom URL scheme so i send a link to my users in an email which when clicked, launches my app installed on their devices. This was working seamlessly till iOS 6 came into picture.
Now when the users click on the link or even type the address manually in the safari they get an error saying "Safari cannot open the page because it is a local file."
Wondering if anyone else encountered the same or if someone has any pointers in this regard !!
Any help much appreciated...
Update: it works if I only give my app's custom url without any parameters.. e.g. if I do "reader-app://" it launches my app but if i do "reader-app://doc=xyz" it doesn't !
try: reader-app://?doc=xyz (add a question mark after //) this way you'll specify a query string. It works for me, but it presents an alertdialog asking the user if she wants to open the url with my application
Try to remove the - sign from reader-app://.
My URL was not working until I removed underscore sings from URL.
Ex:
my_app:// is not working.
myapp:// is working.
That is just a guess.

Resources