Xcode Playgrounds Shared Directory Not Working
That's the path that iOS playground use. If you make a macOS playground it will have the path ~/Documents/Shared Playground Data
Xcode playgrounds can't access swift files in Sources folder
You have to add public access attribute to your classes, methods and properties in source folder to make them accessible from main playground file as they treated as separate module by compiler
Unable to create folders in Xcode Playgrounds?
Although I don't know the reason why the folder disappeared or why you need the folder, I have a simple method to recover the fold sign (little arrow) back for an empty folder.
For example, if you change the name to "hello" and the little arrow disappeared. Just add a " 2" after the "hello" to from the "hello 2". Then close the playground.
When coming back, the little arrow appears.
Now you may remove the " 2" to get the real name "hello". Reopen again, and you have the folder "hello".
This is only applicable to an empty folder. If you have files in the folder, you have to use the original name to get the little triangle sign back.
Actually you may create a new empty folder and drag and drop those files to the new folder in the playground.
Xcode autocomplete does not work in Sources folder of Swift playgrounds
In order to enable autocompletion, you can embed your Playground in a regular Xcode project (e.g. an iOS application). I recommend creating a dummy project for that purpose. Simply drag and drop your playground in this dummy project and make sure to check "Add to target".
Then you can navigate to
Target -> Build Phases -> Compile Sources -> + -> Add other
and add all the files from your source folder. Please note, that you don't need to actually copy the files, a reference is enough for this purpose.
After this process all your source files are built against this dummy target and you can use autocompletion as usual. As far as I know, this is the best practice for debugging Playgrounds right now. Anyway I am curious, if there is an easier way to achieve that.
Related Topics
Swift: Nstextfield Allow Only Specified Characters
Generic and (Early) Binding in Swift 1.2
Are Swift Constants Lazy by Default
Trying to Add a Protocol to a Class Signature in Swift
Swift Protocol as Generic Parameter
Fetching Child Sum from Core Data
Swift Enumerate Functions. How Does It Work Behind
Swift: Specialize Method of Generic Class for Function Types
Swiftui Button Interact with Map
Dyld: Library Not Loaded: @Rpath/Libswiftdispatch.Dylib
Formula to Pick Every Pixel in a Bitmap Without Repeating
Swift Combine: What Are Those Multicast Functions for and How to Use Them
Core Data with Pre-Filled .Sqlite (Swift3)
Why Are Objects in the Same Sknode Layer Not Interacting with Each Other
Tvos Remote Notification Replacement