سؤال

I am using the DropboxSDK.framework in a project of mine. I have everything setup and working fine. However, every time I quite Xcode and open it again at a later point I get the error below:enter image description here

Which is weird because I can see that the framework is in the project and nothing (that I know of) has changed since the last time I had the project open and working.

The way I make the error go away is to:

  1. Right click on the DropboxSDK.framework in my project --> Delete --> Remove Reference.
  2. In my project's Build Settings under Search Paths I remove the path that is under Framework Search Paths (the highlighted selection in the image below).
  3. Then I clean my project SHIFT + CMD + K
  4. Lastly, I click File --> Add files to my project, navigate to the DropboxSDK.framework file which I previously removed reference to and add it back to my project.
  5. Then I build my project again and the error goes away and will remain gone until I quite Xcode and open it again.

Has anyone else ever encountered this happening and fixed it?

Or have any suggestions I could try to fix it? I'm using Xcode V5.1.1

Let me know if there's anything I can clarify. Thank you!

هل كانت مفيدة؟

المحلول 2

I had a random thought sparked by Indrajeet's answer that solved my problem.

When a new project is created in Xcode a project folder is created. In that folder there is another folder with the same name as your project, a .xcodeproj file with your project's name and a yourProjectNameTests folder.

Visually like this.

 Application_Name --> Application_Name
                      Application_Name.xcodeproj
                      Application_NameTests

When I was having the error I described above the DropboxSDK.framework and it's accompanying files were stored here in this folder: enter image description here

After removing all references to the DropboxSDK.framework in my project I decided to move the DropboxSDK.framwork and it's accompanying files one folder level up to the main Application_Name folder here: enter image description here

Once I did this, I clicked File --> Add files to my project, navigated to the DropboxSDK.framework file, now one folder level up and added it to my project.

After building no error was thrown. I restarted Xcode and tried again to make sure; still no error. Rebooted my computer to be truly sure... still no error!

نصائح أخرى

$(SRCROOT)/Application_Folder

  • Application_Folder is the name of the folder where your whole code other resources resides
  • Insert above line in Header Search Paths

I was having the sane problem and just found the answer by chance! It happens when you create your project name with SPACES between the letters. Somehow it makes XCode crazy when searching for the frameworks.

So if want to create a project called "This is My Project Name", call it "This_is_My_Project_Name" and the frameworks will be found every time. It worked with me.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top