Asdrubal
Asdrubal

Reputation: 2481

Import my custom module/framework Xcode Swift

I want to import my custom module/framework in my Swift project on Xcode 7. I understand how to normally do it. But I don't want to keep dragging and dropping my framework and linking it every time I make a new project. I was thinking I could move the framework to folders in the iPhoneOS.sdk/../Frameworks folder and/or the iPhoneSimulator.sdk/../Frameworks folder. Without dragging or dropping my custom framework into the project, I can import module (with autocomplete). However I get an error "Could not build Objective-C module 'Tumblr'". Is there a Setting in Build Settings I am missing.

enter image description here

**The Tumblr module is a module I created.

I have also created a .tbd and module.map files for the framework existing in the iPhoneOS.sdk

Upvotes: 20

Views: 27014

Answers (1)

Ajwhiteway
Ajwhiteway

Reputation: 1006

Drag your module's x-code project into the left pane with all the files.

Then click on your main project file and go to general, scroll down to Embedded Binaries and add it through the menu there.

enter image description here

Upvotes: 25

Related Questions