Search code examples
read-eval-print-looprubymotion

How to access App::Persistence in REPL console in RubyMotion


I've saved variables like AuthToken into the App::Persistence store, but I want to debug it. Can I access this through the REPL console?


Solution

  • Absolutely. App::Persistence["AuthToken"] will work just fine in the REPL.

    If you want to get all the contents of the persistent store, try App::Persistence.storage.dictionaryRepresentation. Look for the keys that begin with your app identifier (com.yourcompany.Appname_).