Reputation: 719
I have downloaded Uberkit from the below github link.
https://github.com/sachinkesiraju/UberKit
With this kit I am getting Uber type, price, capacity etc. However I have a doubt like Can we book Uber cabs from my iOS app by using above Uberkit?
Upvotes: 1
Views: 292
Reputation: 82759
Parameter Types
[latitude floatValue] --> your current Latitude
[longitude floatValue] --> your current Longitude
latitud --> your DropPlace latitude
longitud --> your DropPlace longitude
[self.lblSubTitle.text stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding] --> drop address
//manodary
[[getHuberDetails objectAtIndex:indexPath.row]objectForKey:@"productID"]] --> Uber Type Booking ID
NSString *getUberDetails=[NSString stringWithFormat:@"client_id=PassyourUberID&action=setPickup&pickup[latitude]=%f&pickup[longitude]=%f&pickup[nickname]=OuttAPP&dropoff[latitude]=%f&dropoff[longitude]=%f&dropoff[nickname]=%@&product_id=%@",[latitude floatValue],[longitude floatValue],latitud,longitud,[self.lblSubTitle.text stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding],[[getHuberDetails objectAtIndex:indexPath.row]objectForKey:@"productID"]];
if ([[UIApplication sharedApplication] canOpenURL: [NSURL URLWithString:@"uber://"]])
{
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"uber://?%@",getUberDetails]]];
}
else
{
[[UIApplication sharedApplication] openURL: [NSURL URLWithString:[NSString stringWithFormat:@"http://m.uber.com/?%@",getUberDetails]]];
}
Upvotes: 2