Search code examples
swiftxcodeswift-package-manager

How to print out console in Swift Package Manager project xcode


I'm creating a SPM project and I need to check if the data I get from an API is correct. How can I print out this data?

I tried to create a view inside the SPM and adding it to an App project and it works, but it doesn't exist an easier alternative?

Console doesn't show anything, no print no logs...

image with code


Solution

  • I solved the problem. I still have to add the package to an app project to use the console and debugger.

    But my problem was not calling the function inside @main struct app. Now it displays prints and it's all OK.

    Thank you all