János
János

Reputation: 35050

How to embed Cocoa Touch Framework in Xcode 7

I try to add a test framework to a text app in Xcode 7, but it fails.

ld: framework not found TestUtility clang: error: linker command failed with exit code 1 (use -v to see invocation)

Any idea what is going on? A have cleaned, removed subfolders in~/Library/Developer/Xcode/DerivedData.

I show some screen shot, but nothing special I have set. Here is an empty Cocoa Touch Framework built for iOS 9.

enter image description here

Here is the TestApp, set embedded as usual

enter image description here

And the error:

enter image description here

Upvotes: 0

Views: 889

Answers (1)

Axel
Axel

Reputation: 695

Follow these steps:

  1. Create your custom framework in Xcode. Close it.
  2. Create the project for your application. Close it.
  3. Create a workspace for your application. Make sure that your project is added. If not, choose "Add files..." then add your *.xcodeproj
  4. Add your custom framework to your workspace using the same way in step 3.
  5. In your workspace, click your application project and under the "TARGETS", choose your application project (scheme), expand the “Linked Frameworks and Libraries”
  6. Drag your *.framework found under the tree of your custom framework in your workspace to the location stated in step 5
  7. Enjoy! :)

Upvotes: 2

Related Questions