Sagar...
Sagar...

Reputation: 1062

NSUserDefaults and adding void* data in it

I have data in format

struct CardData
{
   void* frontimagedata;
}

I need to hold this data in NSUserDefaults [ Need to use this data after app launch again after exit]. I am not using database in my app.

I need to use this format only as this CardData information is shared between Obj c and c++ code.

can anyone help me on this.

thanks,

Sagar

Upvotes: 0

Views: 117

Answers (1)

Stephen Darlington
Stephen Darlington

Reputation: 52565

If you save it into an NSData object you'll be able to store it in NSUserDefaults.

NSData* data = [NSData dataWithBytes:frontimagedata length:datalen];

Upvotes: 1

Related Questions