Skip to content

Fix or silence Xcode 4.4+ artwork warning. #508

jwilling opened this Issue Sep 9, 2012 · 7 comments

5 participants

jwilling commented Sep 9, 2012

Although the setting itself really has nothing to pertain with CocoaPods, it's annoying to have the warning stick around. It's complaining about Combine High Resolution Artwork. Is it possible the Pods project template could be updated enable this new setting?


I solved this issue with the post_install hook for now, but it would be great to remove this warning at all.

post_install do |installer|
    installer.project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['COMBINE_HIDPI_IMAGES'] = 'YES'
CocoaPods member
alloy commented Sep 10, 2012

As we don’t have any images in the Pods.xcodeproj, this should never do any unexpected harm, so it sounds good to me.

CocoaPods member

Fixed by ff5ae63c in Xcodeproj.


Thanks! :sparkles:

patr1ck commented Apr 2, 2013

Is this really the appropriate fix? I just setup cocoapods on an OS X project was very confused when my .pngs disappeared from my app bundle and were replaced with .tiffs. (This breaks [NSImage imageNamed:@"foo.png"], of course.)

Is the fix just being a little over-eager by doing it for ALL targets/configs, instead of just the Pods one?

CocoaPods member

@patr1ck Xcode enables this setting in new projects (which is our gold standard for build settings) and presents the warning if not ennobled. I can sympathize with you for the issue that you described, however I think that in the end the best solution would be for you to omit the extension from the name of the image ([NSImage imageNamed:@"foo"]).

patr1ck commented Apr 3, 2013

@irrationalfab Interesting. I can confirm it does enable it by default on new projects (Maybe my project was created before this change?) but I don't see a warning when I disable it.

Omitting the image from the extension isn't really desirable as it adds ambiguity and the NSImage docs actually say it prefers the extension, so I've simply disabled the flag.

I agree with your reasoning so this, so I'm just going to keep it disabled for now and chalk this up to an edge case. Thanks for the follow up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.