UnTraDe
UnTraDe

Reputation: 3867

XCode framework/library development workflow

I'm new to OSX/iOS development and I'm developing a library project (Cocoa Touch Framework) for iOS. While working on the library I would like to test changes to the code, but because it's a library, I can't run it straight away from XCode and view it's output. What I'm used to do in other platforms, (Windows for example) is to create a another project under the same solution (Visual Studio), add the library to this project and write my test code there. Unfortunately I didn't find a way to do something similar in XCode, my workflow now consists of quitting/opening two different projects, copying frameworks around and re-adding framework dependencies.

Surely there must be a better way to do this...

Upvotes: 0

Views: 151

Answers (2)

Shobhakar Tiwari
Shobhakar Tiwari

Reputation: 7892

There are lots of post already in the SO .

But keeping it simple just follow these steps :

1.) Drag and drop Xcode project to your Xcode project 2.) go to build phase and then select your project (which u have imported ) to target. 3.) Search path - > user header search path (select your library) and also enter other linker flag.

Simple !

Upvotes: 2

Adrian Sluyters
Adrian Sluyters

Reputation: 2241

Is't exactly the same in Xcode :)

If you have a project (without a test build accompanying it) is:

1) See, no test Target :(

enter image description here

2) Click on the target that you want a test environment for (in my case, locates) so it's highlighted. 3) Click on the "edit" menu, then pop down to "Conver to" then "XCTest"

enter image description here

(yet another one of Apple's ambiguous places to hide things!)

Follow the wizard and that'll create you an XCTest build target that can be run on demand and through CI.

Have fun!

Upvotes: 0

Related Questions