IOS静态库产品一直是红色的
我已经为此苦苦挣扎了几天。当我在 XCode 4 中的 IOS 下创建一个新的静态库项目时,我遇到了一个问题。无论是否添加文件作为标头或进行编译,我都能够成功构建,但 .a 文件始终为红色。这种情况在调试和发布中都会发生。我读过类似的问题,但没有找到解决该问题的人。任何帮助将不胜感激。谢谢
I've been struggling with this for a few days now. When I create a new Static Library project under IOS in XCode 4 I am running into an issue. With or without adding files as headers or to be compiled I am able to successfully build but the .a file is always red. This happens in both Debug and Release. I've read about similar issues but haven't found someone who has fixed the problem. Any help would be appreciated. Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
XCode 在构建模拟器时似乎在这方面有一个错误。为设备构建一次,右键单击库以在查找器中显示,备份关卡,然后导航到模拟器关卡。你的图书馆就在那里。 (路径将如下所示:/Users/You/Library/Developer/Xcode/DerivedData/LibName-fylbqugtzucxyndtdddrjmbbdnet/Build/Products/Debug-iphonesimulator)
XCode seems to have a bug in this regard when building for the simulator. Build once for device, right-click the library to show in finder, back up a level, and navigate to the simulator one. Your library will be there. (The path will look something like this: /Users/You/Library/Developer/Xcode/DerivedData/LibName-fylbqugtzucxyndtdddrjmbbdnet/Build/Products/Debug-iphonesimulator)
我无法找出这个问题的答案,但我确实找到了解决方法。我安装了 XCode 4 项目模板来构建通用框架 https://github.com/kstenerud/iOS -通用框架。这使我能够构建一个适合我的需求的框架。
I wasn't able to figure out the answer to this problem but I did find a work around. I installed the XCode 4 project template to build universal frameworks from https://github.com/kstenerud/iOS-Universal-Framework. This allowed me to build a framework which fit my needs.