How to add an existing framework in Xcode 5

2020-01-28 03:02发布

问题:

I'm trying to add the AdColony.h frameWork after downloading it, but I can't find it in Xcode 5. I was able to do it in the last version, but can't find it in this one.

回答1:

Click on your project in the Project Navigator on the left side. In General go to "Linked Frameworks and Libraries". Click on the + button

and click on "Add Other" and then add the framework you have downloaded.



回答2:

Strange. I was just doing the same thing in XCode 5.0.2 and I had to click on the Project, select the *Tests Target, then select not the General tab but actually the Build Phases tab to see "Link Binary With Libraries" where I was able to add the framework.



回答3:

Follow this screen shots

Run and Go



回答4:

Actually, I use Xcode 6.4, and I happen to be confronted with the same problem. I tried many ways suggested by others while none worked.(no button named General as others said) Here comes my solution.

  • Select your project in the project navigator
  • Click 'Build Phases' tab
  • Open 'Link Binaries With Libraries' expander
  • Click button '+' to add items

step 1-4

  • Search and choose the frameworks you need, for example, I choose 'OpenGL.framework', and click the button 'Add'

  • Finally, you can see the frameworks you choose in the window


回答5:

Adding it in "Linked Frameworks and Libraries" as other answer discribe did not work for me in xcode 6.4.

However drag and drop it into Frameworks folder (Project Navigator) and creating a reference did worked.