Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command CompileSwiftSources failed when exporting localizations in XCode #3

Closed
tomsun3 opened this issue Feb 17, 2022 · 3 comments · Fixed by #4
Closed

Command CompileSwiftSources failed when exporting localizations in XCode #3

tomsun3 opened this issue Feb 17, 2022 · 3 comments · Fixed by #4
Assignees
Labels
bug Something isn't working

Comments

@tomsun3
Copy link

tomsun3 commented Feb 17, 2022

Hi Peter,

It's me again.

When having your package added to my project, everything works out fine and also builds, but:

When I try to export localized resources (the new SwiftUI feature) via Product->Export Localizations... in Xcode, the project won't build and logs say "Command CompileSwiftSources failed". If I remove the PSActivityImageViewController dependency, everything works fine (when exporting). For my project in general I had to set Use compiler to Extract Swift Strings to YES in order to get this export process to work (the default value is NO). Maybe, there is some misconfiguration for your package? To be honest, I can't find it at the moment. Compiler complains about multiple issues in ActivityImageView.swift file. Errors like Cannot find View in scope in line 13. Could this belong to the #if canImport(SwiftUI) line? Really, I'm not sure.

Note/EDIT: The problem seems to be independent of the https://github.com/SwiftUI-Plus/ActivityView package because it builds (when exporting localizations as described above) without issues. Just when adding the PSActivityImageViewController package, I get problems as described. Hmm...

Thomas

@tomsun3 tomsun3 changed the title Command CompileSwiftSources failed Command CompileSwiftSources failed when exporting localizations in XCode Feb 17, 2022
@tomsun3
Copy link
Author

tomsun3 commented Feb 18, 2022

Hi Peter,

I figured out that seems to be a strange bug in XCode 13 when a package/library used sets its minimum to iOS 10. This can be read e.g. here or here

I fixed this strange issue by setting the minimum iOS version to 11 in the package definition file, as you can see in my fork.

I'm not quite sure about this issue yet, just doing my research. But maybe, and I think so, that also affects other users. Nevertheless, it works now using my fork.

Thomas

@psalzAppDev
Copy link
Owner

Hi Thomas,

thanks so much for figuring this out because I had no idea how to tackle this, could not even reproduce it. Feel free to merge your fix since I guess it's safe to raise the minimum target to iOS 11.

Cheers,
Peter

@psalzAppDev psalzAppDev self-assigned this Feb 18, 2022
@psalzAppDev psalzAppDev added the bug Something isn't working label Feb 18, 2022
@tomsun3
Copy link
Author

tomsun3 commented Feb 18, 2022

You are welcome. I will, thanks again for your great work as well!

Thomas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants