• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: "Use of unresolved identifier" when using a framework which Xcode can see
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "Use of unresolved identifier" when using a framework which Xcode can see


  • Subject: Re: "Use of unresolved identifier" when using a framework which Xcode can see
  • From: Quincey Morris <email@hidden>
  • Date: Mon, 31 Aug 2015 03:40:24 +0000

On Aug 30, 2015, at 18:53 , Alex Hall <email@hidden> wrote:

The Readme states that I just add the Swifter.xcodeproj file to my project, add SwifteriOS or SwifterMac to the frameworks section of my project's build phases, and that's it. I've done both, but no matter what I try, as soon as I create a new instance of Swifter, I see "use of unresolved identifier Swifter" appear and the project fails to build.

I dunno, but the readme instructions are a bit out of sync with the current state of play with Xcode. It’s no longer necessary (at least in simple cases) to mess with the build phases directly, nor with target dependences.

Instead, select the app’s project item in the navigator, and display the General tab. Near the bottom, add the framework product to the Embedded Binaries list (I’m assuming you want the framework in your app bundle). I think this will automatically add to the Linked Frameworks and Libraries list, too, but if not you can do that manually. (It’s no longer necessary, supposedly, to do this second part at all if your app has ‘import’ statements naming the Framework, provided modules are enable in build settings, but it doesn’t do any harm.)

The next thing I would do is switch to the scheme for the framework, up in the toolbar, and build the framework, to make sure it builds without error. This also makes sure that the framework module actually exists — your original error may be that it’s never been built, so Xcode can’t find it to build the app. (Note that a target dependency wouldn’t help, if this is the problem, because Xcode can’t build your app, because it can’t compile the source file that imports your framework, because the framework module doesn’t exist yet, so I don’t think Xcode even gets as far as looking at dependencies.)

If all is well, you should be able to switch back to the app scheme and build the app. If that still doesn’t work, I’d suspect a build setting that has turned off modules, or something like that.

The really weird part is that, if I go to the line causing the error and press cmd-ctrl-j, the relevant class in Swifter opens right up; clearly, Xcode can see the framework, or it couldn't jump to the source like that.

Don’t read too much into this. Because you added Swifter.xcodeproj to your workspace, it’s been indexed, so it’s not implausible that you can navigate using the functions that depend on indexing. That probably doesn’t depend on what’s actually built, in any important way.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: "Use of unresolved identifier" when using a framework which Xcode can see
      • From: Alex Hall <email@hidden>
References: 
 >"Use of unresolved identifier" when using a framework which Xcode can see (From: Alex Hall <email@hidden>)

  • Prev by Date: Re: "Use of unresolved identifier" when using a framework which Xcode can see
  • Next by Date: Re: "Use of unresolved identifier" when using a framework which Xcode can see
  • Previous by thread: Re: "Use of unresolved identifier" when using a framework which Xcode can see
  • Next by thread: Re: "Use of unresolved identifier" when using a framework which Xcode can see
  • Index(es):
    • Date
    • Thread