Reference to ' ' is ambigous error in Xcode
Asked Answered
M

5

9

enter image description hereI was working with a custom iOS framework project in Xcode.There I am getting a lot of errors mentioning "Reference to ' ' is ambigous".I am attaching the screenshot of errors.Please help me correcting this.

enter image description here

Main answered 3/7, 2015 at 5:53 Comment(5)
It looks like you forgot to mention any ";" or "," in the code line. or i can't debug that's why it looks like problem with if(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) line.Kiri
Duplicate of #25378974Flick
Click on the disclosure next to the error (in the Error navigator on the left). Make the navigator wide enough to show the full messages after you do. Post a screenshot of those messages.Seligman
@robmayoff:Yes please check the screen shotMain
Actually when I build this in latest iOS 8 sdks I am not getting any error.It is showing problems in sdks 6.1 and other lower versions.But I want to run this in sdks 6.1 itselfMain
M
1

Actually This error was cleared when I shift from iOS SDK 6.1 to 7.1(or any version higher that 6.1)

Main answered 10/7, 2015 at 5:0 Comment(1)
i am having same ios SDK. and i import UIKit and CoreGraphicsframework the error is shown CGRectMinXEdge is ambiguous in MMDrawer class. what can i do?Econah
C
1

Adding more information to Jason's answer.

The error message makes me think you have two declarations of the same library functions. All of those references are from UIKit

mostly this can be occurring because of the header files. As you can see all the errors indicates that it is quoting the enum values. Enum values will always be in the .h files. Normally the reference headers(.h files) will be present inside the frameworks. It is a common mistake that sometimes these header files will be buried some where in our code by any third party frameworks. So kindly check your third party libraries.

I did face this issue once and after searching everywhere i could not able to find the solution. The only thing solved my issue was

Opening a fresh project and importing my files into that project. Actually it really took me less than 10 minutes to move to a new project and immediately my xcode was happy. This is definitely worth a try.

Centralism answered 6/7, 2015 at 5:40 Comment(1)
Why is this bug and your solution related to namespaces?Bahner
M
1

Actually This error was cleared when I shift from iOS SDK 6.1 to 7.1(or any version higher that 6.1)

Main answered 10/7, 2015 at 5:0 Comment(1)
i am having same ios SDK. and i import UIKit and CoreGraphicsframework the error is shown CGRectMinXEdge is ambiguous in MMDrawer class. what can i do?Econah
F
0

The error message makes me think you have two declarations of the same library functions. All of those references are from UIKit. Check to make sure only one version of UIKit is referenced in your project (check the frameworks), and make sure any libraries you have included are linking the same UIKit version as the rest of the app.

Steps to fix from here:

  • Clean the project
  • Delete everything inside '~/Library/Developer/Xcode/DerivedData/ModuleCache/' (the button inside the organizer window did not work for me)
  • Clean once more
  • Build project

from here: Reference to 'X' is ambiguous

Flick answered 6/7, 2015 at 4:42 Comment(0)
A
0

Clean your project and rebuild again.If it don't work then create a new project

Airtoair answered 7/7, 2015 at 4:5 Comment(0)
V
-3

Set value of Enable Module (C and objective-c) to No

enter image description here

Vories answered 20/1, 2017 at 13:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.