Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3853678
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T17:30:22+00:00 2026-05-19T17:30:22+00:00

I have written a static library to re-use some code between iOS projects, let’s

  • 0

I have written a static library to re-use some code between iOS projects, let’s call it MyLib.

While MyLib has good unit test coverage, it interacts heavily with external resources, and I’d like to make sure that it does the right then when it’s hooked up with other pieces of an actual application. In short, I would like to add an application test target to my static library in addition to the unit test target. No drama there.

In thinking about the general setup, I also wondered if it wouldn’t be a good idea to ensure that my library’s application test target linked against the actual libMyLib.a binary artifact, thereby putting that step of the process under test as well.

So two questions:

  1. Is this even necessary? Is there any significant risk that the final libMyLib.a binary product could behave differently than the series of compiled .m files that my unit tests already exercise? (Possible answer would be that it guards against the accidental exclusion of one of those .m files in the eventual build target).

  2. How would one make certain that the application test target was linking against libMyLib.a? Is this configurable within the build settings? Is any custom build scripting necessary?

I apologize in advance for the basic question if this is common knowledge, I’m slowly coming up to speed on build process, linking, etc. in general, not just how it is implemented using Apple’s SDKs.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T17:30:23+00:00Added an answer on May 19, 2026 at 5:30 pm

    This is actually accomplished fairly easily. In your static library’s project:

    (Assumes XCode 3)

    1. Create a new application target.
    2. “Get Info” on the application target to edit its properties.
    3. Click the “General” Tab at the top
    4. Click the “+” button under the “Direct Dependencies” pane, add your static library build target. This will build the static library BEFORE you build the new application target.
    5. Click the “+” button under the “Linked Libraries” pane, add libMyLib.a (or whatever your library is called)

    Your project should now link against the actual built artifact.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a static library written in C++ and I have a structure describing
I have written some code in my VB.NET application to send an HTML e-mail
I have written some code in C++ with a corresponding C interface (i.e C-function
I have writing Java code Using Jersey library to call Rest APIs. For my
I need to compile some mfc code that was written using Visual C++ 6.0
I have written a C library which consists in a few .h files and
I have following extension method written: static public IQueryable<OutboundPattern> ByClientID(this IQueryable<OutboundPattern> qry, int clientID)
I have written a sample program below. class Program { static int x =
I have written an AIR Application that downloads videos and documents from a server.
I have written a site in Prototype but want to switch to jQuery. Any

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.