I have compiled a custom Objective-C Framework which I will be referring to as Custom.framework. I'm having an issue with the files inside the framework when I try to build the project the framework is linked in.
Inside Custom.framework I have my main Header file called Custom.h and the following code is where the problem arises:
#import <Foundation/Foundation.h> // 'Foundation/Foundation.h' file not found
I have a recursive framework and library path set up to where my .framework file is located: /Users/macbook/Library/Developer/Xcode/**
My project and framework files are in /Users/macbook/Sites/
Also my framework appears in red text, but is recognized when I import it if that helps.
正如 Glenn Howes 在问题下的评论中所述,我需要将导入更改为 @import Foundation 而不是使用 #import 并在我的构建属性(我已经拥有)中打开启用模块(C 和 Objective-C)。
您是否在 Scheme --> Build Phases --> Link Binary With Libraries 中添加了 Foundation.framework?
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.