Code Monkey home page Code Monkey logo

Comments (6)

faarwa avatar faarwa commented on August 16, 2024

The SDK uses Swift 2 which requires Xcode 7. Unfortunately, it will not work with Xcode 6.3.

from rides-ios-sdk.

mmarshak avatar mmarshak commented on August 16, 2024

If I use Xcode 7, can you SDK work on iOS 8.3 and with Objective C code ?

Is there other options to use UBER to call a ride for Xcode 6.3 ? Like use REST API or some other mean ?

Thanks,
Marik

On Feb 8, 2016, at 2:20 PM, Farwa Naqi [email protected] wrote:

The SDK uses Swift 2 which requires Xcode 7. Unfortunately, it will not work with Xcode 6.3.


Reply to this email directly or view it on GitHub #11 (comment).

from rides-ios-sdk.

faarwa avatar faarwa commented on August 16, 2024

Yep! Check out the examples folder for an Obj-C app that uses the SDK.

Yes to your second question as well. Here's a link to our API documentation: https://developer.uber.com/docs/api-overview. You can use NSURLSession or AFNetworking to create requests for information.

If you'd simply like to deep link to the Uber app, we have a reference for that as well: https://developer.uber.com/docs/deep-linking. This page provides the information you'd need to create a deep link yourself, which you can add to your own button. The SDK just makes this easier, but you can certainly replicate the functionality without it if you need to use Xcode 6.3. Hope this helps!

from rides-ios-sdk.

mmarshak avatar mmarshak commented on August 16, 2024

Do you have a sample project that use NSURLSession or AFNetworking to interact with your API with Obj-C ?

Also, do you know of any other apps that use the API ? If yes, which one ?

The deep link option mean that the user will leave my app, and jump into your native Uber app. This require that the user will have an Uber app installed on this device, right ? What will happen if it is not installed. Is it going to open a web view or the browser ?
Do you know of any other app that use this method ? If yes, can you name one ?

Thanks

from rides-ios-sdk.

faarwa avatar faarwa commented on August 16, 2024

There are tutorials available online that use NSURLSession or AFNetworking to interact with APIs such as http://www.raywenderlich.com/51127/nsurlsession-tutorial. As one small example, to get a list of products for a location (GET /v1/products endpoint), you can do:

NSURL *url = [NSURL URLWithString:@"https://api.uber.com/v1/products?latitude=37.770&longitude=-122.466"];
NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:url];
[request setHTTPMethod:@"GET"];
[request setValue:@"Token SERVER_TOKEN" forHTTPHeaderField:@"Authorization"];
NSURLSession *session = [NSURLSession sessionWithConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]];
NSURLSessionDataTask *task = [session dataTaskWithRequest: request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
    if (error) // handle error
    else // use data
}];
[task resume];

The SDK will eventually support all the endpoints so you wouldn't have to do this yourself.

Yes, deep linking will jump to the Uber app. You should check if the user has the app installed before opening the deep link- otherwise, open the mobile website. You can refer to this control flow in the reference docs.

from rides-ios-sdk.

faarwa avatar faarwa commented on August 16, 2024

Closing this issue as it's not related to a bug in the SDK. Feel free to ask questions you may have for this on Stack Overflow with the uber-api tag. Cheers!

from rides-ios-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.