简体   繁体   中英

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.

在此输入图像描述

**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

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.

在此输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM