NSLocalizedString not available in IntentsUI target

I'm trying to add a file that contains calls to NSLocalizedString to a Siri IntentsUI target, but I keep getting an error that NSLocalizedString is not available. This is confusing to me because I see that IntentsUI imports UIKit, which as far as I know then imports Foundation.

I was able to work around the issue by importing Foundation into the file I'm working with, but is that the right way to go about this? What's the best practice for adding localized strings to app extension targets?
Importing Foundation is the right way to go with this. Your extension needs to link to Foundation explicitly for those symbols to be discovered at runtime (beyond what you encountered at compile time), and an import statement is one way to make that happen.
NSLocalizedString not available in IntentsUI target
 
 
Q