How to persist the state in IMessage in ios when user switches from one chat to another

92 views Asked by At

I am developing an iMessage application using xcode8 and swift3. I want to persist the state of the flow of application if user moves to anther chat message.

How can I achieve persistence. Any leads are highly appreciated. Thanks

1

There are 1 answers

0
Gandalf458 On

I tried to do something like this too, but I couldn't think of a good way to do it. Then I rationalized that it really wasn't something I should do. That being said, I understand wanting some objects that take a while to build to be able to reuse. Try using static variables in your MSMessagesAppViewController. They'll be available to use if you switch to a new conversation.