Skip to content

Commit

Permalink
Version documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartkhall committed Jul 4, 2014
1 parent 1f08699 commit 11b302d
Showing 1 changed file with 53 additions and 1 deletion.
54 changes: 53 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,62 @@ To show the default UI simply call the showFromController helper method on ABXFe

### Versions

Documentation coming soon, check the example.
#### Default UI

Showing a list:

[ABXVersionsViewController showFromController:self];

* **controller** - required - the controller to be presented from.

Showing new versions / update text:

[ABXVersionNotificationView fetchAndShowInController:self foriTunesID:kiTunesID backgroundColor:[UIColor redColor] textColor:[UIColor blackColor] buttonColor:[UIColor whiteColor] complete:^(BOOL shown) {
// Here you may want to chain fetching notifications
// if it wasn't shown
}];

* **controller** - required - the controller to be presented from.
* **foriTunesID** - required - your iTunes identifier.
* **backgroundColor** - required - the background color for the control.
* **textColor** - required - the text color for the control.
* **buttonColor** - required - the color for the buttons.
* **complete** - optional - a callback when the operation has completed.

---

#### Manually Fetching

Fetch the list of versions:

[ABXVersion fetch:^(NSArray *versions, ABXResponseCode responseCode, NSInteger httpCode, NSError *error) {
switch (responseCode) {
case ABXResponseCodeSuccess: {
}
break;
default: {
}
break;
}
}];

* **versions** array of ABXVersion objects.
* **responseCode** - response code, ABXResponseCodeSuccess for success, see enum for errors.
* **httpCode** - the http code, 200 for success etc.
* **error** - the error, nil if success.

Fetch the current version:

[ABXVersion fetchCurrentVersion:^(ABXVersion *version, ABXVersion *currentVersion, ABXResponseCode responseCode, NSInteger httpCode, NSError *error) {
}];

* **version** the version matching the current build version.
* **currentVersion** the latest version on the server.
* **responseCode** - response code, ABXResponseCodeSuccess for success, see enum for errors.
* **httpCode** - the http code, 200 for success etc.
* **error** - the error, nil if success.

### Notifications

Documentation coming soon, check the example.
Expand Down

0 comments on commit 11b302d

Please sign in to comment.