nskeyedarchiver Questions

4

Solved

I'm hoping this isn't something to do with the fact that I'm using a Mutable array here, but this one is baffling me so it wouldn't surprise me if that were the case. BACKGROUND: I have made a sm...
Moramorabito asked 30/4, 2012 at 23:23

1

Solved

I'm trying a basic implementation of the NSCoding protocol in swift, but it seems I can't success to unarchive an object after it has been correctly archived. Here's my attempt import Cocoa clas...
Manzano asked 5/7, 2014 at 19:37

4

Solved

My Problem: saveInBackground isn't working. The Reason It's not working: I'm saving PFObjects stored in an NSArray to file using NSKeyedArchiving. The way I do that is by implementing NSCoding via...
Harrisonharrod asked 16/4, 2014 at 20:43

1

Solved

Somewhere in my code NSData *data = [NSKeyedArchiver archivedDataWithRootObject:someArray]; I expect data to be nil if someArray is nil, but it return some data I don't understand. I print it ou...
Hulton asked 10/4, 2014 at 14:6

3

Solved

I don't understand why I can archive CGPoint structs but not CLLocationCoordinate2D structs. What's the difference to the archiver? Platform is iOS. I'm running in the simulator and haven't tried ...
Montelongo asked 5/9, 2012 at 23:52

2

Solved

Based on the accepted answer to this question I wrote the following code: NSData* somedata; somedata=[NSKeyedArchiver archivedDataWithRootObject:ts]; where ts is an NSAttributedString that is po...
Rictus asked 11/5, 2012 at 21:4

1

I have a very large HTML Document that I need to show in my app. It utilizes CSS Columns, and scrolls horizontally. What I try to do is archive the UIWebView that renders the document in its curren...
Hemphill asked 3/5, 2013 at 11:32

1

Solved

Recently, I'm learning about NSKeyedArchiver and NSKeyedUnarchiver. I found that there are three ways to archive an array and I'm trying to figure out the differences. 1.Using archiveRootObject:to...
Vertigo asked 18/4, 2013 at 7:42

2

Solved

Is the parameter for NSKeyedArchiver archivedDataWithRootObject: supposed to be the array I am trying to save, or the array converted into NSData?

3

Solved

I'm unable to create an NSData object from a UIColor (with a pattern) created with the factory method [UIColor colorWithPatternImage:image] works fine for standard UIColor objects. Wondering if ...
Mnemosyne asked 17/9, 2011 at 18:11

1

Solved

I'm going a bit crazy trying to archive and unarchive a UIImageView which has number of subviews which are custom views derived from UIImageView. Here's what I've done: Add a category to the proje...
Emlin asked 17/2, 2012 at 19:49

1

Solved

I've never used NSCoding before and I'm very confused about how it should be implemented. My current iPad app has a UIImageView (called "background") which is a property of my main view controller...
Emergence asked 14/2, 2012 at 17:50

2

Solved

I guess this is very obvious, but I have a question about loading data. If have a file called library.dat which stores all kind of information about objects in the app. It's set up all nicely (in t...
Coverley asked 26/9, 2011 at 15:53

3

Solved

The iOS docs differentiate between "serializing" and "archiving." Is this a general distinction (i.e., holds in other languages) or is it specific to Objective-C? Also, what is the difference betwe...
Shuler asked 26/11, 2010 at 21:46

1

Solved

I have a custom class that I wish to save and load. The class contains an NSDate, an NSString, and an NSNumber. I have implemented the NSCoding protocol in the .h file. Here is the code I have so f...

0

I want do something with these step: Encode a kind of object A with NSKeyedArchiver M and I can get a NSData X. Init another kind of object B with NSKeyedUnarchiver N from NSData X. The names of ...
Eel asked 24/11, 2010 at 4:41

1

Solved

How do you know if you need to use NSArchiver or NSKeyedArchiver? What's the difference?
Skippy asked 19/9, 2010 at 8:21

1

Solved

My issue is then I retrieve my NSArray of Store objects, all my NSString properties are causing BadAccess errors. The int and double properties work fine! store.h @interface Store : NSObject<...
Aromatize asked 12/8, 2010 at 13:8

1

Solved

When I use NSKeyedArchiver is the data that is written a *.plist, I have seen some examples where people have the output file down as *.txt or even without an extension at all? -(void)saveCore { ...
Abiogenetic asked 15/3, 2010 at 14:39

3

Solved

I was wondering whether or not it is possible to use the NSCoder method: - (void)encodeObject:(id)objv forKey:(NSString *)key to encode either an instance of NSArray or NSDictionary. If not how ...
Connor asked 9/2, 2010 at 2:39

3

Solved

I'm having trouble setting up a model object to save the visual state of user generated CALayers in a simple graphics application for the iphone. I'm attempting to save the background color and fr...
Minestrone asked 25/7, 2009 at 18:32

2

Solved

I have a class that I've made into a singleton and am able to save it's state using an NSKeyedArchiver, but I can't wrap my head around pulling it's state back out. In the function that does the l...
Sensorium asked 18/7, 2009 at 23:18

© 2022 - 2024 — McMap. All rights reserved.