Question: We will be developing a new web site for a client who already has a Kentico 8.2 license. I am trying to make a case for developing the site using Kentico 9. Some key features I have found so far include:

* faster performance (how much in real-world terms?)
* better integration with .Net MVC
* content staging tasks can be synchronized per user account
* better rollback functionality: previously we had to make full database backups, content staging in Kentico 8.2 causes issues for restoring previous versions of a page.
* built in source control support for GIT

It looks like Kentico integration with the client's existing database may be possible. Has anyone done this? What are the limitations or caveats?

Is there a discount for upgrading the license from 8.2 to 9?

Thanks in advance for your feedback!

Answer: 
### Preserving and Restoring State

Feature you are looking for is called State Restoration. From the [docs](http://State%20preservation%20records%20the%20configuration%20of%20your%20app%20before%20it%20is%20suspended%20so%20that%20the%20configuration%20can%20be%20restored%20on%20a%20subsequent%20app%20launch.):

> 
> State preservation records the configuration of your app before it is
> suspended so that the configuration can be restored on a subsequent
> app launch.
> 
> 
> 

How to tackle it:

1. Tag your view controllers for preservation. Assign restoration identifiers.
2. Restore view controllers at launch time. Encode and decode their state.

Topic is very broad but the [docs](https://developer.apple.com/library/ios/featuredarticles/ViewControllerPGforiPhoneOS/PreservingandRestoringState.html) explain it very well.
What you're trying to do is keep persistent data between launches of your application, right?

For that you should use core data, there are many useful recourses on the web to help you with that, heres a few helpful ones.

<https://developer.apple.com/library/watchos/documentation/Cocoa/Conceptual/CoreData/index.html>
<https://www.raywenderlich.com/934/core-data-tutorial-for-ios-getting-started>