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…
2
Answers
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
If you are looking to get output from within a view, try using something along the lines of
let _ = print("your data here")