ryangomba / slicer

Automatically export Sketch slices to an .xcassets bundle (2014)
49 stars 11 forks source link

Wrong Output Format for Xcode 6.1 #3

Open andresdouglas opened 9 years ago

andresdouglas commented 9 years ago

First off, thanks a lot for your blog post and this script, I'm hoping it's going to be a big time saver for some projects I'm working on.

Fairly new to Xcode 6.1, but it seems like for App Icons it's expecting a folder with the structure AppIcon.appiconset with a Contents.json listing all the images, whereas slice.py is outputting a folder named Slices with the Contents.json in each subfolder. Although Xcode is picking these up, it's throwing a compile error:

"[...]/Images.xcassets: None of the input catalogs contained a matching app icon set named "AppIcon".

Not sure if I'm missing something on the usage or need to configure xcode to treat one of these image sets as an AppIcon. Any pointers would be greatly appreciated. Happy to do some hacking on my end, but just wanted to make sure I wasn't miss-using the tool.

ryangomba commented 9 years ago

Yep, looks like the app icon is treated a bit differently by Xcode... It doesn't love the fact that all of Slicer's assets are outputted to a subdirectory called "Slices" (Xcode doesn't look there for AppIcon). I'd be willing to accept a PR that:

(a) special-cases anything named AppIcon (b) let's you define whether or not to output assets to a subdirectory (c) any elegant solution that you can think up

In the meantime, I think you just need to manually define the "App Icons Source" in the target to work around the issue.