IOS Static Library Product is always red

2019-03-24 02:26发布

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

2条回答
神经病院院长
2楼-- · 2019-03-24 03:09

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.

查看更多
Fickle 薄情
3楼-- · 2019-03-24 03:11

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-fylbqugtzucxyndtffffdrjmbbdnet/Build/Products/Debug-iphonesimulator)

查看更多
登录 后发表回答