我创建了一个Swift框架,并使用Carthage将该框架集成到了我的项目中。 Carthage github页面上提到的所有必要步骤均已完成。
当我在我的主项目代码中使用框架类时,Xcode会在编辑器(边缘处的红色惊叹号)中引发任何框架类型的错误 - 使用未声明类型....但是,项目本身编译得很好,并且与框架功能。 另一个相关问题可能是我没有得到任何关于我的框架代码的自动完成建议。 框架类,结构等被标记为必要的。
我在这里错过了什么步骤 - 我需要做什么以便Xcode不显示这些错误?
框架代码使用Swift 2.3编写在Xcode 8上,主要项目使用Swift 2.3在Xcode 7.3.1上管理
I have created a Swift framework and I have integrated that framework into my project using Carthage. All the necessary steps mentioned on the Carthage github page have been completed.
When I use the framework classes in my main project code, Xcode throws up errors in the editor (red exclamations in the margin) for any framework type - Use of undeclared type .... However the project itself compiles fine and works perfectly with the framework functionality. Another related issue might be that I do not get any autocomplete suggestions for my framework code. The framework classes, structs etc have been marked public as necessary.
What step am I missing here - what do I need to do so that Xcode does not show those errors?
The framework code is written on Xcode 8 with Swift 2.3, the main project is being managed on Xcode 7.3.1 with Swift 2.3
最满意答案
Xcode 7.3.1仅支持Swift 2.2。 请将您的项目升级到Xcode 8中的Swift 2.3
Xcode 7.3.1 supported only till Swift 2.2. Please upgrade your project to Swift 2.3 in Xcode 8
更多推荐
发布评论