3

I am stuck at a weird situation.I have a ViewController written in Swift.It is basically an intro screen ViewController.

Now I want to use it in Obj-C Code.But I am unable with an error of "Use of undeclared indentifier" when ever i try to create its object.

Following are the check points i have already followed:

  • import "homer_iOS-Swift.h" in my ViewController where homer_iOS is mine project(homer_iOS is mine target/Project name).

    target Name.

  • Cross checked the BuildSetting > Define Module to Yes for both Target and Project.

  • Cross check the BuildSetting > Objective C generated Interface Header >
    homer_iOS-Swift.h

  • @objc before mine Swift ViewController class.

Please dont just mark it as duplicate and move on as suggestions on same types questions are already tried out. Any Help will be appreciated.enter image description here

8
  • But IntroSwipeVC is a swift file.which is already added as IntroSwipeVC.swift Commented Apr 25, 2017 at 13:32
  • where did you add IntroSwipeVc ? Commented Apr 25, 2017 at 14:28
  • IntroSwipeVC.swift and IntroSwipeVC.xib were added in a group named Utils. IntroSwipeVC.swift started appearing in Build Phase > Compile Sources with file path Commented Apr 25, 2017 at 14:31
  • Xcode 8.3.x might be an improvement over this, but I've noticed that 8.2.x still shows these kinds of errors in Objective-C code (inability to find Swift symbols), but the project actually builds successfully. Have you tried to actually build your project to see if it's maybe just a UI glitch? Commented Apr 25, 2017 at 22:06
  • this is more likely to same issue stackoverflow.com/questions/43599970/… Commented Apr 26, 2017 at 2:17

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.