playground book gives error 'Module compiled with Swift 5.1 cannot be imported~'

"/Users/yejincho/Desktop/Swift_Playgrounds_Author_Template_for_Xcode_11.1/Template/PlaygroundBook/Sources/LiveViewSupport.swift:9:8: Module compiled with Swift 5.1 cannot be imported by the Swift 5.1.3 compiler: /Users/yejincho/Desktop/Swift_Playgrounds_Author_Template_for_Xcode_11.1/Template/SupportingContent/PlaygroundsFrameworks/iphoneos/PlaygroundSupport.framework/Modules/PlaygroundSupport.swiftmodule/arm64-apple-ios.swiftmodule "


=========


This is the error I get when I try to build my playground book.

I downloaded my playground book from https://developer.apple.com/download/more/?=Swift%20Playgrounds%20Author%20Template

, where apple recommended me to download.


I've tried to enable Build Libraries for Distribution but that didn't work.



My Xcode version in 11.3, swift version 5.1.


Is there any way besides downloading lower version of Xcode? I don't want to do that.

Replies

I am having the same problem.

I am also having this problem

Hey everyone!

A new version of the playgroundbook template just got released! Download at https://developer.apple.com/download/more/?=Swift%20Playgrounds%20Author%20Template


Also, Apple has released the swift playgrounds app on the app store, so if you need to run playgroundBooks on a Mac, click here: https://apps.apple.com/us/app/swift-playgrounds/id1496833156


Hope this helps!

-Zach


EDIT: Unfortunately, this does not currently fix the error currently. I've filed a bug report, so hopefully this gets fixed soon

For me the updated template still gives the same error...

For me the updated template still gives the same error... (2)

Was this resolved?

Same problem, with Version 11.3.1 and the Playground Author Template download dated Feb 12, 2020.

Any solutions yet?

I've submitted a bug report but no response yet!

I'll let you know as soon as they respond.

Same problem here. This is a real blocker for me 😟

The problem is fixed by using a legacy version of Xcode (11.0 ) which includes Swift 5.1. I think when Apple open sourced Swift it put Xcode in a never ending chase to try to keep up with all the improvements from the community. Maybe Apple should open source Xcode as well. Here is the link: Xcode 11.xip

Still the same Problem, by using the latest Version of template from 20.04 for Playground 3.3

For anyone still having the same problem, I have found the fix. As stated by the template, this playgroundbook template will only work on Xcode 11.1 and not later releases at the moment. So if you need to use this template, download Xcode 11.1 and try.