diff --git a/README.md b/README.md index 28d374ec..996172f8 100644 --- a/README.md +++ b/README.md @@ -24,14 +24,48 @@ pod 'SRGMediaPlayer', '' 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 +``` + +You can similarly import individual files, e.g. + +```objective-c +#import +``` + +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 +``` + +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.