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

  • Home
  • SEARCH
  • 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 7079797
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:42:57+00:00 2026-05-28T06:42:57+00:00

I have a project with two targets, let’s say appA and appB . Both

  • 0

I have a project with two targets, let’s say appA and appB.

Both targets share code of main view controller (appViewController) except the .xib files.

I also have two sets of png’s each for one target.

My file/project structure looks like:

*common* (members of both targets):
    appViewController.h
    appViewController.m

*appA* (members of target appA):
    appViewController.xib
    set of png files

*appB* (members of target appB):
    appViewController.xib
    set of png files

PNG’s in both sets have the same names but they are placed in separate folders/groups and one group is member of one target and the other of the other target (same with appViewController.xib)

Everything works fine except when i try to edit .xib files in IB – it seemes to
get confused and show partly images from one target and partly from the other.

Since .xib’s are somewhat complex (>40 images) editing one with partly wrong images is
almost impossible – images have to be properly placed on one background image (background image is also different for appA and appB).

The problem exists only at edit-time (in IB). After compilation all the images in
both targets are correct.

I found one quick & dirty solution to this. Before i start editing one .xib
i remove references to the other set of png’s. That way IB shows correct images
for the .xib i’m editing. I simply import back all the references (png’s of the other
target) when i’m done.

I found a similiar question which was not really answered.

I wonder, does anyone have a cleaner solution to this? There has to be a better way to do it.

  • 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-28T06:42:58+00:00Added an answer on May 28, 2026 at 6:42 am

    No answers so far…

    So let me answer my own question (still hoping for a better answer).

    When you want to edit .xib of one target, you remove the references
    of the other targets’ resources (pngs).

    Then you quit xcode and open your project again. The pngs will be
    the right ones (since xcode doesn’t hold references to the wrong ones
    at the moment).

    When you’re done – reimport deleted references (take care that you
    check the right ‘target membership’).

    Edit: This seems to be a known issue with IB – XCode. Till they resolve it we’ll just have to use workaround mentioned above.

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

Sidebar

Related Questions

I have a c++ project in eclipse and two targets in Makefile, say t1
I have a project that generates applications for two targets. One of the targets
I have a project consisting of two files, main.c and logoff.c. When I try
I have a project that uses two third party libraries, both of which make
I have an Xcode project with four targets. Two of them are called Unit
I have an iPhone project (Xcode, Objective C++) with two targets - A and
I have a project with two different versions. I keep two targets in xcode
I have a project with two targets, one is a Cocoa Static Library, the
I have a project with two targets - one is for iPhone and the
I have made two targets in my project. One for a Staging version and

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.