Running .xcplayground file

Hi all,

I’m studying the couse of Saving Data in iOS, i download the material file from github which linked from the course.

I found that the file is in .xcpayground and .xcworkspace format.
Does any one know how to run those file? I have troble because there’s no run button at each line of code.

image

The file you selected, contents.xcplayground, is an XML file. Swift playgrounds require Swift code to run. If you select the file Contents.swift, are you able to run the playground?

The contents of what you downloaded look different than any playground I have seen. Every playground I have created and opened is a file package with the extension .playground that has the files Contents.swift and contents.xcplaygrounds and the Sources folder inside the package. What you downloaded is the contents of the playground in a folder instead of a file package with the .playground extension. What is the URL of the repository where you downloaded the playground?

Hi there,

thnak you for help, i am in the mist of main job sorry for late reply.

If you select the file Contents.swift , are you able to run the playground?
Answer : No, either

What you downloaded is the contents of the playground in a folder instead of a file package with the .playground extension. What is the URL of the repository where you downloaded the playground?
Answer: GitHub - raywenderlich/video-sdios-materials: The projects and the materials that accompany the Saving Data in iOS course
i download from link in github above. this is from course itself.
so far i still not yet able to run the code

appreciated you for support.
sunti

I downloaded the material from GitHub as a ZIP file and encountered the same issue. My guess is that GitHub doesn’t know how to handle file wrappers so instead of getting a single file for each playground with the .playground extension, you get a collection of folders and files that doesn’t open properly in Xcode.

Ask if there’s a way to get the playgrounds outside of GitHub. I know the ebooks on Ray Wenderlich include a zip file for the playgrounds. I have their Combine book and the playgrounds appear as a single file in the Finder instead of a collection of folders.

Hi there, Even I have encountered the same issue. After cloning from the github, i see the .xcplayground in all the files, where i’m unable to run the code. Any help would be highly appreciated.

Here is the github link i’m using

@ [swongpetsakun] Did you find anything on this issue, even I’m facing the same issue and have posted in the comments section like a day ago but I haven’t got any replies yet, Just wanted to check with you, Thanks!

1 Like

This topic was automatically closed after 166 days. New replies are no longer allowed.