Masonry icon indicating copy to clipboard operation
Masonry copied to clipboard

19808 build warnings with new Xcode (11.0 (11A420a))

Open leechoohyoung opened this issue 5 years ago • 17 comments

New Issue Checklist

🚫 If this template is not filled out your issue will be closed with no comment. 🚫

  • [ v ] I have looked at the Documentation
  • [ v ] I have filled out this issue template.

Issue Info

Info Value
Platform ios
Platform Version 12.2 (16E227)
Masonry Version 1.1.0
Integration Method cocoapods

Issue Description

When I build my project with new Xcode (11.0 (11A420a)), generate too many build warnings like below...(real device and simulator)

ld: warning: instance method 'remakeConstraints:' in category from /.../MySomeObject.o conflicts with same method from another category ld: warning: instance method 'updateConstraints:' in category from /.../MySomeObject.o conflicts with same method from another category ld: warning: instance method 'makeConstraints:' in category from /.../MySomeObject.o conflicts with same method from another category ld: warning: instance method 'attribute' in category from /.../MySomeObject.o conflicts with same method from another category ld: warning: instance method 'safeAreaLayoutGuideRight' in category from /.../MySomeObject.o conflicts with same method from another category ld: warning: instance method 'safeAreaLayoutGuideLeft' in category from /.../MySomeObject.o conflicts with same method from another category ld: warning: instance method 'safeAreaLayoutGuideBottom' in category from /.../MySomeObject.o conflicts with same method from another category ld: warning: instance method 'safeAreaLayoutGuideTop' in category from /.../MySomeObject.o conflicts with same method from another category ld: warning: instance method 'centerYWithinMargins' in category from /.../MySomeObject.o conflicts with same method from another category ld: warning: instance method 'centerXWithinMargins' in category from /.../MySomeObject.o conflicts with same method from another category ld: warning: instance method 'trailingMargin' in category from /.../MySomeObject.o conflicts with same method from another category ld: warning: instance method 'leadingMargin' in category from /.../MySomeObject.o conflicts with same method from another category ld: warning: instance method 'bottomMargin' in category from /.../MySomeObject.o conflicts with same method from another category ld: warning: instance method 'topMargin' in category from /.../MySomeObject.o conflicts with same method from another category ld: warning: instance method 'rightMargin' in category from /.../MySomeObject.o conflicts with same method from another category ld: warning: instance method 'leftMargin' in category from /.../MySomeObject.o conflicts with same method from another category ld: warning: instance method 'lastBaseline' in category from /.../MySomeObject.o conflicts with same method from another category ld: warning: instance method 'firstBaseline' in category from /.../MySomeObject.o conflicts with same method from another category ld: warning: instance method 'baseline' in category from /.../MySomeObject.o conflicts with same method from another category ld: warning: instance method 'centerY' in category from /.../MySomeObject.o conflicts with same method from another category ld: warning: instance method 'centerX' in category from /.../MySomeObject.o conflicts with same method from another category ld: warning: instance method 'height' in category from /.../MySomeObject.o conflicts with same method from another category ld: warning: instance method 'width' in category from /.../MySomeObject.o conflicts with same method from another category ld: warning: instance method 'trailing' in category from /.../MySomeObject.o conflicts with same method from another category ld: warning: instance method 'leading' in category from /.../MySomeObject.o conflicts with same method from another category ld: warning: instance method 'right' in category from /.../MySomeObject.o conflicts with same method from another category ld: warning: instance method 'bottom' in category from /.../MySomeObject.o conflicts with same method from another category ld: warning: instance method 'left' in category from /.../MySomeObject.o conflicts with same method from another category ld: warning: instance method 'top' in category from /.../MySomeObject.o conflicts with same method from another category ld: warning: instance method 'remakeConstraints:' in category from /.../MySomeObject.o conflicts with same method from another category ld: warning: instance method 'updateConstraints:' in category from /.../MySomeObject.o conflicts with same method from another category ld: warning: instance method 'makeConstraints:' in category from /.../MySomeObject.o conflicts with same method from another category ld: warning: instance method 'attribute' in category from /.../MySomeObject.o conflicts with same method from another category

...19808 warnings!!!

Please check this out

leechoohyoung avatar Sep 23 '19 09:09 leechoohyoung

I have the same problem

ZombieMK avatar Sep 25 '19 10:09 ZombieMK

ok, so far, I found a little hint. Changing build type of workspace(new build system to legacy build system), xcode reported 230 build warnings.

leechoohyoung avatar Sep 25 '19 11:09 leechoohyoung

Yes, same for me... Not a fix per se, but a start :)

ZombieMK avatar Sep 25 '19 11:09 ZombieMK

i have the same problem with 2w+ warnings😁

frank-du avatar Sep 25 '19 12:09 frank-du

I have the same problem , too;

meloanyang avatar Sep 27 '19 01:09 meloanyang

Same here

babucha avatar Sep 30 '19 18:09 babucha

Same here

terence612 avatar Oct 04 '19 08:10 terence612

Same here +1

Jimmygio avatar Oct 04 '19 08:10 Jimmygio

I find a solution.

The problem is happen in "View+MASShorthandAdditions.h" and "NSArray+MASShorthandAdditions.h" exist "@implementation" code.

So I create "View+MASShorthandAdditions.m" and "NSArray+MASShorthandAdditions.m" by myself, and move "@implementation" code to the two .m files, then the compare warning is down!

Jimmygio avatar Oct 07 '19 11:10 Jimmygio

I find a solution.

The problem is happen in "View+MASShorthandAdditions.h" and "NSArray+MASShorthandAdditions.h" exist "@implementation" code.

So I create "View+MASShorthandAdditions.m" and "NSArray+MASShorthandAdditions.m" by myself, and move "@implementation" code to the two .m files, then the compare warning is down!

Worked.

frank-du avatar Oct 10 '19 02:10 frank-du

Thank you @Jimmygio! Made a branch with the fixes for anyone else still moving off Masonry.

warpling avatar Oct 19 '19 11:10 warpling

me too

songwentong avatar Nov 15 '19 12:11 songwentong

@warpling thank you !

songwentong avatar Nov 19 '19 08:11 songwentong

same problem

vbonluk avatar Nov 27 '19 08:11 vbonluk

o .m

Only the @implementation code or all the lines below it as well? Quite new to Xcode.

JackyGohSG avatar Feb 20 '20 19:02 JackyGohSG

o .m

Only the @implementation code or all the lines below it as well? Quite new to Xcode.

Nvm just saw warpling commit and understand it better. Cheers

JackyGohSG avatar Feb 20 '20 19:02 JackyGohSG

I find a solution. The problem is happen in "View+MASShorthandAdditions.h" and "NSArray+MASShorthandAdditions.h" exist "@implementation" code. So I create "View+MASShorthandAdditions.m" and "NSArray+MASShorthandAdditions.m" by myself, and move "@implementation" code to the two .m files, then the compare warning is down!

Worked.

thank you very much!

zhenghongfeng avatar Apr 19 '20 11:04 zhenghongfeng