GitHub PullRequestReviewCommentEvent at 2014-05-15 02:32:19
Repository: venmo-ios-sdk
Actor: mickeyreiss
Payload: {"comment":{"url":"https://api.github.com/repos/venmo/venmo-ios-sdk/pulls/comments/12672099","id":12672099,"diff_hunk":"@@ -1,98 +1,99 @@\n-## Venmo App Switch SDK for iOS\n+## Venmo iOS SDK\n \n-[![Build Status](https://travis-ci.org/venmo/VENAppSwitchSDK.svg?branch=master)](https://travis-ci.org/venmo/VENAppSwitchSDK)\n+[![Build Status](https://travis-ci.org/venmo/venmo-ios-sdk.svg?branch=v2)](https://travis-ci.org/venmo/venmo-ios-sdk)\n \n-The Venmo AppSwitch SDK allows you to send Venmo payments & charges to any email, phone number or Venmo username from within your iOS app.\n-\n-![alt text](http://i.imgur.com/tN7mYVy.gif \"VENAppSwitchSDK demo\")\n+The Venmo iOS SDK allows you to integrate Venmo into your iOS app.\n \n+<img src=\"/venmo_ios_sdk.gif\" width=\"320px\">\n \n ### Installation\n \n-The easiest way to get started is to use [CocoaPods](http://cocoapods.org/). Just add the following line to your Podfile:\n+The easiest way to get started is with [CocoaPods](http://cocoapods.org/). Just add the following line to your Podfile:\n \n ```ruby\n-pod 'VENAppSwitchSDK', '~> 1.0.0'\n+pod 'venmo-ios-sdk', '~> 1.0.0'\n ```\n \n ### Usage\n \n-Using the Venmo iOS SDK is as easy as `Venmo`ing a friend.\n+Using the Venmo iOS SDK is as easy as Venmo-ing a friend!\n \n #### 1. Create your app on Venmo\n 1. Create a new application on the [Venmo developer site](https://venmo.com/account/settings/developers).\n-2. Make a note of your Venmo developer ```app id``` and ```app secret```.\n+2. Make a note of your new app's `app id` and `app secret`.\n \n-#### 2. Set up your Application URL Types\n+#### 2. Configure your Xcode project\n \n-1. In your App target's ```Info``` section, scroll down to ```URL Types```.\n+1. In your app target's `Info` section, scroll down to `URL Types`.\n 2. Add a new URL Type with the following properties:\n \n-\t```Identifier``` ==> ```venmo<<YOUR_APP_ID>>```\n- \n-\t```URL Schemes``` ==> ```venmo<<YOUR_APP_ID>>```\n+\t`Identifier` ==> `venmo<<YOUR_APP_ID>>`\n+\n+\t`URL Schemes` ==> `venmo<<YOUR_APP_ID>>`\n \n-For example, if your app ID is ```1234```, put ```venmo1234```. Incase you lost it, you can find your app ID on the [Venmo developer site](https://venmo.com/account/settings/developers).\n+For example, if your app ID is `1234`, put `venmo1234`.\n \n ![Set URL Types](http://i.imgur.com/8rUXlFB.png)\n \n \n-#### 3. Initialize the Venmo AppSwitch SDK\n+#### 3. Initialize the Venmo iOS SDK\n \n-Import the Venmo AppSwitch SDK main header in your ```AppDelegate```.\n+Add the Venmo SDK header file to your app delegate. You can use the SDK from any of your implementation files by importing this header.\n \n ```obj-c\n-#import <VENAppSwitchSDK/VenmoSDK.h>\n+#import <Venmo-iOS-SDK/Venmo.h>\n ```\n \n-In your ```AppDelegate```, add the following code to initialize the SDK to the ```application:didFinishLaunchingWithOptions:``` method.\n+Add the following code to initialize the SDK in your app delegate's `application:didFinishLaunchingWithOptions:` method.\n \n ```obj-c\n - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {\n- \n-    [VenmoSDK startWithAppId:@\"VENMO_APP_ID\" secret:@\"VENMO_APP_SECRET\" name:@\"VENMO_APP_NAME\"];\n-    \n+\n+    [Venmo startWithAppId:@\"VENMO_APP_ID\" secret:@\"VENMO_APP_SECRET\" name:@\"VENMO_APP_NAME\"];\n+\n     return YES;\n }\n ```\n \n-* ```VENMO_APP_ID```: ***ID*** from your registered app on the [Venmo developer site](https://venmo.com/account/settings/developers)\n-* ```VENMO_APP_SECRET```: ***Secret*** from your registered app on the [Venmo developer site](https://venmo.com/account/settings/developers)\n-* ```VENMO_APP_NAME```: The app name that will show up in the Venmo app (e.g. \"sent via My Supercool App\")\n+* `VENMO_APP_ID`: ***ID*** from your registered app on the [Venmo developer site](https://venmo.com/account/settings/developers)\n+* `VENMO_APP_SECRET`: ***Secret*** from your registered app on the [Venmo developer site](https://venmo.com/account/settings/developers)\n+* `VENMO_APP_NAME`: The app name that will show up in the Venmo app (e.g. \"sent via My Supercool App\")\n \n-Next, tell the Venmo AppSwitch SDK when the App receives a url by adding the line ```[[VenmoSDK sharedClient] handleOpenURL:url];``` to the ```application:openURL:sourceApplication:annotation:``` method in your ```AppDelegate``` (if this method doesn't exist, create it).\n+To allow the Venmo iOS SDK to handle responses from the Venmo app, add the following to your app delegate's `application:openURL:sourceApplication:annotation:` method:\n \n ```obj-c\n - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {\n-    if ([[VenmoSDK sharedClient] handleOpenURL:url]) {\n+    if ([[Venmo sharedInstance] handleOpenURL:url]) {\n         return YES;\n     }\n     return NO;\n }\n ```\n \n-Note: If you are using the old ```application:handleOpenURL:``` method, that's fine, but now may be a good time to migrate to ```application:openURL:sourceApplication:annotation:``` as it has now been deprecated.\n-\n #### 4. Send a payment\n \n-You can send a payment by constructing a ```VDKTransaction``` object with some basic properties. There is a factory method which will construct a valid, sendable payment: ```transactionWithType:amount:note:recipient:```. You can also modify each of the properties individually.\n+The Venmo iOS SDK lets you send a payment in two ways:\n+1. Switching to the Venmo app \n+2. Using the Venmo API\n \n-This is then posted by calling the ```sendTransaction:withCompletionHandler:``` method on the shared instance of ```VenmoSDK```. \n+Sending payments by switching to the Venmo app has the advantage of allowing your user to bypass the Venmo OAuth flow. If the user doesn't have the Venmo app installed, we recommend using the Venmo API.","path":"README.md","position":110,"original_position":110,"commit_id":"aba943c8823663e8d68053016048141ce685ffed","original_commit_id":"aba943c8823663e8d68053016048141ce685ffed","user":{"login":"mickeyreiss","id":47405,"avatar_url":"https://avatars.githubusercontent.com/u/47405?","gravatar_id":"60467badb228187e37e1bc5537ecac66","url":"https://api.github.com/users/mickeyreiss","html_url":"https://github.com/mickeyreiss","followers_url":"https://api.github.com/users/mickeyreiss/followers","following_url":"https://api.github.com/users/mickeyreiss/following{/other_user}","gists_url":"https://api.github.com/users/mickeyreiss/gists{/gist_id}","starred_url":"https://api.github.com/users/mickeyreiss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mickeyreiss/subscriptions","organizations_url":"https://api.github.com/users/mickeyreiss/orgs","repos_url":"https://api.github.com/users/mickeyreiss/repos","events_url":"https://api.github.com/users/mickeyreiss/events{/privacy}","received_events_url":"https://api.github.com/users/mickeyreiss/received_events","type":"User","site_admin":false},"body":"Huh--as a developer, I didn't even realize there was an OAuth flow that could be triggered. What is that? What does it look like? Does it take over my app?","created_at":"2014-05-15T02:32:19Z","updated_at":"2014-05-15T02:32:19Z","html_url":"https://github.com/venmo/venmo-ios-sdk/pull/30#discussion_r12672099","pull_request_url":"https://api.github.com/repos/venmo/venmo-ios-sdk/pulls/30","_links":{"self":{"href":"https://api.github.com/repos/venmo/venmo-ios-sdk/pulls/comments/12672099"},"html":{"href":"https://github.com/venmo/venmo-ios-sdk/pull/30#discussion_r12672099"},"pull_request":{"href":"https://api.github.com/repos/venmo/venmo-ios-sdk/pulls/30"}}}}