Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I add Images.xcassets my project? #46

Open
aybarsyalcin opened this issue May 12, 2015 · 1 comment
Open

How can I add Images.xcassets my project? #46

aybarsyalcin opened this issue May 12, 2015 · 1 comment

Comments

@aybarsyalcin
Copy link

Hi, I have been trying add Images.xcassets of my project. But I can not found solution. Which method I use it. Please help

Thanks...

@jasperblues
Copy link
Member

It looks like we need to modify XcodeSourceFileType to include a new type 'AssetCatalog' and then add to the following:

static NSDictionary* NSDictionaryWithXCFileReferenceTypes()
{
    static NSDictionary* dictionary;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^
    {
        dictionary = @{
            @"sourcecode.c.h"        : @(SourceCodeHeader),
            @"sourcecode.c.objc"     : @(SourceCodeObjC),
            @"wrapper.framework"     : @(Framework),
            @"text.plist.strings"    : @(PropertyList),
            @"sourcecode.cpp.objcpp" : @(SourceCodeObjCPlusPlus),
            @"sourcecode.cpp.cpp"    : @(SourceCodeCPlusPlus),
            @"file.xib"              : @(XibFile),
            @"image.png"             : @(ImageResourcePNG),
            @"wrapper.cfbundle"      : @(Bundle),
            @"archive.ar"            : @(Archive),
            @"text.html"             : @(HTML),
            @"text"                  : @(TEXT),
            @"wrapper.pb-project"    : @(XcodeProject),
            @"folder"                : @(Folder)
        };
    });

    return dictionary;
}

so that it maps the new type to "folder.assetcatalog"

Having done this, we'd be able to follow the same process as adding an image, but specify the type as AssetCatalog instead.

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

No branches or pull requests

2 participants