diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.idea/Clemens Playground.iml b/.idea/Clemens Playground.iml new file mode 100644 index 0000000..d6ebd48 --- /dev/null +++ b/.idea/Clemens Playground.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/copilot.data.migration.agent.xml b/.idea/copilot.data.migration.agent.xml new file mode 100644 index 0000000..4ea72a9 --- /dev/null +++ b/.idea/copilot.data.migration.agent.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/copilot.data.migration.ask.xml b/.idea/copilot.data.migration.ask.xml new file mode 100644 index 0000000..7ef04e2 --- /dev/null +++ b/.idea/copilot.data.migration.ask.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/copilot.data.migration.ask2agent.xml b/.idea/copilot.data.migration.ask2agent.xml new file mode 100644 index 0000000..1f2ea11 --- /dev/null +++ b/.idea/copilot.data.migration.ask2agent.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/copilot.data.migration.edit.xml b/.idea/copilot.data.migration.edit.xml new file mode 100644 index 0000000..8648f94 --- /dev/null +++ b/.idea/copilot.data.migration.edit.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..b872f63 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/xcode.xml b/.idea/xcode.xml new file mode 100644 index 0000000..59e1ff0 --- /dev/null +++ b/.idea/xcode.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Clemens Playground.xcodeproj/project.pbxproj b/Clemens Playground.xcodeproj/project.pbxproj index 3d1b894..d08e166 100644 --- a/Clemens Playground.xcodeproj/project.pbxproj +++ b/Clemens Playground.xcodeproj/project.pbxproj @@ -246,6 +246,7 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 899Z9C75C8; ENABLE_APP_SANDBOX = YES; ENABLE_PREVIEWS = YES; ENABLE_USER_SELECTED_FILES = readonly; @@ -254,13 +255,15 @@ "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES; "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES; "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphonesimulator*]" = YES; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphoneos*]" = YES; "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphonesimulator*]" = YES; + INFOPLIST_KEY_UILaunchStoryboardName = "Launch Screen"; "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphoneos*]" = UIStatusBarStyleDefault; "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - IPHONEOS_DEPLOYMENT_TARGET = 26.0; + IPHONEOS_DEPLOYMENT_TARGET = 16.6; LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 26.0; @@ -270,13 +273,14 @@ REGISTER_APP_GROUPS = YES; SDKROOT = auto; STRING_CATALOG_GENERATE_SYMBOLS = YES; - SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx xros xrsimulator"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; SWIFT_APPROACHABLE_CONCURRENCY = YES; SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY = YES; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2,7"; + TARGETED_DEVICE_FAMILY = "1,2"; XROS_DEPLOYMENT_TARGET = 26.0; }; name = Debug; @@ -288,6 +292,7 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 899Z9C75C8; ENABLE_APP_SANDBOX = YES; ENABLE_PREVIEWS = YES; ENABLE_USER_SELECTED_FILES = readonly; @@ -296,13 +301,15 @@ "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES; "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES; "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphonesimulator*]" = YES; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphoneos*]" = YES; "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphonesimulator*]" = YES; + INFOPLIST_KEY_UILaunchStoryboardName = "Launch Screen"; "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphoneos*]" = UIStatusBarStyleDefault; "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - IPHONEOS_DEPLOYMENT_TARGET = 26.0; + IPHONEOS_DEPLOYMENT_TARGET = 16.6; LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 26.0; @@ -312,13 +319,14 @@ REGISTER_APP_GROUPS = YES; SDKROOT = auto; STRING_CATALOG_GENERATE_SYMBOLS = YES; - SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx xros xrsimulator"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; SWIFT_APPROACHABLE_CONCURRENCY = YES; SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY = YES; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2,7"; + TARGETED_DEVICE_FAMILY = "1,2"; XROS_DEPLOYMENT_TARGET = 26.0; }; name = Release; diff --git a/Clemens Playground.xcodeproj/project.xcworkspace/xcuserdata/m.roider.xcuserdatad/xcschemes/xcschememanagement.plist b/Clemens Playground.xcodeproj/project.xcworkspace/xcuserdata/m.roider.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..ee3458d --- /dev/null +++ b/Clemens Playground.xcodeproj/project.xcworkspace/xcuserdata/m.roider.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/Clemens Playground/Assets.xcassets/AppIcon.appiconset/Contents.json b/Clemens Playground/Assets.xcassets/AppIcon.appiconset/Contents.json index ffdfe15..1d2974d 100644 --- a/Clemens Playground/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/Clemens Playground/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,81 +1,10 @@ { "images" : [ { + "filename" : "icon_1024x1024 1.png", "idiom" : "universal", "platform" : "ios", "size" : "1024x1024" - }, - { - "appearances" : [ - { - "appearance" : "luminosity", - "value" : "dark" - } - ], - "idiom" : "universal", - "platform" : "ios", - "size" : "1024x1024" - }, - { - "appearances" : [ - { - "appearance" : "luminosity", - "value" : "tinted" - } - ], - "idiom" : "universal", - "platform" : "ios", - "size" : "1024x1024" - }, - { - "idiom" : "mac", - "scale" : "1x", - "size" : "16x16" - }, - { - "idiom" : "mac", - "scale" : "2x", - "size" : "16x16" - }, - { - "idiom" : "mac", - "scale" : "1x", - "size" : "32x32" - }, - { - "idiom" : "mac", - "scale" : "2x", - "size" : "32x32" - }, - { - "idiom" : "mac", - "scale" : "1x", - "size" : "128x128" - }, - { - "idiom" : "mac", - "scale" : "2x", - "size" : "128x128" - }, - { - "idiom" : "mac", - "scale" : "1x", - "size" : "256x256" - }, - { - "idiom" : "mac", - "scale" : "2x", - "size" : "256x256" - }, - { - "idiom" : "mac", - "scale" : "1x", - "size" : "512x512" - }, - { - "idiom" : "mac", - "scale" : "2x", - "size" : "512x512" } ], "info" : { diff --git a/Clemens Playground/Assets.xcassets/AppIcon.appiconset/icon_1024x1024 1.png b/Clemens Playground/Assets.xcassets/AppIcon.appiconset/icon_1024x1024 1.png new file mode 100644 index 0000000..9f252a7 Binary files /dev/null and b/Clemens Playground/Assets.xcassets/AppIcon.appiconset/icon_1024x1024 1.png differ diff --git a/Clemens Playground/Assets.xcassets/LaunchScreen.imageset/AppIcon-Clemens.png b/Clemens Playground/Assets.xcassets/LaunchScreen.imageset/AppIcon-Clemens.png new file mode 100644 index 0000000..ad7b67d Binary files /dev/null and b/Clemens Playground/Assets.xcassets/LaunchScreen.imageset/AppIcon-Clemens.png differ diff --git a/Clemens Playground/Assets.xcassets/LaunchScreen.imageset/Contents.json b/Clemens Playground/Assets.xcassets/LaunchScreen.imageset/Contents.json new file mode 100644 index 0000000..27d4977 --- /dev/null +++ b/Clemens Playground/Assets.xcassets/LaunchScreen.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "AppIcon-Clemens.png", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Clemens Playground/Clemens_PlaygroundApp.swift b/Clemens Playground/Clemens_PlaygroundApp.swift index caef733..211e32f 100644 --- a/Clemens Playground/Clemens_PlaygroundApp.swift +++ b/Clemens Playground/Clemens_PlaygroundApp.swift @@ -4,14 +4,27 @@ // // Created by Maximilian Roider on 14.11.25. // +/* + ⣿⡇⠄⡴⠁⡜⣵⢗⢀⠄⢠⡔⠁⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄ + ⣿⡇⡜⠄⡜⠄⠄⠄⠉⣠⠋⠠⠄⢀⡄⠄⠄⣠⣆⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⢸ + ⣿⠸⠄⡼⠄⠄⠄⠄⢰⠁⠄⠄⠄⠈⣀⣠⣬⣭⣛⠄⠁⠄⡄⠄⠄⠄⠄⠄⢀⣿ + ⣏⠄⢀⠁⠄⠄⠄⠄⠇⢀⣠⣴⣶⣿⣿⣿⣿⣿⣿⡇⠄⠄⡇⠄⠄⠄⠄⢀⣾⣿ + ⣿⣸⠈⠄⠄⠰⠾⠴⢾⣻⣿⣿⣿⣿⣿⣿⣿⣿⣿⢁⣾⢀⠁⠄⠄⠄⢠⢸⣿⣿ + ⣿⣿⣆⠄⠆⠄⣦⣶⣦⣌⣿⣿⣿⣿⣷⣋⣀⣈⠙⠛⡛⠌⠄⠄⠄⠄⢸⢸⣿⣿ + ⣿⣿⣿⠄⠄⠄⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠇⠈⠄⠄⠄⠄⠄⠈⢸⣿⣿ + ⣿⣿⣿⠄⠄⠄⠘⣿⣿⣿⡆⢀⣈⣉⢉⣿⣿⣯⣄⡄⠄⠄⠄⠄⠄⠄⠄⠈⣿⣿ + ⣿⣿⡟⡜⠄⠄⠄⠄⠙⠿⣿⣧⣽⣍⣾⣿⠿⠛⠁⠄⠄⠄⠄⠄⠄⠄⠄⠃⢿⣿ + ⣿⡿⠰⠄⠄⠄⠄⠄⠄⠄⠄⠈⠉⠩⠔⠒⠉⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠐⠘⣿ + */ import SwiftUI +import WebKit @main struct Clemens_PlaygroundApp: App { var body: some Scene { WindowGroup { - ContentView() + GameSelection() } } } diff --git a/Clemens Playground/ContentView.swift b/Clemens Playground/ContentView.swift deleted file mode 100644 index ab66f93..0000000 --- a/Clemens Playground/ContentView.swift +++ /dev/null @@ -1,24 +0,0 @@ -// -// ContentView.swift -// Clemens Playground -// -// Created by Maximilian Roider on 14.11.25. -// - -import SwiftUI - -struct ContentView: View { - var body: some View { - VStack { - Image(systemName: "globe") - .imageScale(.large) - .foregroundStyle(.tint) - Text("Hello, world!") - } - .padding() - } -} - -#Preview { - ContentView() -} diff --git a/Clemens Playground/Data/Game.swift b/Clemens Playground/Data/Game.swift new file mode 100644 index 0000000..27bba69 --- /dev/null +++ b/Clemens Playground/Data/Game.swift @@ -0,0 +1,14 @@ +// +// Game.swift +// Clemens Playground +// +// Created by Maximilian Roider on 14.11.25. +// + +import Foundation + +struct Game: Hashable, Codable, Identifiable { + var id: Int + var name: String + var url: String +} diff --git a/Clemens Playground/Data/Loader.swift b/Clemens Playground/Data/Loader.swift new file mode 100644 index 0000000..ac08715 --- /dev/null +++ b/Clemens Playground/Data/Loader.swift @@ -0,0 +1,33 @@ +// +// Loader.swift +// Clemens Playground +// +// Created by Maximilian Roider on 14.11.25. +// + +import Foundation + +var games: [Game] = load("games.json") + +func load(_ filename: String) -> T { + + let data: Data + + guard let file = Bundle.main.url(forResource: filename, withExtension: nil) + else { + fatalError("Couldn't find \(filename) in main bundle.") + } + + do { + data = try Data(contentsOf: file) + } catch { + fatalError("Couldn't load \(filename) from main bundle:\n\(error)") + } + + do { + let decoder = JSONDecoder() + return try decoder.decode(T.self, from: data) + } catch { + fatalError("Couldn't parse \(filename) as \(T.self):\n\(error)") + } +} diff --git a/Clemens Playground/Screens/GameSelection.swift b/Clemens Playground/Screens/GameSelection.swift new file mode 100644 index 0000000..79baa27 --- /dev/null +++ b/Clemens Playground/Screens/GameSelection.swift @@ -0,0 +1,23 @@ +// +// GameSelection.swift +// Clemens Playground +// +// Created by Maximilian Roider on 14.11.25. +// + +import SwiftUI + +struct GameSelection: View { + var body: some View { + NavigationView { + List(games) { game in + NavigationLink(destination: GameView(game)) { + ZStack { + GameRow(game) + } + } + } + .navigationTitle("Games") + } + } +} diff --git a/Clemens Playground/Screens/GameView.swift b/Clemens Playground/Screens/GameView.swift new file mode 100644 index 0000000..29e202e --- /dev/null +++ b/Clemens Playground/Screens/GameView.swift @@ -0,0 +1,31 @@ +// +// GameView.swift +// Clemens Playground +// +// Created by Maximilian Roider on 14.11.25. +// + +import SwiftUI + +struct GameView: View { + private let game: Game + + init(_ game: Game) { + self.game = game + } + + var body: some View { + // Use this for >= Xcode 26 and remove commentary in "NewWebView.swift" + // NewWebView(game.url) + + // Use this for < Xcode 26 + OldWebView(game.url) + .frame( + minWidth: 0, + maxWidth: .infinity, + minHeight: 0, + maxHeight: .infinity, + alignment: .topLeading + ) + } +} diff --git a/Clemens Playground/Views/GameSelection/GameRow.swift b/Clemens Playground/Views/GameSelection/GameRow.swift new file mode 100644 index 0000000..17eef0b --- /dev/null +++ b/Clemens Playground/Views/GameSelection/GameRow.swift @@ -0,0 +1,24 @@ +// +// GameRow.swift +// Clemens Playground +// +// Created by Maximilian Roider on 14.11.25. +// + +import SwiftUI + +struct GameRow: View { + + var game: Game + + init(_ game: Game) { + self.game = game + } + + var body: some View { + HStack { + Text(game.name) + Spacer() + } + } +} diff --git a/Clemens Playground/Views/Launch Screen.storyboard b/Clemens Playground/Views/Launch Screen.storyboard new file mode 100644 index 0000000..e0be666 --- /dev/null +++ b/Clemens Playground/Views/Launch Screen.storyboard @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Clemens Playground/Views/WebViews/NewWebView.swift b/Clemens Playground/Views/WebViews/NewWebView.swift new file mode 100644 index 0000000..158c744 --- /dev/null +++ b/Clemens Playground/Views/WebViews/NewWebView.swift @@ -0,0 +1,26 @@ +// +// NewWebView.swift +// Clemens Playground +// +// Created by Maximilian Roider on 14.11.25. +// + +import SwiftUI +import WebKit + +//struct NewWebView: View { +// +// @State private var page = WebPage() +// private let url: String +// +// init(_ url: String) { +// self.url = url +// } +// +// var body: some View { +// WebView(page) +// .onAppear { +// page.load(URLRequest(url: URL(string: url)!)) +// } +// } +//} diff --git a/Clemens Playground/Views/WebViews/OldWebView.swift b/Clemens Playground/Views/WebViews/OldWebView.swift new file mode 100644 index 0000000..79288fb --- /dev/null +++ b/Clemens Playground/Views/WebViews/OldWebView.swift @@ -0,0 +1,27 @@ +// +// OldWebview.swift +// Clemens Playground +// +// Created by Maximilian Roider on 14.11.25. +// + +import Foundation +import SwiftUI +import WebKit + +struct OldWebView: UIViewRepresentable { + private let url: String + + init(_ url: String) { + self.url = url + } + + func makeUIView(context: Context) -> some UIView { + let webView = WKWebView() + webView.load(URLRequest(url: URL(string: url)!)) + + return webView + } + + func updateUIView(_ uiView: UIViewType, context: Context) {} +} diff --git a/Clemens Playground/games.json b/Clemens Playground/games.json new file mode 100644 index 0000000..affc143 --- /dev/null +++ b/Clemens Playground/games.json @@ -0,0 +1,12 @@ +[ + { + "id": 1001, + "name": "Game 1", + "url": "https://git.roider.tech/darksider110/Clemens-Webview-Playground" + }, + { + "id": 1002, + "name": "Projekt-Git", + "url": "https://git.roider.tech/darksider110/Clemens-Webview-Playground" + }, +]