I'm trying to figure out what .playground file really is. If it's a source file, it cannot (as far as I've tried) be seen by other swift files in the project, nor other .playground files or vice versa.
Is a project supposed to have one such file? Are they a kind of swift file?
I know what it (.playground file) does, I just can't figure out how it fits in the project.
A .playground file is actually a bundle directory, which can be verified by right clicking it and selecting "Show Package Contents".
It includes a .swift file for the actual source code, which can be edited normally , as well as a .xcplayground file and a .xctimeline file, which are opaque and can't be edited through normal means.
You can also add files to it, such as images and other resources to use inside your playground.
It's not necessary to be present in application projects. It's used solely as a place to explore, without the need to create a project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With