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

Fixes to catch Sketch API change and workaround CocoaScript bug #158

Merged
merged 3 commits into from
Nov 18, 2017
Merged

Fixes to catch Sketch API change and workaround CocoaScript bug #158

merged 3 commits into from
Nov 18, 2017

Conversation

MForever78
Copy link
Collaborator

@MForever78 MForever78 commented Oct 8, 2017

This PR contains two changes:

  1. [NSArray arrayWithObjects] stops working on 10.13. This is a bug caused by CocoaScript itself. Reference on: NSArray.arrayWithObjects and NSDictionary.dictionaryWithObjectsAndKeys not working in 10.13 ccgus/CocoaScript#48 . We can workaround this bug by using [NSArray arrayWithArray] instead.
  2. Sketch changed API on layer.style().fill(). It now called layer.style.fills() and returns an array of fill objects. We should just use the first element of this array and call the CSSAttributeString method.

Tested locally and is able to export.

Copy link

@banagale banagale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tested these changes by overwriting the files in the package from 10.22 and was able to now successfully export to zip, which closes this open issue: #155

@emfawcett
Copy link

Hi there

I would love to try this plug in but when export as zip no file is produced. I am running Sketch 47.1. Is there an updated plugin file for this at all? Many thanks - Emma

@MForever78 MForever78 merged commit 6f4e2a6 into tudou527:master Nov 18, 2017
MForever78 added a commit that referenced this pull request Nov 20, 2017
Fixes to catch Sketch API change and workaround CocoaScript bug
nailgilaziev added a commit to nailgilaziev/AppIconMultiplier that referenced this pull request Dec 5, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants