Skip to content
This repository was archived by the owner on Apr 13, 2022. It is now read-only.

Polaris.clr unusable in Swift #84

Closed
santosgagbegnon opened this issue Oct 17, 2019 · 2 comments · Fixed by #86
Closed

Polaris.clr unusable in Swift #84

santosgagbegnon opened this issue Oct 17, 2019 · 2 comments · Fixed by #86
Assignees

Comments

@santosgagbegnon
Copy link

Issue:

The Polaris.clr file created produces errors when trying to load it in Swift. The file can be found here.

What I've Noticed:

When initializing a NSColorList (the object that represents .clr files in Swift) using the Polaris.clr, I get this error:

 Failed to initialize color list unarchiver: Error Domain=NSCocoaErrorDomain Code=4864

The interesting thing is that re saving the file using the NSColorListobject and using that instead fixes this issue.

More Info:

I am also able to format the re saved Polaris.clr into XML1 format using mac's built in terminal command:
plutil -convert xml1 /path/to/polaris.clr
however when I use the Polaris.clr in this repo, I get the following error:

 Property List error: Unexpected character  at line 1 / JSON error: JSON text did not start with array or object and option to allow fragments not set.
@santosgagbegnon santosgagbegnon changed the title Generated Polaris.clr File Polaris.clr unusable in Swift Oct 17, 2019
@kaelig kaelig self-assigned this Oct 17, 2019
@kaelig
Copy link
Contributor

kaelig commented Oct 17, 2019

It seems like Polaris.clr is currently importable by macOS's palette manager, but isn't readable via Swift.

I'm looking for a solution!

@kaelig
Copy link
Contributor

kaelig commented Oct 25, 2019

Closing as we're going to avoid using clr files to import colors in Swift.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants