commit 93feb977393125255c7981ae88d536cd09e46471 Author: Dr. Michael Kübler Date: Fri Nov 6 17:45:54 2026 +0100 Initial Commit diff --git a/MikeMail.xcodeproj/project.xcproj b/MikeMail.xcodeproj/project.xcproj new file mode 100644 index 0000000..8ada43e --- /dev/null +++ b/MikeMail.xcodeproj/project.xcproj @@ -0,0 +1,194 @@ +{ + "default-configuration": "Release", + "configurations": [ + "Debug", + "Release", + ], + "localizations": { + "development": "en", + "supported": [ + "Base", + ], + }, + "files": [ + { "kind": "folder", "path": "MikeMail", "target-membership": [ "MikeMail" ] }, + { "kind": "folder", "path": "MikeMailTests", "target-membership": [ "MikeMailTests" ] }, + { "kind": "folder", "path": "MikeMailUITests", "target-membership": [ "MikeMailUITests" ] }, + { + "kind": "group", + "name": "Products", + "children": [ + { "path": "/MikeMail.app", "id": "4C847ED9309E3BBF00AA96B9", "type": "wrapper.application", "index": false }, + { "path": "/MikeMailTests.xctest", "id": "4C847EE8309E3BC000AA96B9", "type": "wrapper.cfbundle", "index": false }, + { "path": "/MikeMailUITests.xctest", "id": "4C847EF2309E3BC000AA96B9", "type": "wrapper.cfbundle", "index": false }, + ], + }, + ], + "targets": [ + { + "name": "MikeMail", + "id": "4C847ED8309E3BBF00AA96B9", + "product": "Products/MikeMail.app", + "product-type": "application", + "build-phases": [ + "compile-sources", + "frameworks", + "resources", + ], + "build-settings": { + "ASSETCATALOG_COMPILER_APPICON_NAME": "AppIcon", + "ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME": "AccentColor", + "CODE_SIGN_STYLE": "Automatic", + "COMBINE_HIDPI_IMAGES": "YES", + "CURRENT_PROJECT_VERSION": "1", + "DEVELOPMENT_TEAM": "GQR972L9NJ", + "ENABLE_APP_SANDBOX": "YES", + "ENABLE_HARDENED_RUNTIME": "YES", + "ENABLE_PREVIEWS": "YES", + "ENABLE_USER_SELECTED_FILES": "readonly", + "GENERATE_INFOPLIST_FILE": "YES", + "INFOPLIST_KEY_NSHumanReadableCopyright": "", + "LD_RUNPATH_SEARCH_PATHS": [ + "$(inherited)", + "@executable_path/../Frameworks", + ], + "MARKETING_VERSION": "1.0", + "PRODUCT_BUNDLE_IDENTIFIER": "Dr.-med.-Michael-Ku-bler.MikeMail", + "PRODUCT_NAME": "$(TARGET_NAME)", + "REGISTER_APP_GROUPS": "YES", + "STRING_CATALOG_GENERATE_SYMBOLS": "YES", + "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", + }, + }, { + "name": "MikeMailTests", + "id": "4C847EE7309E3BC000AA96B9", + "product": "Products/MikeMailTests.xctest", + "product-type": "bundle.unit-test", + "test-host-target": "MikeMail", + "dependencies": [ + "MikeMail", + ], + "build-phases": [ + "compile-sources", + "frameworks", + "resources", + ], + "build-settings": { + "BUNDLE_LOADER": "$(TEST_HOST)", + "CODE_SIGN_STYLE": "Automatic", + "CURRENT_PROJECT_VERSION": "1", + "DEVELOPMENT_TEAM": "GQR972L9NJ", + "GENERATE_INFOPLIST_FILE": "YES", + "MACOSX_DEPLOYMENT_TARGET": "27.2", + "MARKETING_VERSION": "1.0", + "PRODUCT_BUNDLE_IDENTIFIER": "Dr.-med.-Michael-Ku-bler.MikeMailTests", + "PRODUCT_NAME": "$(TARGET_NAME)", + "STRING_CATALOG_GENERATE_SYMBOLS": "NO", + "SWIFT_APPROACHABLE_CONCURRENCY": "YES", + "SWIFT_EMIT_LOC_STRINGS": "NO", + "SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY": "YES", + "SWIFT_VERSION": "5.0", + "TEST_HOST": "$(BUILT_PRODUCTS_DIR)/MikeMail.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/MikeMail", + }, + }, { + "name": "MikeMailUITests", + "id": "4C847EF1309E3BC000AA96B9", + "product": "Products/MikeMailUITests.xctest", + "product-type": "bundle.ui-testing", + "test-host-target": "MikeMail", + "dependencies": [ + "MikeMail", + ], + "build-phases": [ + "compile-sources", + "frameworks", + "resources", + ], + "build-settings": { + "CODE_SIGN_STYLE": "Automatic", + "CURRENT_PROJECT_VERSION": "1", + "DEVELOPMENT_TEAM": "GQR972L9NJ", + "GENERATE_INFOPLIST_FILE": "YES", + "MARKETING_VERSION": "1.0", + "PRODUCT_BUNDLE_IDENTIFIER": "Dr.-med.-Michael-Ku-bler.MikeMailUITests", + "PRODUCT_NAME": "$(TARGET_NAME)", + "STRING_CATALOG_GENERATE_SYMBOLS": "NO", + "SWIFT_APPROACHABLE_CONCURRENCY": "YES", + "SWIFT_EMIT_LOC_STRINGS": "NO", + "SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY": "YES", + "SWIFT_VERSION": "5.0", + "TEST_TARGET_NAME": "MikeMail", + }, + }, + ], + "build-settings": { + "ALWAYS_SEARCH_USER_PATHS": "NO", + "ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS": "YES", + "CLANG_ANALYZER_NONNULL": "YES", + "CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION": "YES_AGGRESSIVE", + "CLANG_CXX_LANGUAGE_STANDARD": "gnu++20", + "CLANG_ENABLE_MODULES": "YES", + "CLANG_ENABLE_OBJC_ARC": "YES", + "CLANG_ENABLE_OBJC_WEAK": "YES", + "CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING": "YES", + "CLANG_WARN_BOOL_CONVERSION": "YES", + "CLANG_WARN_COMMA": "YES", + "CLANG_WARN_CONSTANT_CONVERSION": "YES", + "CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS": "YES", + "CLANG_WARN_DIRECT_OBJC_ISA_USAGE": "YES_ERROR", + "CLANG_WARN_DOCUMENTATION_COMMENTS": "YES", + "CLANG_WARN_EMPTY_BODY": "YES", + "CLANG_WARN_ENUM_CONVERSION": "YES", + "CLANG_WARN_INFINITE_RECURSION": "YES", + "CLANG_WARN_INT_CONVERSION": "YES", + "CLANG_WARN_NON_LITERAL_NULL_CONVERSION": "YES", + "CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF": "YES", + "CLANG_WARN_OBJC_LITERAL_CONVERSION": "YES", + "CLANG_WARN_OBJC_ROOT_CLASS": "YES_ERROR", + "CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER": "YES", + "CLANG_WARN_RANGE_LOOP_ANALYSIS": "YES", + "CLANG_WARN_STRICT_PROTOTYPES": "YES", + "CLANG_WARN_SUSPICIOUS_MOVE": "YES", + "CLANG_WARN_UNGUARDED_AVAILABILITY": "YES_AGGRESSIVE", + "CLANG_WARN_UNREACHABLE_CODE": "YES", + "CLANG_WARN__DUPLICATE_METHOD_MATCH": "YES", + "COPY_PHASE_STRIP": "NO", + "DEBUG_INFORMATION_FORMAT[config=Debug]": "dwarf", + "DEBUG_INFORMATION_FORMAT[config=Release]": "dwarf-with-dsym", + "DEVELOPMENT_TEAM": "GQR972L9NJ", + "ENABLE_NS_ASSERTIONS[config=Release]": "NO", + "ENABLE_STRICT_OBJC_MSGSEND": "YES", + "ENABLE_TESTABILITY[config=Debug]": "YES", + "ENABLE_USER_SCRIPT_SANDBOXING": "YES", + "GCC_C_LANGUAGE_STANDARD": "gnu17", + "GCC_DYNAMIC_NO_PIC[config=Debug]": "NO", + "GCC_NO_COMMON_BLOCKS": "YES", + "GCC_OPTIMIZATION_LEVEL[config=Debug]": "0", + "GCC_PREPROCESSOR_DEFINITIONS[config=Debug]": [ + "DEBUG=1", + "$(inherited)", + ], + "GCC_WARN_64_TO_32_BIT_CONVERSION": "YES", + "GCC_WARN_ABOUT_RETURN_TYPE": "YES_ERROR", + "GCC_WARN_UNDECLARED_SELECTOR": "YES", + "GCC_WARN_UNINITIALIZED_AUTOS": "YES_AGGRESSIVE", + "GCC_WARN_UNUSED_FUNCTION": "YES", + "GCC_WARN_UNUSED_VARIABLE": "YES", + "LOCALIZATION_PREFERS_STRING_CATALOGS": "YES", + "MACOSX_DEPLOYMENT_TARGET": "27.2", + "MTL_ENABLE_DEBUG_INFO[config=Debug]": "INCLUDE_SOURCE", + "MTL_ENABLE_DEBUG_INFO[config=Release]": "NO", + "MTL_FAST_MATH": "YES", + "ONLY_ACTIVE_ARCH[config=Debug]": "YES", + "SDKROOT": "macosx", + "SWIFT_ACTIVE_COMPILATION_CONDITIONS[config=Debug]": "DEBUG $(inherited)", + "SWIFT_COMPILATION_MODE[config=Release]": "wholemodule", + "SWIFT_OPTIMIZATION_LEVEL[config=Debug]": "-Onone", + }, + "last-upgrade": "27.2", + "last-swift-update": "27.2", +} diff --git a/MikeMail.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/MikeMail.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/MikeMail.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/MikeMail.xcodeproj/xcuserdata/michael.xcuserdatad/xcschemes/xcschememanagement.plist b/MikeMail.xcodeproj/xcuserdata/michael.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..e4c9958 --- /dev/null +++ b/MikeMail.xcodeproj/xcuserdata/michael.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + MikeMail.xcscheme_^#shared#^_ + + orderHint + 0 + + + + diff --git a/MikeMail/Assets.xcassets/AccentColor.colorset/Contents.json b/MikeMail/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/MikeMail/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/MikeMail/Assets.xcassets/AppIcon.appiconset/Contents.json b/MikeMail/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..3f00db4 --- /dev/null +++ b/MikeMail/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,58 @@ +{ + "images" : [ + { + "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" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/MikeMail/Assets.xcassets/Contents.json b/MikeMail/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/MikeMail/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/MikeMail/ContentView.swift b/MikeMail/ContentView.swift new file mode 100644 index 0000000..d2781b4 --- /dev/null +++ b/MikeMail/ContentView.swift @@ -0,0 +1,59 @@ +// +// ContentView.swift +// MikeMail +// +// Created by Dr. med. Michael Kübler on 06.11.26. +// + +import SwiftUI +import SwiftData + +struct ContentView: View { + @Environment(\.modelContext) private var modelContext + @Query private var items: [Item] + + var body: some View { + NavigationSplitView { + List { + ForEach(items) { item in + NavigationLink { + Text("Item at \(item.timestamp, format: Date.FormatStyle(date: .numeric, time: .standard))") + } label: { + Text(item.timestamp, format: Date.FormatStyle(date: .numeric, time: .standard)) + } + } + .onDelete(perform: deleteItems) + } + .navigationSplitViewColumnWidth(min: 180, ideal: 200) + .toolbar { + ToolbarItem { + Button(action: addItem) { + Label("Add Item", systemImage: "plus") + } + } + } + } detail: { + Text("Select an item") + } + } + + private func addItem() { + withAnimation { + let newItem = Item(timestamp: Date()) + modelContext.insert(newItem) + } + } + + private func deleteItems(offsets: IndexSet) { + withAnimation { + for index in offsets { + modelContext.delete(items[index]) + } + } + } +} + +#Preview { + ContentView() + .modelContainer(for: Item.self, inMemory: true) +} diff --git a/MikeMail/Item.swift b/MikeMail/Item.swift new file mode 100644 index 0000000..188cd68 --- /dev/null +++ b/MikeMail/Item.swift @@ -0,0 +1,18 @@ +// +// Item.swift +// MikeMail +// +// Created by Dr. med. Michael Kübler on 06.11.26. +// + +import Foundation +import SwiftData + +@Model +final class Item { + var timestamp: Date + + init(timestamp: Date) { + self.timestamp = timestamp + } +} diff --git a/MikeMail/MikeMailApp.swift b/MikeMail/MikeMailApp.swift new file mode 100644 index 0000000..3243767 --- /dev/null +++ b/MikeMail/MikeMailApp.swift @@ -0,0 +1,32 @@ +// +// MikeMailApp.swift +// MikeMail +// +// Created by Dr. med. Michael Kübler on 06.11.26. +// + +import SwiftUI +import SwiftData + +@main +struct MikeMailApp: App { + var sharedModelContainer: ModelContainer = { + let schema = Schema([ + Item.self, + ]) + let modelConfiguration = ModelConfiguration(schema: schema, isStoredInMemoryOnly: false) + + do { + return try ModelContainer(for: schema, configurations: [modelConfiguration]) + } catch { + fatalError("Could not create ModelContainer: \(error)") + } + }() + + var body: some Scene { + WindowGroup { + ContentView() + } + .modelContainer(sharedModelContainer) + } +} diff --git a/MikeMailTests/MikeMailTests.swift b/MikeMailTests/MikeMailTests.swift new file mode 100644 index 0000000..9ac4108 --- /dev/null +++ b/MikeMailTests/MikeMailTests.swift @@ -0,0 +1,19 @@ +// +// MikeMailTests.swift +// MikeMailTests +// +// Created by Dr. med. Michael Kübler on 06.11.26. +// + +import Testing +@testable import MikeMail + +struct MikeMailTests { + + @Test func example() async throws { + // Write your test here and use APIs like `#expect(...)` to check expected conditions. + // Swift Testing Documentation + // https://developer.apple.com/documentation/testing + } + +} diff --git a/MikeMailUITests/MikeMailUITests.swift b/MikeMailUITests/MikeMailUITests.swift new file mode 100644 index 0000000..63c1efd --- /dev/null +++ b/MikeMailUITests/MikeMailUITests.swift @@ -0,0 +1,43 @@ +// +// MikeMailUITests.swift +// MikeMailUITests +// +// Created by Dr. med. Michael Kübler on 06.11.26. +// + +import XCTest + +final class MikeMailUITests: XCTestCase { + + override func setUpWithError() throws { + // Put setup code here. This method is called before the invocation of each test method in the class. + + // In UI tests it is usually best to stop immediately when a failure occurs. + continueAfterFailure = false + + // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. + } + + override func tearDownWithError() throws { + // Put teardown code here. This method is called after the invocation of each test method in the class. + } + + @MainActor + func testExample() throws { + // UI tests must launch the application that they test. + let app = XCUIApplication() + app.launch() + + // Use XCTAssert and related functions to verify your tests produce the correct results. + // XCUIAutomation Documentation + // https://developer.apple.com/documentation/xcuiautomation + } + + @MainActor + func testLaunchPerformance() throws { + // This measures how long it takes to launch your application. + measure(metrics: [XCTApplicationLaunchMetric()]) { + XCUIApplication().launch() + } + } +}