Skip to content

Commit

Permalink
Move documentation to docs folder
Browse files Browse the repository at this point in the history
  • Loading branch information
glennrfisher committed Nov 23, 2016
1 parent a70d750 commit 9c5d213
Show file tree
Hide file tree
Showing 20 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The Watson Developer Cloud iOS SDK makes it easy for mobile developers to build

There are many resources to help you build your first cognitive application with the iOS SDK:
- Read the [Readme](README.md)
- Follow the [QuickStart Guide](Documentation/Quickstart.md)
- Follow the [QuickStart Guide](docs/quickstart.md)
- Review a [Sample Application](#sample-applications)
- Browse the [Documentation](http://watson-developer-cloud.github.io/ios-sdk/)

Expand Down Expand Up @@ -169,7 +169,7 @@ To continue using the iOS SDK with Xcode 7, we recommend following the v0.7.x re

## Objective-C Compatibility

Please see [this tutorial](Documentation/ObjectiveC.md) for more information about consuming the Watson Developer Cloud iOS SDK in an Objective-C application.
Please see [this tutorial](docs/objective-c.md) for more information about consuming the Watson Developer Cloud iOS SDK in an Objective-C application.

## Contributing

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
28 changes: 14 additions & 14 deletions Documentation/Quickstart.md → docs/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,35 @@ This guide contains step-by-step instructions to create an iOS application with

1. Open Xcode and create a new project with the "Single View Application" template.

![New Project](Quickstart-Images/01-NewProject.png?raw=true)
![New Project](quickstart-resources/01-NewProject.png?raw=true)

2. Set the product name to "Watson Speaks" and language to "Swift."

![Project Settings](Quickstart-Images/02-ProjectSettings.png?raw=true)
![Project Settings](quickstart-resources/02-ProjectSettings.png?raw=true)

## Download and Build the iOS SDK Frameworks

We will use the [Carthage](https://github.com/Carthage/Carthage) dependency manager to download and build the iOS SDK. You will need to [install Carthage](https://github.com/Carthage/Carthage#installing-carthage) if it is not already installed on your system.

1. Create a file in your project directory called `Cartfile`.

![Create Cartfile](Quickstart-Images/03-CreateCartfile.png?raw=true)
![Create Cartfile](quickstart-resources/03-CreateCartfile.png?raw=true)

2. Add the following line to your `Cartfile`. This specifies the iOS SDK as a dependency. In a production app, you may also want to specify a [version requirement](https://github.com/Carthage/Carthage/blob/master/Documentation/Artifacts.md#version-requirement).

```
github "watson-developer-cloud/ios-sdk"
```
![Add Dependency](Quickstart-Images/04-AddDependency.png?raw=true)
![Add Dependency](quickstart-resources/04-AddDependency.png?raw=true)
3. Open the Terminal and navigate to your project directory. Then use Carthage to download and build the iOS SDK:
```
$ carthage update --platform iOS
```
![Carthage Update](Quickstart-Images/05-CarthageUpdate.png?raw=true)
![Carthage Update](quickstart-resources/05-CarthageUpdate.png?raw=true)
Carthage clones the iOS SDK repository and builds a framework for each Watson service in the `Carthage/Build/iOS` directory. It also builds a framework called `RestKit` that is used internally for networking and JSON parsing.
Expand All @@ -44,25 +44,25 @@ To use the iOS SDK frameworks, we need to link them with our application.
1. In Xcode, navigate to your application target's "General" settings tab. Then scroll down to the "Linked Frameworks and Libraries" section and click the `+` icon.
![General Settings](Quickstart-Images/06-GeneralSettings.png?raw=true)
![General Settings](quickstart-resources/06-GeneralSettings.png?raw=true)
2. In the window that appears, choose "Add Other..." and navigate to the `Carthage/Build/iOS` directory. Select the `TextToSpeechV1` and `RestKit` frameworks to link them with your application.
![Link Frameworks](Quickstart-Images/07-LinkFrameworks.png?raw=true)
![Link Frameworks](quickstart-resources/07-LinkFrameworks.png?raw=true)
We also need to copy the frameworks into our application to make them accessible at runtime. We will use a Carthage script to copy the frameworks and avoid an [App Store submission bug](http://www.openradar.me/radar?id=6409498411401216).
1. In Xcode, navigate to your application target's "Build Phases" settings tab. Then click the `+` icon and add a "New Run Script Phase."
![New Run Script Phase](Quickstart-Images/09-NewRunScriptPhase.png?raw=true)
![New Run Script Phase](quickstart-resources/09-NewRunScriptPhase.png?raw=true)
2. Add the following command to the run script phase:
```
/usr/local/bin/carthage copy-frameworks
```
![AddCarthageScript](Quickstart-Images/10-AddCarthageScript.png?raw=true)
![AddCarthageScript](quickstart-resources/10-AddCarthageScript.png?raw=true)
4. Add the frameworks you'd like to use (and the `RestKit` framework) to the "Input Files" list:
Expand All @@ -71,15 +71,15 @@ We also need to copy the frameworks into our application to make them accessible
$(SRCROOT)/Carthage/Build/iOS/RestKit.framework
```
![Add Input Files](Quickstart-Images/11-AddInputFiles.png?raw=true)
![Add Input Files](quickstart-resources/11-AddInputFiles.png?raw=true)
## Add Exception for App Transport Security
To securely connect to IBM Watson services, the application's `Info.plist` file must be modified with an App Transport Security exception for the `watsonplatform.net` domain.
1. In Xcode, right-click on the `Info.plist` file and choose `Open As -> Source Code`.
![Open As Source Code](Quickstart-Images/12-OpenAsSourceCode.png?raw=true)
![Open As Source Code](quickstart-resources/12-OpenAsSourceCode.png?raw=true)
2. Copy-and-paste the following source code into the `Info.plist` file.
Expand All @@ -103,7 +103,7 @@ To securely connect to IBM Watson services, the application's `Info.plist` file
</dict>
```
![App Transport Security Exception](Quickstart-Images/13-AppTransportSecurity.png?raw=true)
![App Transport Security Exception](quickstart-resources/13-AppTransportSecurity.png?raw=true)
## Synthesize with Text to Speech
Expand All @@ -118,7 +118,7 @@ We will modify our project's `ViewController` to synthesize English text with th
import AVFoundation
```
![Import Frameworks](Quickstart-Images/14-ImportFrameworks.png?raw=true)
![Import Frameworks](quickstart-resources/14-ImportFrameworks.png?raw=true)
3. Add a `var audioPlayer: AVAudioPlayer!` property to the `ViewController` class. This ensures that the audio player does not fall out of scope and end playback when the `viewDidLoad()` function returns.
Expand All @@ -137,6 +137,6 @@ We will modify our project's `ViewController` to synthesize English text with th
}
```
![Synthesize Text](Quickstart-Images/15-SynthesizeText.png?raw=true)
![Synthesize Text](quickstart-resources/15-SynthesizeText.png?raw=true)
5. Run your application in the simulator to hear the synthesized text!

0 comments on commit 9c5d213

Please sign in to comment.