Skip to content

Commit

Permalink
Added release notes to the CHANGELOG and bumped the version to 2.0.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
cnoon committed Sep 11, 2016
1 parent 3faf67f commit ce5aa0b
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 14 deletions.
33 changes: 32 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,44 @@
All notable changes to this project will be documented in this file.
`AlamofireNetworkActivityIndicator` adheres to [Semantic Versioning](http://semver.org/).

#### 1.x Releases
#### 2.x Releases
- `2.0.x` Releases - [2.0.0](#200)

#### 1.x Releases
- `1.1.x` Releases - [1.1.0](#110)
- `1.0.x` Releases - [1.0.0](#100) | [1.0.1](#101)

---

## [2.0.0](https://github.com/Alamofire/AlamofireNetworkActivityIndicator/releases/tag/2.0.0)
Released on 2016-09-11. All issues associated with this milestone can be found using this
[filter](https://github.com/Alamofire/AlamofireNetworkActivityIndicator/milestone/4?closed=1).

#### Updated
- All source, test and example logic as well as project settings to compile against
the Xcode 8 beta releases.
- Updated by [Christian Noon](https://github.com/cnoon) and
[Jon Shier](https://github.com/jshier).
- Deployment target and README requirements to iOS 9.0.
- Updated by [Christian Noon](https://github.com/cnoon).
- All source and test APIs to match Swift 3 design guidelines.
- Updated by [Christian Noon](https://github.com/cnoon).
- The Cartfile and the Alamofire submodule to the 4.0.0 release.
- Updated by [Christian Noon](https://github.com/cnoon).
- The docstrings to use the new Swift 3 formatting guidelines.
- Updated by [Christian Noon](https://github.com/cnoon).
- The podspec version to 2.0.0 and bumped deployment target and dependency.
- Updated by [Christian Noon](https://github.com/cnoon).
- Project settings by running Swift 3 conversion tool and setting
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES to YES.
- Updated by [Christian Noon](https://github.com/cnoon).
- The travis-ci yaml file to build against Xcode 8 osx_image.
- Updated by [Christian Noon](https://github.com/cnoon).
- Code signing to automatic with no team and updated code signing identities.
- Updated by [Christian Noon](https://github.com/cnoon).

---

## [1.1.0](https://github.com/Alamofire/AlamofireNetworkActivityIndicator/releases/tag/1.1.0)
Released on 2016-09-08. All issues associated with this milestone can be found using this
[filter](https://github.com/Alamofire/AlamofireNetworkActivityIndicator/issues?utf8=✓&q=milestone%3A1.1.0).
Expand Down
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Controls the visibility of the network activity indicator on iOS using Alamofire

- [X] Automatic Management of Activity Indicator Visiblity
- [X] Delay Timers to Mitigate Flicker
- [X] Can Support `NSURLSession` Instances Not Managed by Alamofire
- [X] Can Support `URLSession` Instances Not Managed by Alamofire
- [x] Comprehensive Test Coverage
- [x] [Complete Documentation](http://cocoadocs.org/docsets/AlamofireNetworkActivityIndicator)

Expand Down Expand Up @@ -44,7 +44,7 @@ Controls the visibility of the network activity indicator on iOS using Alamofire
$ gem install cocoapods
```

> CocoaPods 1.0.0+ is required.
> CocoaPods 1.1.0+ is required.
To integrate AlamofireNetworkActivityIndicator into your Xcode project using CocoaPods, specify it in your `Podfile`:

Expand All @@ -53,7 +53,7 @@ source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!

pod 'AlamofireNetworkActivityIndicator', '~> 1.1'
pod 'AlamofireNetworkActivityIndicator', '~> 2.0'
```

Then, run the following command:
Expand All @@ -76,45 +76,45 @@ $ brew install carthage
To integrate AlamofireNetworkActivityIndicator into your Xcode project using Carthage, specify it in your `Cartfile`:

```ogdl
github "Alamofire/AlamofireNetworkActivityIndicator" ~> 1.1
github "Alamofire/AlamofireNetworkActivityIndicator" ~> 2.0
```

---

## Usage

The `NetworkActivityIndicatorManager` manages the state of the network activity indicator. To begin using it, all that is required is to enable the `sharedManager` in `application:didFinishLaunchingWithOptions:` in your `AppDelegate`.
The `NetworkActivityIndicatorManager` manages the state of the network activity indicator. To begin using it, all that is required is to enable the `shared` instance in `application:didFinishLaunchingWithOptions:` in your `AppDelegate`.

```swift
NetworkActivityIndicatorManager.sharedManager.isEnabled = true
NetworkActivityIndicatorManager.shared.isEnabled = true
```

By enabling the `sharedManager` for the system, the network activity indicator will show and hide automatically as Alamofire requests start and complete.
By enabling the `shared` manager for the system, the network activity indicator will show and hide automatically as Alamofire requests start and complete.

### Notifications

The `NetworkActivityIndicatorManager` manages the currently active network request count by observing notifications emitted from Alamofire. By observing the task state changes, the `sharedManager` instance always knows how many requests are currently active and updates the visibility of the activity indicator accordingly.
The `NetworkActivityIndicatorManager` manages the currently active network request count by observing notifications emitted from Alamofire. By observing the task state changes, the `shared` manager always knows how many requests are currently active and updates the visibility of the activity indicator accordingly.

> It is possible to have the `sharedManager` observe `NSURLSession` instances not inside Alamofire. You will need to emit matching notifications from the `NSURLSessionDelegate` matching those found in [Alamofire](https://github.com/Alamofire/Alamofire/blob/master/Source/Notifications.swift#L28-L44).
> It is possible to have the `shared` manager observe `URLSession` instances not inside Alamofire. You will need to emit matching notifications from the `URLSessionDelegate` matching those found in [Alamofire](https://github.com/Alamofire/Alamofire/blob/master/Source/Notifications.swift#L27-L42).
### Delay Timers

In order to make the activity indicator experience for a user as pleasant as possible, there need to be start and stop delays added in to avoid flickering. There are two such delay timers built into the `sharedManager`.
In order to make the activity indicator experience for a user as pleasant as possible, there need to be start and stop delays added in to avoid flickering. There are two such delay timers built into the `shared` manager.

#### Start Delay

The start delay is a time interval indicating the minimum duration of networking activity that should occur before the activity indicator is displayed. This helps avoid needlessly displaying the indicator for really fast network requests. The default value is `1.0` second. You can easily change the default value if needed.

```swift
NetworkActivityIndicatorManager.sharedManager.startDelay = 1.0
NetworkActivityIndicatorManager.shared.startDelay = 1.0
```

#### Completion Delay

The completion delay is a time interval indicating the duration of time that no networking activity should be observed before dismissing the activity indicator. This allows the activity indicator to be continuously displayed between multiple network requests. Without this delay, the activity indicator tends to flicker. The default value is `0.2` seconds. You can easily change the default value if needed.

```swift
NetworkActivityIndicatorManager.sharedManager.completionDelay = 0.2
NetworkActivityIndicatorManager.shared.completionDelay = 0.2
```

---
Expand Down
2 changes: 1 addition & 1 deletion Source/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.1.0</string>
<string>2.0.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down

0 comments on commit ce5aa0b

Please sign in to comment.