Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
416 views
in Technique[技术] by (71.8m points)

ios - How to disable no inverse relationship warning for CoreData in Xcode 4.2?

There was a MOMC_NO_INVERSE_RELATIONSHIP_WARNINGS setting on Xcode 3 but I cannot find it in Xcode 4.2 and trying to set it as a user defined build setting have no effect.

I know why I should use inverse relationship but I just don't want it for various reasons.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

In XCode 5, 6 and 7, you can still set the variable.

  1. Navigate to Build Settings

    A. Select your project on the left side bar under Project Navigator.

    B. Select the "Build Settings" tab.

  2. Find and set MOMC_NO_INVERSE_RELATIONSHIP_WARNINGS

    A. Select 'All' in the upper left of the main screen.

    B. Search for MOMC_NO_INVERSE_RELATIONSHIP_WARNINGS by pasting the key into the search bar.

    C. Change value to YES.

Build again and the warnings are gone.

****EDIT****

Thanks @RajTandel for the comment. If you still see the warnings, restart Xcode and the warnings should go away.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...