-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add COCOAPODS.md with installation instructions (#58)
- Loading branch information
1 parent
3aea7a6
commit aa0b3bc
Showing
1 changed file
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# CocoaPods | ||
|
||
## Basic Integration | ||
|
||
To integrate TIP into your iOS project using CocoaPods, simply add the following to your **Podfile**: | ||
|
||
```ruby | ||
target 'MyApp' do | ||
pod 'TwitterImagePipeline', '~> 2.24.1' | ||
end | ||
``` | ||
|
||
Then run a `pod install` inside your terminal, or from CocoaPods.app. | ||
|
||
## Extended Integration | ||
|
||
TIP also has support for two additional codecs that are not included with the default installation: | ||
|
||
- WebP (Backwards compatible to iOS 10) | ||
- MP4 | ||
|
||
If you wish to include these codecs, modify your **Podfile** to define the appropriate subspecs like the examples below: | ||
|
||
```ruby | ||
target 'MyApp' do | ||
pod 'TwitterImagePipeline', '~> 2.24.1', :subspecs => ['WebPCodec/Default'] | ||
|
||
pod 'TwitterImagePipeline', '~> 2.24.1', :subspecs => ['WebPCodec/Animated'] | ||
|
||
pod 'TwitterImagePipeline', '~> 2.24.1', :subspecs => ['MP4Codec'] | ||
|
||
pod 'TwitterImagePipeline', '~> 2.24.1', :subspecs => ['WebPCodec/Animated', 'MP4'] | ||
end | ||
``` | ||
|
||
- **`WebP/Default`**: Includes the `TIPXWebPCodec` with the WebP framework for basic WebP support. | ||
- **`WebP/Animated`**: Adds additional support to the `TIPXWebPCodec` for demuxing WebP data allowing for animated images. | ||
- **`MP4Codec`**: Includes the `TIPXMP4Codec`. | ||
|
||
**Note:** You are still required to add these codecs to the `TIPImageCodecCatalogue` manually: | ||
|
||
```objc | ||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | ||
{ | ||
TIPImageCodecCatalogue *codecCatalogue = [TIPImageCodecCatalogue sharedInstance]; | ||
|
||
[codecCatalogue setCodec:[[TIPXWebPCodec alloc] initPreservingDefaultCodecsIfPresent:NO] | ||
forImageType:TIPImageTypeWEBP]; | ||
|
||
[codecCatalogue setCodec:[[TIPMP4Codec alloc] init] | ||
forImageType:TIPXImageTypeMP4]; | ||
|
||
// ... | ||
} | ||
``` |