Package org.robovm.cocoatouch.foundation

Examples of org.robovm.cocoatouch.foundation.NSMutableDictionary


  public Preferences getPreferences (String name) {
    File libraryPath = new File(System.getenv("HOME"), "Library");
    String finalPath = new File(libraryPath, name + ".plist").getAbsolutePath();
   
    Gdx.app.debug("IOSApplication", "Loading NSDictionary from file " + finalPath);
    NSMutableDictionary nsDictionary = NSMutableDictionary.fromFile(finalPath);

    // if it fails to get an existing dictionary, create a new one.
    if (nsDictionary == null) {
      Gdx.app.debug("IOSApplication", "NSDictionary not found, creating a new one");
      nsDictionary = new NSMutableDictionary();
      boolean fileWritten = nsDictionary.writeToFile(finalPath, false);
      if (fileWritten)
        Gdx.app.debug("IOSApplication", "NSDictionary file written");
      else
        Gdx.app.debug("IOSApplication", "Failed to write NSDictionary to file " + finalPath);
    }
View Full Code Here

TOP

Related Classes of org.robovm.cocoatouch.foundation.NSMutableDictionary

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.