State restauration in a iMessage app

What is the recommended way to handle state restauration in a iMessage app?


I noticed that MSMessagesAppViewController conforms to UIStateRestoring. So I tried implementing encodeRestorableState and decodeRestorableState. However, they are never called.


In the documentation was mentioned that I have to return true from application:shouldRestoreApplicationState:

Since I can't access UIApplication in my iMessage app, I don't know how to tell the system I wanna participate in state restoration.


What do I need to implement to get this running?

Replies

Have you looked into just using the standard user defaults? Might be the quickest way if you're having trouble otherwise.

That's the way I proceeded. Just thought there might be a more elegant way.