XCode 6 Framework问题:模块[framework]没有名为[class]的成员 [英] XCode 6 Framework issue: Module [framework] has no member named [class]

查看:110
本文介绍了XCode 6 Framework问题:模块[framework]没有名为[class]的成员的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经构建了一个自定义框架,并将其放入包含使用Xcode 6编写的应用程序的工作空间中.当我尝试实例化属于该框架的类时,遇到错误,读取模块'Framework'没有成员命名为单位":

I have built a custom framework that I have pulled into a workspace containing an application I am writing using Xcode 6. I am getting an error when I try to instantiate a class belonging to the framework reading Module 'Framework' has no member named 'Unit':

我确保将应用程序目标链接到框架创建的库:

I have made sure to link the application target to the library created by the framework:

这是Unit类的屏幕截图:

Here is a screenshot of the Unit class:

我不知道我在做什么错.我看不到其他任何遇到过此问题的人.我将永远感谢任何可以帮助我解决此问题的人.预先感谢您的帮助.

I have no idea what I'm doing wrong. I don't see anyone else that has experienced this issue. I would be forever indebted to anyone that could help me troubleshoot this issue. Thank you in advance for your help.

推荐答案

我现在感觉很傻.我认为默认访问级别对于我的Framework中定义的所有内容都是公共的.通过将类和初始化程序公开,可以解决此问题.

I feel very dumb right now. I thought that the default access level was public for everything defined in my Framework. I was able to fix this issue by making the class and the initializer public.

这篇关于XCode 6 Framework问题:模块[framework]没有名为[class]的成员的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆