I'm practicing a swift 5 class, and have this issue:
Could not launch “I AM RICH”
Domain: IDEDebugSessionErrorDomain
Code: 3
Failure Reason: The operation couldn’t be completed. Unable to launch com.superdie.I-AM-RICH because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user.
User Info: {
DVTRadarComponentKey = 855031;
RawLLDBErrorMessage = "The operation couldn\U2019t be completed. Unable to launch com.superdie.I-AM-RICH because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user.";
}
I'm not sure what can I do, some help would be nice :)
Swift Playgrounds
RSS for tagLearn and explore coding in Swift through interactive learning experiences on the Swift Playgrounds app for iPadOS and macOS.
Posts under Swift Playgrounds tag
94 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
The “Get Started with Apps” in Playgrounds looks great but it won’t allow me to advance to the next activity. It seems to think that my solution is incorrect, but what I did matches the solution provided in the “hint.” This could be corrected by either allowing for more variety in the responses, or by allowing the user to advance to the next activity regardless of whether the response they provided was correct.
Hello!
I am a new to programming and developing and I have a question:
I tried using Xcode and copied my code from Playgrounds into my Xcode Project.
But now it says 50 times "Cannot find (...) in scope."
In Playgrounds my code worked. What am I doing wrong?
Thank you very much!
Was doing the tutorials from Swift Playgrounds new lesson "Keep going with Apps" and on the "Bindings" chapter was asked to put a ColorPicker view.
To see the color options I should run the app instead of seeing it in the preview. I tried to do that but I don't get a response from Playgrounds...
Has someone had the same problem while doing this lesson?
Hi,
I have a problem with making a swift playgrounds app walkthrough. I followed the steps exactly and modified my Package.swift a bit (in the targets section):
.executableTarget(name: "App", dependencies: ["Guide"], path: "App"),
.target(
name: "Guide",
path: "Guide",
resources: [
.process("Guide.tutorial"),
])
Now when I open the project in Playgrounds I get this error:
public headers ("include") directory path for 'Guide' is invalid or not contained in the target
Any help would be appreciated.
Thanks
I want to make it like this
How to disable the button that open the side bar, I only need the content and the detail view. I don't need the sidebar view.
Below is my code
import SwiftUI
@available(iOS 16.0, *)
struct Screen: View {
@ObservedObject var userData = UserData()
@State private var isIntroShown = true
@State var Itema: Bool = false
@State private var showFoodDetail = false
@State var rb: Bool = false
@State var Setting: Bool = false
@State var Recipe: Bool = false
@Environment(\.defaultMinListRowHeight) var minRowHeight
@Environment(\.colorScheme) var colorScheme
@State private var searchText = ""
private let adaptiveColumns = [
GridItem(.adaptive(minimum: 170))
]
var columns = Array(repeating: GridItem(.flexible(), spacing: 10), count: 2)
var filteredRooms: [Room] {
if searchText.isEmpty {
return userData.rooms
} else {
return userData.rooms.filter { room in
let foodNames = room.food.map { $0.name.lowercased() }
return room.name.lowercased().contains(searchText.lowercased()) ||
foodNames.contains { $0.contains(searchText.lowercased()) }
}
}
}
@State private var columnVisibility = NavigationSplitViewVisibility.doubleColumn
var body: some View {
NavigationSplitView (columnVisibility: $columnVisibility){
} content: {
ScrollView{
GridView()
.padding(.horizontal)
.padding(.bottom, 20)
}.toolbar {
ToolbarItem(placement: .bottomBar){
Button(action:{self.Itema = true}) {
HStack {
Image(systemName: "plus.circle.fill").resizable().frame(width: 20, height: 20).foregroundColor(.white)
Text("New Item").foregroundColor(.white).bold()
}
}
.sheet(isPresented: self.$Itema){
NewItem(userData: self.userData)
}
}
ToolbarItem(placement: .bottomBar){
Button(action:{self.rb = true}) {
HStack {
Text("New Room").foregroundColor(.white)
}
}
.sheet(isPresented: self.$rb){
NewRoom(userData: self.userData)
}
}
ToolbarItem(placement: .navigationBarTrailing){
Button(action:{self.Setting = true}) {
HStack {
Image(systemName: "gear").foregroundColor(.white)
}
}
.sheet(isPresented: self.$Setting){
NavigationView {
NewItem( userData: userData)
.navigationBarItems(trailing:Button(action: {
self.Setting = false
}){
Text("Done")
}
)
}
}
}
}
.background(Color(red: 203/255, green: 237/255, blue: 207/255))
} detail: {
ZStack {
Text("")
}
.frame(maxWidth: .infinity, maxHeight: .infinity)
.background(Color(red: 220/255, green: 247/255, blue: 234/255))
}
.searchable(text: $searchText)
}
}
Have downloaded playgrounds 4.3 to my iPad Air running ipados 16.5.
Trying to use playground “Get started with Apps” but receiving message “Unsupported file format Get Started with Apps.swiftpm cannot be opened in Swift Playgrounds”.
I do not have Mac or windows PC so am stuck! Help ??
Is there a way to make a .swiftpm app only available on the iPad?
I can see where I would restrict it in the autogenerated Package.swift, but there's nowhere in the Swift Playgrounds or Xcode 14 interface that I can find that will let me restrict it to iPad only.
It's causing my app to get rejected by the App Store team, as the iPhone version is too crowded... but it's designed for iPad... I just need to be able to specify that somewhere...
Hello, i am working on my project for the Swift Student Challenge and it came to my attention that the project must be built using Swift Playgrounds. I have run into an issue where I want to add multiple views to my project but it seems i am unable. How am i supposed to do this?
When I import a package in Swift Playgrounds on my iPad, I receive the following error:
This package interactions with libgit2, and it don’t have any release in the origin repository, so I find a existing fork which have release.
Playgrounds version: 4.3.1(1727.53)
Is it means that I install a software that supports unzip on iPad?
I'm not able to see any live preview in playgrounds in the "Boogie Bot" file on page 2.
Can anyone help as to how I'll be able to make it work?
Hi,
is there any possibility to localize my Swift Playgrounds APP?
In the Build meta data it is always only English, and the "traditional" localization process doesn't work in Swift Playgrounds on iPad or in Xcode on Mac.
I have to admit that this is strange for me. Though I have been using playgrounds for years, but I only write small pieces of code to test simple ideas, and I never used another source file.
Today I want to add a new struct in Sources folder. To my surprise, I am not able to reference the struct in the main playground file.
Sources/testlets.swift:
struct Dummy {
var name: String
}
MyPlayground:
var box = Dummy(name: "abc")
// error: /.../MyPlayground.playground:22:11 Cannot find 'Dummy' in scope
I've decided I want my app, which has been shipped to the App Store, to support CloudKit, but it's a .swiftpm app (so I could work on it on the go on an iPad and Swift Playgrounds).
I've taken a half-hearted stab at it (there's more pressing stuff to work on and this is a nice to have for the moment), but is there a way to set up a new workspace in Xcode where I have two targets: a .swiftpm version of the app and a .xcodeproj app so I can enable CloudKit for my app and also ship it to the App Store with the same identifier?
I am typing string text on textDocumentProxy in a custom keyboard app. The input text includes newlines and punctuation letters, but when I try to edit the textDocumentProxy field, the textDocumentProxy.documentContextBeforeInput in case a newline \n is included, it does not return full content before input.
I placed the cursor on after the good morning word center, I got only good string text. The remaining "hi folks", words do not return.
Here are some examples I have tried.
var inputText = "Hi folks,
Good morning to everyone "
var txtBeforeCursor = textDocumentProxy.documentContextBeforeInput ?? ""
print("Before Cursor text : ",txtBeforeCursor)
Output is:
Before Cursor text : Good
Im new to Xcode getting this error in this playground, can someone help me here... This was In a playground btw
Thanks,
struct Digit {
var number : Int
init(_ n: Int){
self.number = n
}
mutating func changeNumberTo(_ n:Int) {
self.number = n
}
func otherFunction(_ f: ()->()) {
}
mutating func callAnotherFunction() {
otherFunction {
self.changeNumberTo(345) // *
}
}
}
var d = Digit(123) // Digit is a struct
print(d.number) //123
var d2 = d //Assignment!
d2.number = 42
print(d.number)
enum Node {
case none(Int)
indirect case left(Int, Node)
indirect case right(Int, Node)
indirect case both(Int, Node, Node)
}
Hi, dear community, I recently updated my old Macbook pro(model 2016) to Monterey(which is the latest macOS that support 2016 model), but the Swift Playgrounds on AppStore requires macOS 13. Is there any way I can get the app, just like Xcode? Xcode provides an alternative way to download the xip file of an older version, but playgrounds does.
Many thanks in advance, any help will be appreciated!
I have the simplest Playground to display image. I have images inside Resources. Somewhat it does not work and I am really confused. I am using macOS XCode.
I think on iPad Swift Playground this might work.
import SwiftUI
import PlaygroundSupport
struct ContentView: View {
var body: some View {
Image("image1")
.resizable()
.frame(width: 512, height: 512)
}
}
let hostingController = UIHostingController(rootView: ContentView())
PlaygroundPage.current.liveView = hostingController
why does the for loop in Swift Playground iterates over each element in a random order? I thought for loops iterate from the first element going to the last?
Since Swift Playgrounds was able to submit Apps to the AppStore ,Apple stated that it can be used to develop apps without having to use Xcode.
But if you do so you are lost:
The Testflight beta versions of Swift Playgrounds with API support for iOS 17 and macOS 14 have expired one week before the new systems become/became available and there is still no final version!
If you used Playgrounds to develop an iOS 17 ready version of your app you can't do anything now and that at a time where the users get their hands on the new OS.
That is really bad.