7

I'm trying to make a new framework to use in my other project. I know if it is red colour means can not find to the path of the file. But this not a file I created!

What I don't understand is why my new framework with pretty much nothing inside is always red colour. I even run test cases (default). I appreciate if anyone can help me to fix this:

enter image description here

Bernard
  • 3,880
  • 18
  • 49
  • 82
  • Select the Device option and build it again. It should work. Items listed under `Products` group are reference to device target files not for simulator – Gandalf Mar 03 '16 at 06:54
  • I already did that. That is why the other one is black! – Bernard Mar 03 '16 at 07:01
  • hmm, can you check in your scheme under _Build_ option if test target has tick mark against _Analyze_, _Test_ and _Run_ options. If this doesn't solve it then i am our of ideas. – Gandalf Mar 03 '16 at 07:32
  • @Gandalf Do you mean schema means my targets? Could you be more specific. I can't find it – Bernard Mar 03 '16 at 22:48

1 Answers1

8

No, Scheme(not schema) is different from Target. Check out this thread for better understanding Xcode: What is a target and scheme in plain language?

To solve your issue, click on the WSBandKit framework icon on top left section(adjacent to iPad2 simulator icon); and select editScheme option from drop down. You will be presented with a new screen with some option. Go to Build option and tick the option of Run for your test target. Close the screen and Build the framework for Device. Check the image for reference. Initially the Run option will be unchecked for test target that you have to check. enter image description here

Community
  • 1
  • 1
Gandalf
  • 2,164
  • 2
  • 13
  • 19
  • 1
    Checking the Run checkbox did not make the red .xctest file turn black. I have three projects. One produces the expected .xctest file (it is black). The other two do not. The one that does is a framework. The other two are applications. Might that possibly explain why XCTest cannot produce a test framework for those two projects? If so, is there any way to tell Xcode not to expect them? They don't seem to cause any actual problems. I can build and run the unit tests. – Tom Bogle Jan 26 '18 at 17:38