Post not yet marked as solved
I created a swiftpm project with Xcode Version 13.4.1 (13F100).
I changed the target from the default created by Xcode to this:
targets: [
.executableTarget(
name: "App",
path: "App"
)
]
I also changed the package version to 5.6 to match the AboutMe Package file.
I also created an App directory and moved all my files (bar the Package.swift file) to it, and I also created a Guide folder and created a Guide.tutorial file based on the example in the WWDC video.
I've turned on Author Debugging Mode (this is on Swift Playgrounds on the Mac, I'll try later on Swift Playgrounds on the iPad), but I get no messages other than the "Could not display guide. Try reopening the current project..."
I also get a build error that just says "Building failed"
What am I missing?
Post not yet marked as solved
You can play around with the examples like Sensor arcade.
But where is the function for the mushrooms popup?
How can I create my similar project?
Post not yet marked as solved
I have reached to Learn to Code 2, Chapter: Types, Corner of The World puzzle.
however; I have provided a solution and the Playground did not close the puzzle, but the avatar stop moving as it meets the conditions I set!!
I searched the internet and found the solution, I copied the solution, the puzzle closed!!
but my solution was much shorter than the solution!!
I am not sure what is wrong in my code, I have attached my code.
`greenPortal.isActive = false
orangePortal.isActive = false
var numberOfGems = 0
var numberOfSwitchs = 0
func moveAround() {
if isBlockedRight {moveForward()} else {turnRight()
moveForward()
}
if isBlocked {turnLeft()
turnLeft()
}
}
turnRight()
moveForward()
for steps in 1...2 {
moveForward()
turnRight()
moveForward()
if isOnClosedSwitch {toggleSwitch(); numberOfSwitchs = numberOfSwitchs + 1}
turnLeft()
turnLeft()
}
while !isBlocked {
while numberOfSwitchs < 6 {
moveAround()
if isOnGem {collectGem(); numberOfGems = numberOfGems + 1}
if numberOfGems == 6 {greenPortal.isActive = true}
if isOnClosedSwitch {toggleSwitch(); numberOfSwitchs = numberOfSwitchs + 1}
if isOnOpenSwitch {greenPortal.isActive = false}
}
}
Post not yet marked as solved
I just installed Swift Playgrounds on newly installed Monterey. There is not much else installed (ie, no Xcode). The initial screens of Playgrounds seem to render properly (ie against the blue background). Then when the lesson begins the instruction and coding window appear fine, but the right panel is just a blue background with either nothing at all or a tiny little box at the top of screen that says 0/1. It seems like the animations are not rendering. I have tried to reinstall but same issues. This seems to occur in all the lessons. I have no idea where to even begin troubleshooting this and I have searched the internet and nothing similar seems to be mentioned. Suggestions?
I try to build a swift PlaygroundBookTemplate on Xcode 13 (macOS Monterey 12.0) but it keeps saying that Module compiled with Swift 5.3.1 cannot be imported by the Swift 5.6 compiler (about PlaygroundSupport).
I already tried opening with Rosetta and installing older versions of Xcode, but it keeps showing the same error
Post not yet marked as solved
A Failed to launch process. Failed to attach to stub for playground execution: error: debugserver is x86_64 binary running in translation, attached failed..
Did anyone experience this? I want to run playground using Rosetta?
If i doing on playground on macbook. Can i send a file extention swiftpm ? I see a rule its said must be .swiftpm but .swiftpm is create from xcode.
I would like to know
Can playground save a file to extention .swiftpm?
or I must do only in XCODE
Im very confused
Thank you in advanced.
Hi !,
For this year's WWDC Student challenge we need to create a swift playgrounds app but I have designed a swift playground book with chapters and multiple pages. Now I need to convert it into the swift playgrounds app, How can I do it ?
I am completely new to swift and Xcode. Just started to learn swift about 15 days ago. So any help would be appreciated
Thanks in advance
cheers,
Sanjiv Anand
Greetings, I want to force my app's Orientation. Most solutions for "How to force orientation to Landscape for SwiftUI" seems works only for "real" SwiftUI project, not .swiftpm
How can I force orientation to landscape for Swift Playground App Project?
Post not yet marked as solved
Dear Teams,
I try to transfer this Xcode sample project to the Playground app project.
However, when I move all swift files and the CoreML file called 'ExerciseClassifier.mlmodel' on the folder to the Playground app project, it shows the error, "Cannot find type 'ExerciseClassifier' in scope".
What could I do to remove the error and make a proper working project on Playground?
Thanks.
These are my spec:
Mac m1
Xcode - Version 13.3.1
Swift - 5.6
MacOS Monterey 12.3.1
I made a swift playgrounds App in Xcode.
This title is Test_Sample.
I tried to drag and drop it to the playground, but it didn't open.
How should i solve to this?
Hi, I tried to open swift playgrounds author template in Xcode 13.3 but it shows the following error when I build the app
Command EmitSwiftModule failed with a nonzero exit code
But the template is for Xcode 13.2 but for the swift student challenge we need to use Xcode 13.3 to build the playground. Is there a updated version of the template??
Post not yet marked as solved
why can't type anything in the playground console.?
Post not yet marked as solved
Learning Swift. When I create a new playground the output doesn't appear in the right-hand panel as I code.
Can someone tell me why, and how to fix?
Post not yet marked as solved
I’m building a playgroundbook for the upcoming swift student challenge and am confused with the whole rules about fetching data from the internet in my playgroundbook.
I have implemented the speech framework in one chapter and am implementing it so that it is to be done offline. The problem is that this is only possible on iPads with an A12 Bionic chip or newer and thus the older iPads and even my mac shows an error when Wifi is turned off.
So I’m concerned as to whether my submission will be accepted in such a case or not?
Post not yet marked as solved
I'm developing ios apps on the ipad playground 4, and trying to create files but they're saved in the path:
var/mobile/Containers/Data/Application
how to Access to this path ?
And How many paths my app can Access to? and what is it?
Post not yet marked as solved
Hi, I’ve been on Sphero Swift Playgrounds 2; Randomise Game for a while and I need help.
This is my code;
func pickNextGesture(availableGestures:[Gesture]) -> Gesture {
randomNumber(min: 1, max: availableGesture.count)
return .tap
return .toss
return .spin
return .shake
Post not yet marked as solved
Showing this message -
Failed to launch process. Failed to attach to stub for playground execution: error: attach failed ((os/kern) invalid argument)
Post not yet marked as solved
if I started learn with swift
Can I become 10x developer and get a good job ?
Post not yet marked as solved
Hey,
So. I am writing and searching and refactoring code. specifically my "cos" function is not producing the correct values. the value for '0' is correct, however when I put '20' in for cos() the value produced looks like a tinder profile value age phone & zip. I've looked up many different equations that cosine might produce, none of them solve as the value shown in my console. any tips, or advice. I was hoping to just have to find radians or degrees, but so far not the case.