I Have installed swift playground on my ipad..
but i saw Many different between the show for swift playground on the event wwdc21..
Here:
https://youtu.be/3ELYyOwJCpM |..
Where this radical difference is clear..and my second question is if there is a difference between swift playground and xcode playground?
Post
Replies
Boosts
Views
Activity
When i use on my swiftUI
app the (@Binding)
Some error coming:
Error:
Property wrappers are not yet supported on local properties
And:
Closure containing a declaration cannot be used with function builder 'ViewBuilder'
Any body Help me?
How can i run App on ipad playground for swift
var body: some Scene {
WindowGroup {
TabView {
Text("one")
Text("tow")
}
}
}
}
I’m a former Python programmer, and I’m new to Swift
I want to know: is there a function that can exec/run another Swift file or external Swift script?
Just as an example. In Python I was using to exec another Python script:
exec("print('Hello world')")
and the result:
Hello world
That's it.
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?
How can playground or any app exec an swift code or show an update live of view that we are make?
I want to know this because i want to build app that help you to build views without coding..so i want the same Features that used on swift playground and xcode that exec swift code and show update live of view.
Great what you did in iPadOS 16, this is a giant step towards bigger major updates, what we want now in iPadOS 17 is the following:
1- We want a “terminal” system on the iPad with the ability to use it in programming and development, and allow applications to access it in order to create professional IDE copies for the iPad.
2- We hope to have a copy of one of the professional programs on Mac, such as F CUT PRO or XCODE.
3- Improving the stage manager further to become more effective and more real.
4- Take advantage of the empty top space that lies between the battery charge number and the watch, so that there are larger items that we can take advantage of such as a Mac, or even something better than a Mac.
We want you to wow us with the iPadOS 17 update.
Good luck..
How to write a text file in swift playground 4 ipad version ?
And how can i see it in Files app ?
swift 5, is it possible to do it with just swift playground 4 of iPad version?
I can't see the option to add new package in Xcode !
I clicked [File -> Package]
But no button to add new package!
My package: https://github.com/pvieito/PythonKit
Check this image to see the options that just show to me : [
]
Hello Metal programmers, i would like to start programming with metal, but I can not see any place to start from! I searched on YouTube, google, etc.. but I did not see any thing,
Please help me to start with "Metal programming". I think this site is the good place to ask.
And I would like to know what language that metal use? Is it have its own language ? Or its use swift or obj-c ?
I do have a simple application that uses the new swiftUI framework SwiftData.
This is the SwiftData model named Note:
import Foundation
import SwiftData
@Model
class Note {
init(name: String, content: String) {
self.name = name
self.content = content
}
@Attribute(.unique) var name: String
var content: String
}
And this is the ContentView sample:
import SwiftUI
import SwiftData
struct ContentView: View {
@Environment(\.modelContext) private var modelContext
@Query var notes: [Note]
@State var newNoteName: String = ""
@State var presentNewNoteAlert = false
var body: some View {
NavigationSplitView {
List {
ForEach (notes){noteTitle in
NavigationLink (noteTitle.name) {
NoteEditing(noteModelClass: noteTitle)
}
}
.onDelete(perform: deleteNote)
}
.navigationTitle("Notes")
.toolbar {
Button ("", systemImage: "plus", action: {
presentNewNoteAlert = true
})
}
} detail: {
Text("Select a note to edit")
}
.alert("New note name", isPresented: $presentNewNoteAlert) {
TextField("", text: $newNoteName)
HStack {
Button("Done", action: submit)
Button("Close", role: .cancel) {}
}
}
}
}
Here, if I used NavigationSplitView for the ForEach, there is a weird issue where all NavigationLink's destinations becomes the same!. But If I change it to NavigationStack the destination issue fixed.
This is a peak:
NavigationSplitView duplicating destination issue:
The NavigationStack behaving good and not duplicating the NavigationLink's destination: