Skip to content
This repository has been archived by the owner on Mar 9, 2021. It is now read-only.

Commit

Permalink
Change smart quotes to straight quotes in Readme #2 and #12
Browse files Browse the repository at this point in the history
  • Loading branch information
maicki committed Dec 5, 2014
1 parent e3b2123 commit 7770f2e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions README.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ <h4 id="importthepocketapiheader">Import the PocketAPI Header</h4>

<p>At the top of your app delegate source file (and anywhere you call the PocketAPI object), you&#8217;ll need to include the PocketAPI header. At the top of your class you&#8217;ll probably see other imports already. Simply add this line:</p>

<pre><code>#import PocketAPI.h
<pre><code>#import "PocketAPI.h"
</code></pre>

<h4 id="setyourplatformconsumerkey">Set Your Platform Consumer Key</h4>
Expand All @@ -94,7 +94,7 @@ <h4 id="addamethodforthepocketurl-scheme">Add a method for the Pocket url-scheme

<p>The final step is to give the SDK an opportunity to handle incoming URLs. If you do not already implement this method on your app delegate, simply add the following method:</p>

<pre><code>-(BOOL)application:(UIApplication *)application
<pre><code>-(BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication
annotation:(id)annotation{
Expand Down Expand Up @@ -156,8 +156,8 @@ <h3 id="callingotherpocketapis">Calling Other Pocket APIs</h3>
PocketAPIHTTPmethod httpMethod = ...; // usually PocketAPIHTTPMethodPOST
NSDictionary *arguments = ...;

[[PocketAPI sharedAPI] callAPIMethod:apiMethod
withHTTPMethod:httpMethod
[[PocketAPI sharedAPI] callAPIMethod:apiMethod
withHTTPMethod:httpMethod
arguments:arguments
handler: ^(PocketAPI *api, NSString *apiMethod, NSDictionary *response, NSError *error){
// handle the response here
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The project download includes the SDK and an example project.

###Step 2: Add the Pocket SDK to your project###

- Open your existing project.
- Open your existing project.
- Drag the SDK folder from the example project into your Xcode project.
- Make sure the “Copy items into destination group’s folder (if needed)” checkbox is checked.
- Select your Xcode project in the Project Navigator, select your application target, select “Build Phases”, and add Security.framework to your “Link Binary With Libraries” phase.
Expand All @@ -43,7 +43,7 @@ If you have not obtained a consumer key yet, you can register one at [http://get
###Step 4: Add the Pocket URL scheme###


Once you have the consumer key for the platform you are supporting, the application must register a URL scheme to receive login callbacks. By default, this is "pocketapp" plus your application's ID (which you can find at the beginning of the consumer key before the hyphen). So if your consumer key is 42-abcdef, your app ID is 42, and your URL scheme will be "pocketapp42".
Once you have the consumer key for the platform you are supporting, the application must register a URL scheme to receive login callbacks. By default, this is "pocketapp" plus your application's ID (which you can find at the beginning of the consumer key before the hyphen). So if your consumer key is 42-abcdef, your app ID is 42, and your URL scheme will be "pocketapp42".

If there are already URL schemes in your app’s Info.plist, you can either add the new URL scheme, or use an existing scheme by calling `[[PocketAPI sharedAPI] setURLScheme:@"YOUR-URL-SCHEME-HERE"]`. To add a URL Scheme, create a block like the one below in your Info.plist, updating it with the app’s scheme:

Expand Down Expand Up @@ -76,7 +76,7 @@ The final steps to set up the Pocket SDK requires adding a few lines of code to

At the top of your app delegate source file (and anywhere you call the PocketAPI object), you'll need to include the PocketAPI header. At the top of your class you'll probably see other imports already. Simply add this line:

#import PocketAPI.h
#import "PocketAPI.h"

####Set Your Platform Consumer Key####

Expand All @@ -88,26 +88,26 @@ The Pocket SDK requires your consumer key in order to make any requests to the A

The final step is to give the SDK an opportunity to handle incoming URLs. If you do not already implement this method on your app delegate, simply add the following method:

-(BOOL)application:(UIApplication *)application
-(BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication
annotation:(id)annotation{

if([[PocketAPI sharedAPI] handleOpenURL:url]){
return YES;
}else{
// if you handle your own custom url-schemes, do it here
return NO;
}

}


###Step 6: Start Saving to Pocket!###

At this point you’ve properly installed the SDK and can now start making requests and saving urls to Pocket. Here is a two line example:

NSURL *url = [NSURL URLWithString:@http://google.com];
NSURL *url = [NSURL URLWithString:@"http://google.com"];
[[PocketAPI sharedAPI] saveURL:url handler: ^(PocketAPI *API, NSURL *URL, NSError *error){
if(error){
// there was an issue connecting to Pocket
Expand Down Expand Up @@ -150,8 +150,8 @@ To call other arbitrary APIs, pass the API's method name, the HTTP method name,
PocketAPIHTTPmethod httpMethod = ...; // usually PocketAPIHTTPMethodPOST
NSDictionary *arguments = ...;

[[PocketAPI sharedAPI] callAPIMethod:apiMethod
withHTTPMethod:httpMethod
[[PocketAPI sharedAPI] callAPIMethod:apiMethod
withHTTPMethod:httpMethod
arguments:arguments
handler: ^(PocketAPI *api, NSString *apiMethod, NSDictionary *response, NSError *error){
// handle the response here
Expand Down

0 comments on commit 7770f2e

Please sign in to comment.