Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #65

Merged
merged 4 commits into from
Aug 24, 2016
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 29 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -919,13 +919,41 @@ extension your_class : RideRequestViewControllerDelegate {

## Example Apps

Example apps can be found in the `examples` folder. To run build them, you need to use Carthage. (A quick overview of installing Carthage can be found in the **Getting Started** section.) From inside the `examples/Swift SDK` or `examples/Obj-C SDK` folder, run:
Example apps can be found in the `examples` folder. To run build them, you can use Carthage or Cocoapods.

### Carthage
(A quick overview of installing Carthage can be found in the **Getting Started** section.) From inside the `examples/Swift SDK` or `examples/Obj-C SDK` folder, run:

```
carthage update --platform iOS
```
This will build the required dependencies. Once you do that, open `Swift SDK.xcodeproj` or `Obj-C SDK.xcodeproj` in Xcode and run it.

### CocoaPods
First, you will have to remove Carthage dependencies. Navigate to `examples/Swift SDK` or `examples/Obj-C SDK` and remove `Cartfile` and `Cartfile.resolved`. If you see a `Carthage` folder, remove that as well.

To integrate Uber Rides into your Xcode project, navigate to the directory `examples/Swift SDK` or `examples/Obj-C SDK` and create a new **Podfile** with `pod init`, then add `pod 'UberRides'` to the main loop. If you are using the Swift SDK, make sure to add the line `use_frameworks!`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like some copy & paste issues here, you reference the examples/Swift SDK or examples/Obj-C SDK twice

Copy link
Contributor

@jbrophy17 jbrophy17 Aug 10, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking better, but what about something like:

Now, still inside either `examples/Swift SDK` or `examples/Obj-C SDK`, create a new **Podfile** by running `pod init`, then add `pod 'UberRides'` to your main target. If you are using the Swift SDK, make sure to add the line `use_frameworks!`. Your **Podfile** should look something like this:


```ruby
use_frameworks!

target 'Your Project Name' do
pod 'UberRides'
end
```

Then, run the following command to install the dependency:

```bash
$ pod install
```

For Objective-C projects, set the **Embedded Content Contains Swift Code** flag in your project to **Yes** (found under **Build Options** in the **Build Settings** tab).

Open .xcworkspace and navigate to **General** tab, scroll to **Embedded Binaries** select ObjectMapper.framework and click the `-` button, do the same for UberRides.framework. Now go to **Build Settings** tab and scroll to **Search Paths**, click on **Framework Search Paths** and remove the line $(PROJECT_DIR)/Carthage/Build/iOS.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also think it makes sense to move this section right after steps to remove dependencies. That way, removing all the carthage stuff comes first, and then the Cocoapods steps

Now got to **Build Phases** find the **Copy Carthage Frameworks** and remove it.
Now you can build the project.

Don’t forget to set `UberClientID`, `UberDisplayName`, and `UberCallbackURIs` in your `Info.plist` file.

<p align="center">
Expand Down