Multiple Targets and supposedly duplicate files

I have a new project with 3 targets.
each target has its own (and each is set to its own target)

when I compile for iOS I get these errors

LaserLab Project Group
Error Group
Multiple commands produce '/Users/davidsisemore/Library/Developer/Xcode/DerivedData/LaserLab-gsmzaztmbgbkfzcrthqfbicagghq/Build/Products/Debug-iphonesimulator/':
1) Target 'LaserLabIOS' (project 'LaserLab') has copy command from '/Volumes/Drive #1/SWIFT-Projects/LaserLab/LaserLabIOS/Info.plist' to '/Users/davidsisemore/Library/Developer/Xcode/DerivedData/LaserLab-gsmzaztmbgbkfzcrthqfbicagghq/Build/Products/Debug-iphonesimulator/'
2) Target 'LaserLabIOS' (project 'LaserLab') has process command with output '/Users/davidsisemore/Library/Developer/Xcode/DerivedData/LaserLab-gsmzaztmbgbkfzcrthqfbicagghq/Build/Products/Debug-iphonesimulator/'

LaserLabIOS Group
Warning Group
/Volumes/Drive #1/SWIFT-Projects/LaserLab/LaserLab.xcodeproj The Copy Bundle Resources build phase contains this target's Info.plist file '/Volumes/Drive #1/SWIFT-Projects/LaserLab/LaserLabIOS/Info.plist'.
duplicate output

and a compile for macOS gives me

/Volumes/Drive #1/SWIFT-Projects/LaserLab/LaserLab.xcodeproj The Copy Bundle Resources build phase contains this target's Info.plist file '/Volumes/Drive #1/SWIFT-Projects/LaserLab/LaserLab/Info.plist'.

Notice that the paths SEEM to be correct

Answer (if you have a better one, please let me know)

  1. for each target, rename the info.plist to info_.plist
  2. In the build settings for each, change the Packaging -> Info.plist File to the name from step #1

This "seems" to work

Did you copy pasted stuff? Click on the Info.plist and check if there is any Target Membership set on the right hand side panel in Xcode. If it's set, then uncheck it. The Info.plist files are explicitly referenced through the build settings not through target membership.

I did set targets for each of them... THAT was the problem?

Yep. Again, the Info.plist file are referenced in the build settings. If you set it in the target membership it will try to include it multiple times which will likely cause your duplicate warning.

You can simply try it by creating a new project or just a new target, then set the target membership of the file and see what happens.

Thanks.... already got them renamed... so I'll leave it that way for now, but remember this for the future

Now if I can figure out why my iOS target loads its view in a stand alone, but not in the multiple target version

I don't understand this question.

I created a Viewcontroller... I did this in a stand alone iOS targeted project... everything worked
I copied the AppDelegate and ViewController into my multi-target project (set the targets on those two files). AppDelegate starts, the VC calls INIT, but never loads

Right now the process consists of just those two files for iOS

Btw. for your above workaround, where did your renamed the files? Directly from the finder or through Xcode?

If you did it through the finder, then Xcode just lost the reference to Info.plist as per target membership (which should result to the file name having red text) and then copies the Info_.plist through the reference in the build settings.

Just rename them back to Info.plist, update the build settings and make sure that target membership is unchecked. ;)

I renamed them in Xcode

I'm a bit rusty on the loading process as the newer API uses scenes, but the projects I work with are still having the deprecated API or in SwiftUI which doesn't have any AppDelegate at all. Maybe someone else can help you out with this.

Make sure your scene loads correctly.

Not using SwiftUI.... nor am I using Storyboards....
and like I said... the same Appdelegate and Viewcontroller DO work in a single target project

Solved... Copied the from the standalone to the multi-target and now it works
The multi-target had scene oriented stuff that wasn't needed....

I don't follow the standard conventions...
my projects are 100% code... I don't do IB nor do I do AL

Terms of Service

Privacy Policy

Cookie Policy