简体   繁体   English

Xcode 项目找不到要导入的.framework 类

[英]Xcode Project can not find .framework classes to import

I am working on a project, that reads the bank cards.我正在做一个读取银行卡的项目。 The card reader company provided a .framework SDK but does not provide any technical support.读卡器公司提供了.framework SDK 但不提供任何技术支持。

I search on Google and find out how to add .framework into the project.我在 Google 上搜索并了解如何将.framework添加到项目中。 I followed the following steps.我按照以下步骤操作。

  1. Drag and drop the framework file into the project folder.将框架文件拖放到项目文件夹中。
  2. Adding the framework into Build Setting -> Link Binary With Liberaries.将框架添加到 Build Setting -> Link Binary With Liberaries。
  3. Adding the Framework Search Path into Build Settings.将框架搜索路径添加到构建设置中。

After cleaning the project and rebuild still the framework classes are unknown to my project.清理项目并重建后,我的项目仍然不知道框架类。

Do I miss something?我错过了什么吗? or I am going on the wrong way.或者我走错路了。

My project is on Swift and the framework is on Objective-C.我的项目在 Swift 上,框架在 Objective-C 上。

You need use bridge header and there you need to import your Objective C framework.您需要使用桥 header 并且您需要导入您的目标 C 框架。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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