Fix or silence Xcode 4.4+ artwork warning. #508

Closed
jwilling opened this Issue Sep 9, 2012 · 7 comments

Comments

Projects
None yet
5 participants
@jwilling

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?

@lukaskubanek

This comment has been minimized.

Show comment
Hide comment
@lukaskubanek

lukaskubanek Sep 9, 2012

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'
        end
    end
end

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'
        end
    end
end
@alloy

This comment has been minimized.

Show comment
Hide comment
@alloy

alloy Sep 10, 2012

Member

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

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.

@fabiopelosin

This comment has been minimized.

Show comment
Hide comment
@fabiopelosin

fabiopelosin Sep 10, 2012

Member

Fixed by ff5ae63c in Xcodeproj.

Member

fabiopelosin commented Sep 10, 2012

Fixed by ff5ae63c in Xcodeproj.

@jwilling

This comment has been minimized.

Show comment
Hide comment
@jwilling

jwilling Sep 10, 2012

Thanks!

Thanks!

@patr1ck

This comment has been minimized.

Show comment
Hide comment
@patr1ck

patr1ck 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?

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?

@fabiopelosin

This comment has been minimized.

Show comment
Hide comment
@fabiopelosin

fabiopelosin Apr 3, 2013

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"]).

Member

fabiopelosin commented Apr 3, 2013

@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

This comment has been minimized.

Show comment
Hide comment
@patr1ck

patr1ck 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!

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!

jzapater pushed a commit to jzapater/CocoaPods that referenced this issue Sep 17, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment