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

  • SEARCH
  • Home
  • 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 9015063
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T03:39:30+00:00 2026-06-16T03:39:30+00:00

I have a custom object class which I need to encode. I have implementing

  • 0

I have a custom object class which I need to encode. I have implementing the coding protocol, and I have managed to encode every object apart from the NSMutableDictionary object within the class. When I try to encode that, I get this error

 *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Only support RGBA or the White color space, this method is a hack.'

Now, this dictionary class contains a lot of different custom objects I have set up. When I search online, I find this

Saving [UIColor colorWithPatternImage:image] UIColor to Core Data using NSKeyedArchiver

But doesn’t really apply to my situation. One of the custom classes is a custom colour class I have set up which creates a hex dex string out of RGB values, I went and added encoding that one, and I tested saving a colour object after adding the encoding protocol to it, and it works fine. But still get same error when I try to encode the dictionary. Do I have to go through every single custom object that that dictionary contains and add the encoding protocol to each one? I have quite a large number of custom objects, so this would be quite a time consuming task. Also I don’t get why I am getting the colour error for trying to archive a dictionary.

Is there a better way to save a custom object? I find the encoding method to be rather annoying way to save custom objects. Is there any better or quicker way of achieving this?

Thanks in advance

  • 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-06-16T03:39:32+00:00Added an answer on June 16, 2026 at 3:39 am

    Do I have to go through every single custom object that that dictionary contains and add the encoding protocol to each one?

    Most definately, yes!

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

Sidebar

Related Questions

I have an NSOperationQueue to which i have added my custom class's objects(inherits from
I have a List of custom object, which consist of a custom list. class
I have a custom LogEntry class - ErrorEntry which derives from LogEntry. It has
I have a custom object ExportType : public class ExportType{ protected String name; protected
I have a data object -- a custom class called Notification -- that exposes
I have a custom type, which is abstract. and will have some class to
I've made a custom binding class which inherits from Binding: public class MyBinding :
I have a custom class named Profile and a NSMutableArray which I add the
I have a requirement where i need to create the custom header which has
I have custom db class which extends MySQLi class MySQLi->query() method returns obejct with

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.