iOS: Add frontend & frontend build files (#746)

* iOS: Add SwiftUI part to repo

* Add iOS build script

* Update SDL2 submodule

* Fix iOS build script

* CI: Update xcode tools for iOS

* Update iOS_Build.yml

* Update iOS build

* Lower XCode version

* A

* Update project.pbxproj

* Update iOS_Build.yml

* Update iOS_Build.yml

* Update build.sh
This commit is contained in:
wheremyfoodat 2025-03-16 23:41:28 +02:00 committed by GitHub
parent 761f9264ba
commit e71cbc9bc3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 822 additions and 4 deletions

View file

@ -0,0 +1,51 @@
import AlberDriver
import SwiftUI
import MetalKit
import Darwin
struct ContentView: UIViewRepresentable {
@State var showFileImporter = true
/*
func makeCoordinator() -> Renderer {
Renderer(self)
}
*/
func makeUIView(context: UIViewRepresentableContext<ContentView>) -> MTKView {
let mtkView = MTKView()
mtkView.preferredFramesPerSecond = 60
mtkView.enableSetNeedsDisplay = true
mtkView.isPaused = true
if let metalDevice = MTLCreateSystemDefaultDevice() {
mtkView.device = metalDevice
}
mtkView.framebufferOnly = false
mtkView.drawableSize = mtkView.frame.size
let dispatchQueue = DispatchQueue(label: "QueueIdentification", qos: .background)
let metalLayer = mtkView.layer as! CAMetalLayer;
dispatchQueue.async{
iosCreateEmulator()
while (true) {
iosRunFrame(metalLayer);
}
}
return mtkView
}
func updateUIView(_ uiView: MTKView, context: UIViewRepresentableContext<ContentView>) {
print("Updating MTKView");
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}