Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7494719
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T17:44:11+00:00 2026-05-29T17:44:11+00:00

In my app I am working with the SimpleKML framework https://github.com/mapbox/Simple-KML I have some

  • 0

In my app I am working with the SimpleKML framework

https://github.com/mapbox/Simple-KML

I have some big files which takes about 5 seconds to process thought this library. I was thinking to cache the object in something like NSData.

I have read this tutorial from Apple:

https://developer.apple.com/library/mac/#documentation/cocoa/conceptual/Archiving/Articles/archives.html

But i dont really know of using nscoder is the best way to do this. Can someone point me in the right direction?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T17:44:16+00:00Added an answer on May 29, 2026 at 5:44 pm

    You want to use NSKeyedArchiver and NSKeyedUnarchiver.

    If the object you’re saving (and the objects it has as properties, and their properties, etc.) implement the NSCoding protocol then it’s, as simple as

    NSData *savedData = [NSKeyedArchiver archivedDataWithRootObject:someObject];
    [savedData writeToFile:pathToSaveFile atomically:YES];
    

    to archive the object into an NSData and then save it to disk, and then later

    NSData *loadedData = [NSData dataWithContentsOfFile:pathToSaveFile];
    SomeClass *foo = [NSKeyedUnarchiver loadedData]
    

    to load the data and unarchive the object from the data.

    If not, you’ll need to override initWithCoder: and encodeWithCoder: for the objects in question to make them serialize properly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a web-app, in which each user has multiple non-local XML files
I have just got my web app working with usernames being like this: http://myapp.com/dean
I have one App working with the dataabase in which the organisation column having
Suppose I have this simple app working : # model class Project has_many :numbers
Whilst trying to get our app working in Firefox (I'm a big proponent of
The app I'm working on has 4 tabs, 3 of which share many features,
In an app I'm working on, I have a plain style UITableView that can
For an app I'm working on, I'd like to have a control panel window
I have a vb app working now but many users have complained to me
So I have my app working good when you press and drag along. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.