Skip to content

Commit

Permalink
Add migration docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mac-cain13 committed Jan 13, 2016
1 parent 2b3bcfb commit 5f415aa
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Documentation/Migration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Migration

Pointers for migration between major versions.

## Upgrading to 1.0

- iOS 7 support is dropped, use [R.swift 0.13](https://github.com/mac-cain13/R.swift/releases/tag/v0.13.0) if you still have to support it.
- Generated code now depends on the [R.swift.Library](https://github.com/mac-cain13/R.swift.Library), CocoaPods users don't need to do anything. Manual installation users need to include this library themselves, see the readme for instructions.
- In general; properties that created new stuff are now functions to represent better that they actually create a new instance.
* `R.image.settingsIcon` changed to `R.image.settingsIcon()`
* `R.file.someJson` changed to `R.file.someJson()`
* `R.storyboard.main.initialViewController` changed to `R.storyboard.main.initialViewController()`
* `R.storyboard.main.someViewController` changed to `R.storyboard.main.someViewController()`
- In general; Where you needed to use `.initialize()` to get the instance, a shorter function is available now:
* `R.storyboard.main.initialize()` changed to `R.storyboard.main()`
* `R.nib.someView.initiate()` changed to `R.nib.someView()`
- Nib root view loading changed from `R.nib.someView.firstView(nil, options: nil)` to `R.nib.someView.firstView(owner: nil)`
- Typed segue syntax changed from `segue.typedInfoWithIdentifier(R.segue.someViewController.someSegue)` to `R.segue.someViewController.someSegue(segue: segue)`
- Runtime validation changed:
* `R.validate()` now throws errors it encounters
* `R.assertValid()` asserts on errors and only performs action in a debug/non-optimized build
* For regular use cases using `R.assertValid()` is recommended
1 change: 1 addition & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ Runtime validation with [`R.assertValid()`](Documentation/Examples.md#runtime-va
- [What are the requirements to run R.swift?](Documentation/QandA.md#what-are-the-requirements-to-run-rswift)
- [How to use methods with a `Void` argument?](Documentation/QandA.md#how-to-use-methods-with-a-void-argument)
- [How does R.swift work?](Documentation/QandA.md#how-does-rswift-work)
- [How to upgrade to 1.0?](Documentation/Migration.md)

## Installation

Expand Down

0 comments on commit 5f415aa

Please sign in to comment.