Skip to content

Commit

Permalink
2.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
PureCloud Jenkins committed Sep 5, 2019
1 parent bb5094f commit 8d28a34
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 10,051 deletions.
30 changes: 17 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,20 @@ Documentation can be found at [https://developer.mypurecloud.com/api/rest/client

## Install using CocoaPods

This package can be found at https://cocoapods.org/pods/PureCloudPlatformClientV2
This package can be found at https://cocoapods.org/pods/PureCloudPlatformClientV2 and the source is on github at https://github.com/MyPureCloud/platform-client-sdk-ios.

Add the following to your project's Podfile:
Reference the SDK's pod in your project's Podfile:

```
pod 'PureCloudPlatformClientV2'
```

Then install this dependency in your project:
Then install your project's dependencies:

```
$ pod install
pod install
```


## Using the SDK

### Import the SDK:
Expand All @@ -33,12 +32,18 @@ import PureCloudPlatformClientV2

#### Setting an access token

The iOS SDK does not currently contain helper methods to complete an OAuth flow. The consuming applicaiton must complete an OAuth flow to get an access token outside the scope of the SDK. For more information about authenticating with OAuth, see the Developer Center article [Authorization](https://developer.mypurecloud.com/api/rest/authorization/index.html). Once an access token is obtained, it should be set on the SDK as follows:
The iOS SDK does not contain helper methods to complete an OAuth flow. The consuming applicaiton must complete an OAuth flow to get an access token outside the scope of the SDK. For more information about authenticating with OAuth, see the Developer Center article [Authorization](https://developer.mypurecloud.com/api/rest/authorization/index.html). Once an access token is obtained, it should be set on the SDK as follows:

~~~ swift
PureCloudPlatformClientV2API.accessToken = "YOUR_ACCESS_TOKEN"
~~~

:::primary
**Implicit Grant Tutorial**

See the [iOS Web View Implicit Grant tutorial](/api/tutorials/) for a walkthrough of how to implement the OAuth Implicit Grant flow and authorize the SDK using Swift's native [WKWebView](https://developer.apple.com/documentation/webkit/wkwebview).
:::


#### Setting the environment

Expand All @@ -54,14 +59,13 @@ PureCloudPlatformClientV2API.basePath = "https://api.mypurecloud.ie"
In order to make a request, call the desired method on one of the SDK's API classes. For example, to get details for the authenticated user:

~~~ swift
let getUsersMeExpand = [UsersAPI.Expand_getUsersMe.presence].map { $0.rawValue }
UsersAPI.getUsersMe(expand: getUsersMeExpand) { (userMe, error) in
let expand: [String] = [UsersAPI.Expand_getUsersMe.enummember.rawValue]
UsersAPI.getUsersMe(expand: expand) { (response, error) in
if let error = error {
// handle error
print("Error: \(error.localizedDescription)\n\(error)")
} else if let userMe = userMe {
// handle response UserMe object
print("Success: \(String(describing: userMe.name))")
dump(error)
} else if let response = response {
print("UsersAPI.getUsersMe was successful")
dump(response)
}
}
~~~
Expand Down
4 changes: 2 additions & 2 deletions build/PureCloudPlatformClientV2.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ Pod::Spec.new do |s|
s.name = 'PureCloudPlatformClientV2'
s.ios.deployment_target = '10.0'
s.osx.deployment_target = '10.11'
s.version = '2.0.0'
s.source = { :git => 'git@github.com:MyPureCloud/platform-client-sdk-ios.git', :tag => '2.0.0' }
s.version = '2.0.1'
s.source = { :git => 'git@github.com:MyPureCloud/platform-client-sdk-ios.git', :tag => '2.0.1' }
s.authors = 'Genesys Developer Evangelists'
s.social_media_url = 'https://twitter.com/PureCloud_Dev'
s.license = 'MIT'
Expand Down
30 changes: 17 additions & 13 deletions build/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,20 @@ Documentation can be found at [https://developer.mypurecloud.com/api/rest/client

## Install using CocoaPods

This package can be found at https://cocoapods.org/pods/PureCloudPlatformClientV2
This package can be found at https://cocoapods.org/pods/PureCloudPlatformClientV2 and the source is on github at https://github.com/MyPureCloud/platform-client-sdk-ios.

Add the following to your project's Podfile:
Reference the SDK's pod in your project's Podfile:

```
pod 'PureCloudPlatformClientV2'
```

Then install this dependency in your project:
Then install your project's dependencies:

```
$ pod install
pod install
```


## Using the SDK

### Import the SDK:
Expand All @@ -33,12 +32,18 @@ import PureCloudPlatformClientV2

#### Setting an access token

The iOS SDK does not currently contain helper methods to complete an OAuth flow. The consuming applicaiton must complete an OAuth flow to get an access token outside the scope of the SDK. For more information about authenticating with OAuth, see the Developer Center article [Authorization](https://developer.mypurecloud.com/api/rest/authorization/index.html). Once an access token is obtained, it should be set on the SDK as follows:
The iOS SDK does not contain helper methods to complete an OAuth flow. The consuming applicaiton must complete an OAuth flow to get an access token outside the scope of the SDK. For more information about authenticating with OAuth, see the Developer Center article [Authorization](https://developer.mypurecloud.com/api/rest/authorization/index.html). Once an access token is obtained, it should be set on the SDK as follows:

~~~ swift
PureCloudPlatformClientV2API.accessToken = "YOUR_ACCESS_TOKEN"
~~~

:::primary
**Implicit Grant Tutorial**

See the [iOS Web View Implicit Grant tutorial](/api/tutorials/) for a walkthrough of how to implement the OAuth Implicit Grant flow and authorize the SDK using Swift's native [WKWebView](https://developer.apple.com/documentation/webkit/wkwebview).
:::


#### Setting the environment

Expand All @@ -54,14 +59,13 @@ PureCloudPlatformClientV2API.basePath = "https://api.mypurecloud.ie"
In order to make a request, call the desired method on one of the SDK's API classes. For example, to get details for the authenticated user:

~~~ swift
let getUsersMeExpand = [UsersAPI.Expand_getUsersMe.presence].map { $0.rawValue }
UsersAPI.getUsersMe(expand: getUsersMeExpand) { (userMe, error) in
let expand: [String] = [UsersAPI.Expand_getUsersMe.enummember.rawValue]
UsersAPI.getUsersMe(expand: expand) { (response, error) in
if let error = error {
// handle error
print("Error: \(error.localizedDescription)\n\(error)")
} else if let userMe = userMe {
// handle response UserMe object
print("Success: \(String(describing: userMe.name))")
dump(error)
} else if let response = response {
print("UsersAPI.getUsersMe was successful")
dump(response)
}
}
~~~
Expand Down
30 changes: 17 additions & 13 deletions build/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,20 @@ Documentation can be found at [https://developer.mypurecloud.com/api/rest/client

## Install using CocoaPods

This package can be found at https://cocoapods.org/pods/PureCloudPlatformClientV2
This package can be found at https://cocoapods.org/pods/PureCloudPlatformClientV2 and the source is on github at https://github.com/MyPureCloud/platform-client-sdk-ios.

Add the following to your project's Podfile:
Reference the SDK's pod in your project's Podfile:

```
pod 'PureCloudPlatformClientV2'
```

Then install this dependency in your project:
Then install your project's dependencies:

```
$ pod install
pod install
```


## Using the SDK

### Import the SDK:
Expand All @@ -33,12 +32,18 @@ import PureCloudPlatformClientV2

#### Setting an access token

The iOS SDK does not currently contain helper methods to complete an OAuth flow. The consuming applicaiton must complete an OAuth flow to get an access token outside the scope of the SDK. For more information about authenticating with OAuth, see the Developer Center article [Authorization](https://developer.mypurecloud.com/api/rest/authorization/index.html). Once an access token is obtained, it should be set on the SDK as follows:
The iOS SDK does not contain helper methods to complete an OAuth flow. The consuming applicaiton must complete an OAuth flow to get an access token outside the scope of the SDK. For more information about authenticating with OAuth, see the Developer Center article [Authorization](https://developer.mypurecloud.com/api/rest/authorization/index.html). Once an access token is obtained, it should be set on the SDK as follows:

~~~ swift
PureCloudPlatformClientV2API.accessToken = "YOUR_ACCESS_TOKEN"
~~~

:::primary
**Implicit Grant Tutorial**

See the [iOS Web View Implicit Grant tutorial](/api/tutorials/) for a walkthrough of how to implement the OAuth Implicit Grant flow and authorize the SDK using Swift's native [WKWebView](https://developer.apple.com/documentation/webkit/wkwebview).
:::


#### Setting the environment

Expand All @@ -54,14 +59,13 @@ PureCloudPlatformClientV2API.basePath = "https://api.mypurecloud.ie"
In order to make a request, call the desired method on one of the SDK's API classes. For example, to get details for the authenticated user:

~~~ swift
let getUsersMeExpand = [UsersAPI.Expand_getUsersMe.presence].map { $0.rawValue }
UsersAPI.getUsersMe(expand: getUsersMeExpand) { (userMe, error) in
let expand: [String] = [UsersAPI.Expand_getUsersMe.enummember.rawValue]
UsersAPI.getUsersMe(expand: expand) { (response, error) in
if let error = error {
// handle error
print("Error: \(error.localizedDescription)\n\(error)")
} else if let userMe = userMe {
// handle response UserMe object
print("Success: \(String(describing: userMe.name))")
dump(error)
} else if let response = response {
print("UsersAPI.getUsersMe was successful")
dump(response)
}
}
~~~
Expand Down
Loading

0 comments on commit 8d28a34

Please sign in to comment.