Xcode 10.2 gives scary warnings with Intents.strings files

After updating to Xcode 10.2 I'm getting a bunch of warnings like this:


Showing All Messages

:-1: ignoring build task 'ConstructedTask(forTarget: SoupKit, 3 inputs, 1 outputs, ruleInfo: ["CopyStringsFile", "/Users/username/Library/Developer/Xcode/DerivedData/SoupChef-rojbzdehurmlgakeaipmwucmevgx/Build/Products/Debug-iphoneos/SoupKit.framework/en.lproj/Intents.strings", "/Users/username/Downloads/SoupChefAcceleratingAppInteractionsWithShortcuts/Shared/en.lproj/Intents.strings"])' which produces files already produced by another task:

/Users/username/Library/Developer/Xcode/DerivedData/SoupChef-rojbzdehurmlgakeaipmwucmevgx/Build/Products/Debug-iphoneos/SoupKit.framework/en.lproj/Intents.strings

This warning represents an extremely serious project misconfiguration and will cause some build tasks in your project to be skipped entirely, leading to other build failures or missing files in the build directory. (in target 'SoupKit')


Now, I don't think this is actually a major issue, but the last line sure makes it seems like it's a very bad idea to just ignore this. After some experimenting I've determined this issue is very easy to reproduce:


1. Add an Intents.intentdefinition file to a project

2. Add any localization to that file

3. Set the deployment target to iOS 10.3 or earlier


If I set the deployment target to iOS 11, or remove all localizations from the Intents file, the warning goes away. Neither of these is an acceptable solution, but again, I also don't like ignoring the warning.


At this point, I'm trying to figure out the answers to any of these questions:


1. Whatever is going on here, my assumption is that the same thing was happening in Xcode 10.1, it just wasn't telling me about it. Meaning that going back to 10.1 until this is fixed would be no better than ignoring the error. Is that likely to be true?


2. The errors are only about strings files, and it seems like it's just replacing one copy of the file with the same file. Am I safe to ignore it, especially since I can just manually inspect the build to verify the files are there?


3. Is there anything else I might be able to do to solve the issue?


I've file rdar://49274887 on the this problem:

https://openradar.appspot.com/radar?id=5000918072295424

Accepted Reply

Looks like this has been fixed in Xcode 10.2.1. From the release notes:



Resolved Issues

Resolved an issue that would produce a spurious “ignoring build task” warning when building localized Siri Intents. (49649474)

Replies

I am getting the same thing and I was *not* getting these warnings in Xcode 10.1 or prior.


However, I am targeting iOS 12.0 and watchOS 5.0. Moving iOS to 12.1 or .2 or watchOS .1 or .2 does nothing. I too have localized my Intents file.


I verified that my app runs on both iOS and watchOS in both English and Spanish -- it does. But the message is still very scary in that it could be omitting files from my bundle. I've been at it since yesterday and I cannot figure out how to fix or even silence the warnings.


I'm more inclined to say it's just a bug on Apple's end but just to be sure, I too filed a radar yesterday night. Thanks for doing so as well. If they get back to me, I'll reply here.

I got a response from DTS on this. They did some testing and found that Xcode 10.2 is in fact skipping some build tasks, and files are missing from the output. So it is not safe to ignore this error. In their testing Xcode 10.1 did output the files correctly, which has been my experience as well.


If anyone else runs into this issue I’d recommend:

  • Filing your own bug report
  • Sticking with Xcode 10.1 for now

I'm seeing the same issue after upgrading to Xcode 10.2. Has anyone had further communication with DTS or found a workaround?


Would be good to know whether this warning should block a release or not, i.e. are the missing files critical, or were they never needed in the first place.

I definitely would not release a build that's giving you this warning. There's a good chance the file(s) mentionied in the warning will be missing. You could manually inspect the build to verify everything is there, but it seems safer to stick with Xcode 10.1 for now. Even then you may want to double-check nothing is missing from your build.


I was able to mostly work around the problem by setting my deployment target to iOS 11, but my watchOS app was still giving errors even if I set it to watchOS 5. The only other workaround I've found is to remove the localizations. So I plan to stick with Xcode 10.1 until the issue has been fixed an a new version of Xcode is available.


If you need to re-download Xcode 10.1 you can do that from here:

https://developer.apple.com/download/more/

Looks like this has been fixed in Xcode 10.2.1. From the release notes:



Resolved Issues

Resolved an issue that would produce a spurious “ignoring build task” warning when building localized Siri Intents. (49649474)

My own bug report (49274887) was marked as a duplicate of another (49248164) which is apparently still open. Before I read the release notes I assumed this had not been fixed!


That said, I've installed Xcode 10.2.1 and I am no longer seeing these warnings. I've also compared the build product and verified that all the files are there. So I'm confident this issue has been addressed and I've closed my bug report.


Very glad that I can use the latest Xcode and Swift 5 now!