Skip to content

Commit

Permalink
Add information about how the library must be imported
Browse files Browse the repository at this point in the history
  • Loading branch information
defagos committed Sep 20, 2016
1 parent 1ea9348 commit 686ffa6
Showing 1 changed file with 37 additions and 3 deletions.
40 changes: 37 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,48 @@ pod 'SRGMediaPlayer', '<version>'

For more information about CocoaPods and the `Podfile`, please refer to the [official documentation](http://guides.cocoapods.org/).

## Demo project
## Usage

To test what the library is capable of, try running the associated demo by opening the workspace and building the associated scheme.
### Usage from Objective-C source files

## Usage
Import the global header file using

```objective-c
#import <SRGMediaPlayer/SRGMediaPlayer.h>
```

You can similarly import individual files, e.g.

```objective-c
#import <SRGMediaPlayer/RTSMediaPlayerViewController.h>
```

It you use CocoaPods with the `use_frameworks!` directive, it is easier to import the SRGMediaPlayer module itself where needed:

```objective-c
@import SRGMediaPlayer;
```

### Usage from Swift source files

If you installed SRGMediaPlayer with CocoaPods but without the `use_frameworks!` directive, import the global header from a bridging header:

```objective-c
#import <SRGMediaPlayer/SRGMediaPlayer.h>
```

If you use CocoaPods with the `use_frameworks!` directive, the SRGMediaPlayer module can be imported where needed:

```swift
import SRGMediaPlayer
```

To learn about how the library can be used, have a look at the [getting started guide](Documentation/Getting-started.md).

## Demo project

To test what the library is capable of, try running the associated demo by opening the workspace and building the associated scheme.

## License

See the [LICENSE](LICENSE) file for more information.

0 comments on commit 686ffa6

Please sign in to comment.