Problem with Playground Book Author Template

Hey,

I tried to download the Playground book author template from https://developer.apple.com/documentation/swift_playgrounds/creating_and_running_a_playground_book

and tried to run it with Xcode 11.4.1 but I keep getting an error that says

Module compiled with Swift 5.1 cannot be imported by the Swift 5.2 compiler


Can someone please help me fix this issue?

Replies

Exact same issue here


Error: Module compiled with Swift 5.1 cannot be imported by the Swift 5.2.2 compiler: .../Template/SupportingContent/PlaygroundsFrameworks/iphonesimulator/PlaygroundSupport.framework/Modules/PlaygroundSupport.swiftmodule/x86_64-apple-ios-simulator.swiftmodule .


I've tried changing my command tools but it does not work.

As far as I checked, there is no download links showing for Xcode 11.4.

And unfortunately, the template contains some modules incompatible with Xcode 11.4 (which comes with Swift 5.2).


Unless you get Xcode 11.1 as shown in the download link, there are no simple workarounds.

(Xcode 11.3.1 would work, as it contains Swift 5.1, but not tested.)

I had the same issue, but the solution OOPer tells is the one I've been using all day and so far so great! It even works with Swift Playgrounds 3.3 (which is a requirement) 🙂

Thanks for conforming.

Here is the download link for old Xcodes.

https://developer.apple.com/download/more/?=Xcode

is it ok to use old Xcode?? cause the informations said

'''

Your Swift playground must be built with and run on Swift Playgrounds 3.3 on iPadOS 13.4.1, Swift Playgrounds 3.3 on macOS 10.15.4, or Xcode 11.4.1 on macOS 10.15.4. If it runs on iPadOS, it must be optimized to display properly on all models of iPad Pro.

'''

Apple specified Xcode 11.4.1 which is latest version.


also same problem with template here.


(is there any other way to make playground book without template?)

No, I think the only way for it to work is to develop on Xcode 11.1, have the judges run all playground books on Xcode 11.1 and for the judges to run all other playgrounds in Xcode 11.4. Otherwise, I don't see how Playground Books can be accepted. Apple please give clarification because I'm already working on a playground book.

Hello,


Any news???

Hi,


same problem here.


Does anyone have any update?


Thank you in advice

Hello

The same problem as TaeHyeong Kim here:

Is it OK to use an old Xcode?

I'm using Xcode 11.1 for the moment, my advice is to develop with that until this is addressed.

Yeah it would be greate if the would be an Author Template compatible with Swift 5.2 in time for the deadline.

Previously there were downloads available for Xcode 11.1 - Xcode 11.3 but everything except the template for Xcode 11.1 got removed agian.

Thank you for asking. The Challenge prompt is to create a playground document within the Swift Playgrounds app — either for Mac or iPad — or create a new Xcode .playground file using Xcode 11.4.1. The Xcode Author Template is a tool designed for authors (usually educators) producing .playgroundbook files, as it enables hiding code and setting custom reset points. While it does result in a playground, this template doesn’t fully align with the purpose of the Challenge. It intentionally supports Xcode 11.1 because the Swift compiler needs to match the version within the Swift Playgrounds app for Mac or iPad.

So to clarify, we aren't allowed to submit Playground Books?

I noticed that you are referring Swift Playgrounds as .playground only files, not .playground or .playgroundbook files. Now as the Swift Playground app on both Mac and iPad generates .playgroundbook files by default (with module support), can we submit .playgroundbook as well?

So we are Not allowed to use playbook then Because it break the rules of using Xcode 11.4?