Permalink
Browse files

Update code highlighting in README

  • Loading branch information...
1 parent 70fb3ce commit 01d8ceef4249c9e0f690d7c6384250d4c3178559 @levi levi committed on GitHub Aug 15, 2016
Showing with 5 additions and 5 deletions.
  1. +5 −5 README.md
View
@@ -33,7 +33,7 @@ The PinterestSDK will authenticate using OAuth either via the Pinterest app or,
### Configuring PDKClient
Before you make any calls using the PDKClient in your app, you will need to configure it with your appId:
-```objective-c
+```objc
[PDKClient configureSharedInstanceWithAppId:@"12345"];
```
@@ -43,19 +43,19 @@ The end of `application:didFinishLaunchingWithOptions:` seems like a reasonable
To authenticate a user, call authenticateWithPermissions:withSuccess:andFailure: on PDKClient. If the current auth token isn't valid or this is the first time you've requested a token, this call will cause an app switch to either the Pinterest app or Safari. To handle the switch back to your app, implement your app's application:openURL:sourceApplication:annotation: as follows:
-```
+```objc
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
{
-return [[PDKClient sharedInstance] handleCallbackURL:url];
+ return [[PDKClient sharedInstance] handleCallbackURL:url];
}
```
For iOS9 and latter application:openURL:sourceApplication:annotation: was deprecated, so you should implement application:openURL:options as follows:
-```
+```objc
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString *,id> *)options
{
-return [[PDKClient sharedInstance] handleCallbackURL:url];
+ return [[PDKClient sharedInstance] handleCallbackURL:url];
}
```

0 comments on commit 01d8cee

Please sign in to comment.