Santiapps – Arduino, Raspberry Pi, Python, Internet Of Things, IoT, iOS, Android

Programming smart devices with the cloud for robotic intelligence solutions using Arduino, Raspberry Pi, Python, iOS, Android Internet Of Things Tank

  • Home
  • Tutoriales Arduino
  • Productos

Tag: login

  • Home
  • login

Using NSUserDefaults

June 2, 2012marskokoNo Comments

This is handy when saving credentials to a device so the user doesn’t have to re-login every time he launches the app. NOTE: This is not useful for saving large amounts of data or data that will change frequently. Use iCloud or persistent state stores such as databases or xml or plist files for that! Once you have the data you wish to save somewhere in your app, call the following: // call the store object NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults]; // set an object for it [prefs setObject:imageView.image forKey:@”keyToLookupImage”]; // call sync to save it [prefs synchronize]; then later in the beginning or launch of an app you can… Read More

Continue Reading
Iphone Developer, TechnologicaliOS, login, NSUserDefaults, programming
Powered by WordPress | Theme: Exoplanet by UXL Themes
Translate ยป