5

I'm having an issue with frameworks not being recognized:

enter image description here

For some reason the path for the frame work is set to Derived Data folder:

enter image description here

Is there anyway to change this to point the frameworks search the right folder?

Also, what kind of language is this and how would I go about changing the directory to the proper module (in the repo)?

enter image description here

Thank you for any insights you can provide, this is confusing for an amateur like me.

Cœur
  • 37,241
  • 25
  • 195
  • 267
TJBlack31
  • 745
  • 4
  • 8
  • 23
  • How did you add these frameworks? If you provide the steps you got to get there, someone may be able to point out where you went wrong. :) – George Dec 17 '18 at 23:42
  • 1
    @George_E Thank you for reaching out. I actually adopted this project. These are relatively old frameworks. These worked in 3.2, but now that I'm in the process of safely converting to Swift 4.2, these issues are popping up. – TJBlack31 Dec 17 '18 at 23:48
  • So were the frameworks already in the project, and then you’re just converting the code? Or are you also updating the frameworks (maybe through `pod install`)? – George Dec 17 '18 at 23:57
  • I'm doing both. Some frameworks like TelerikUI have to be downloaded and then installed. TelerikUI is only supporting Xamarin at this point, so I'm having to upgrade and old library myself to swift 4.2 which seems to work. I'll just add them to the repo. But still, I don't know why those red frameworks are there. – TJBlack31 Dec 18 '18 at 00:00
  • I’m not too sure either – George Dec 18 '18 at 07:29

1 Answers1

4

Is there anyway to change this to point the frameworks search the right folder?

Yes, and you seem to have found the Framework Search Paths setting in the project already. Change that setting to include your frameworks folder and Xcode should start seeing your frameworks.

Also, what kind of language is this and how would I go about changing the directory to the proper module

It's not a language at all, its just a list. When you double-click in the right-hand column of the setting, as you've done in the image above, a view opens that lets you edit the list. It's not shown in your image, but at the bottom of that view there are + and - buttons — click the + and you'll add another item to the list. You can add your folder there.

The $DEVELOPER_FRAMEWORKS_DIR item that you see in the list is just the value of the DEVELOPER_FRAMEWORKS_DIR project variable. Each of the settings in the build settings have a corresponding variable that the setting changes — the variable for each setting is listed in the Quick Help panel for that setting. The $(inherited) is a sort of macro within the Xcode build system — it specifies the values that have been inherited for that build setting from other settings levels. See What is $(inherited) in Xcode's search path settings? for more information about inherited.

You shouldn't add an absolute path to the Framework Search Paths setting, e.g. one that starts with /Users/yourname/Library/... because then the project will only build on your machine. Instead, you should specify the path relative to some point in the project, and the various environment variables in Xcode can help. If you want to specify a folder called Frameworks at the top level of the project directory, for example, you could add an item to Framework Search Paths that says $PROJECT_DIR/Frameworks. You can find a list of project variables here: How do I print a list of "Build Settings" in Xcode project?

Caleb
  • 124,013
  • 19
  • 183
  • 272
  • That's very helpful @Caleb. How can I find the relative search path in the project? For example in the above case? – alionthego Dec 06 '21 at 01:55