Skip to content

Commit

Permalink
Updated Readme and Podspec for new release
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksandr Dvornikov committed Oct 25, 2016
1 parent bcf1143 commit c42198a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions PHAssetResourceInputStream.podspec
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Pod::Spec.new do |s|
s.name = 'PHAssetResourceInputStream'
s.version = '0.0.2'
s.version = '0.0.3'
s.license = { :type => 'MIT', :file => 'LICENSE.md' }
s.summary = 'PHAssetResourceInputStream is an NSInputStream implementation library for Photos Framework'
s.summary = 'PHAssetResourceInputStream is an input stream implementation library for assets from Photos Framework'
s.homepage = 'https://github.com/fromcelticpark/PHAssetResourceInputStream'
s.author = { 'Aleksandr Dvornikov' => '[email protected]' }
s.source = { :git => 'https://github.com/fromcelticpark/PHAssetResourceInputStream.git', :tag => s.version.to_s }
Expand Down
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
![Version](https://img.shields.io/cocoapods/v/PHAssetResourceInputStream.svg?style=flat)
![Platform](https://img.shields.io/cocoapods/p/PHAssetResourceInputStream.svg?style=flat)
![Swift](https://img.shields.io/badge/%20in-swift%202.3-orange.svg)
![Swift](https://img.shields.io/badge/%20in-swift%203.0-orange.svg)


## Description

**PHAssetResourceInputStream** is a library that adds `NSInputStream` support for assets from Photos Framework. It is build on the top of [POSInputStreamLibrary](https://github.com/pavelosipov/POSInputStreamLibrary) and it uses [bounded blocking queue](https://en.wikipedia.org/wiki/Producer–consumer_problem) under the hood to inverse the producer-like API of `PHAssetResourceManager` and makes it consumer-friendly.
**PHAssetResourceInputStream** is a library that adds input stream support for assets from `Photos Framework`. It is build on the top of [POSInputStreamLibrary](https://github.com/pavelosipov/POSInputStreamLibrary) and it uses [bounded blocking queue](https://en.wikipedia.org/wiki/Producer–consumer_problem) under the hood to inverse the producer-like API of `PHAssetResourceManager` and makes it consumer-friendly.

## Example

Creating a stream:

```swift
let inputStream = NSInputStream.inputStreamWithAssetResource(assetResource)
let inputStream = InputStream.inputStream(withAssetResource: assetResource)
```

Setting an offset:

```swift
inputStream.setProperty(100, forKey: NSStreamFileCurrentOffsetKey)
inputStream.setProperty(100, forKey: .fileCurrentOffsetKey)
```

Furthemore, the library provides a set of data structures that allow you to work with a data of `PHAssetResource` in a synchronous manner.
Furthemore, the library provides a set of data structures that allows you to work with data of `PHAssetResource` in a synchronous manner.

Bellow is the example of getting the size from a `PHAssetResource`:

Expand All @@ -44,15 +44,14 @@ do {
- [-] Add an example project
- [-] Add Travis CI support
- [-] Add tests for `PHAssetResourceInputStreamDataSource`
- [-] Update to `Swift 3.0`

## Installation

**PHAssetResourceInputStream** is available through [CocoaPods](http://cocoapods.org). To install, specify it in your Podfile:

```ruby
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
platform :ios, '8.0'
use_frameworks!

target '<Your Target Name>' do
Expand Down

0 comments on commit c42198a

Please sign in to comment.