From e2900b63b5be8205822e6025df38d110013737d6 Mon Sep 17 00:00:00 2001 From: Olof Hedman Date: Tue, 9 Sep 2025 13:22:11 +0200 Subject: [PATCH 1/4] ios: Add empty ios swift project --- ios/Klottr/Klottr.xcodeproj/project.pbxproj | 563 ++++++++++++++++++ .../contents.xcworkspacedata | 7 + .../UserInterfaceState.xcuserstate | Bin 0 -> 13150 bytes .../xcschemes/xcschememanagement.plist | 14 + .../AccentColor.colorset/Contents.json | 11 + .../AppIcon.appiconset/Contents.json | 35 ++ .../Klottr/Assets.xcassets/Contents.json | 6 + ios/Klottr/Klottr/ContentView.swift | 24 + ios/Klottr/Klottr/KlottrApp.swift | 17 + .../Preview Assets.xcassets/Contents.json | 6 + ios/Klottr/KlottrTests/KlottrTests.swift | 17 + ios/Klottr/KlottrUITests/KlottrUITests.swift | 43 ++ .../KlottrUITestsLaunchTests.swift | 33 + 13 files changed, 776 insertions(+) create mode 100644 ios/Klottr/Klottr.xcodeproj/project.pbxproj create mode 100644 ios/Klottr/Klottr.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 ios/Klottr/Klottr.xcodeproj/project.xcworkspace/xcuserdata/olle.xcuserdatad/UserInterfaceState.xcuserstate create mode 100644 ios/Klottr/Klottr.xcodeproj/xcuserdata/olle.xcuserdatad/xcschemes/xcschememanagement.plist create mode 100644 ios/Klottr/Klottr/Assets.xcassets/AccentColor.colorset/Contents.json create mode 100644 ios/Klottr/Klottr/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 ios/Klottr/Klottr/Assets.xcassets/Contents.json create mode 100644 ios/Klottr/Klottr/ContentView.swift create mode 100644 ios/Klottr/Klottr/KlottrApp.swift create mode 100644 ios/Klottr/Klottr/Preview Content/Preview Assets.xcassets/Contents.json create mode 100644 ios/Klottr/KlottrTests/KlottrTests.swift create mode 100644 ios/Klottr/KlottrUITests/KlottrUITests.swift create mode 100644 ios/Klottr/KlottrUITests/KlottrUITestsLaunchTests.swift diff --git a/ios/Klottr/Klottr.xcodeproj/project.pbxproj b/ios/Klottr/Klottr.xcodeproj/project.pbxproj new file mode 100644 index 0000000..be2db13 --- /dev/null +++ b/ios/Klottr/Klottr.xcodeproj/project.pbxproj @@ -0,0 +1,563 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 77; + objects = { + +/* Begin PBXContainerItemProxy section */ + 412CF4592E7037D800EADB15 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 412CF4402E7037D600EADB15 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 412CF4472E7037D700EADB15; + remoteInfo = Klottr; + }; + 412CF4632E7037D800EADB15 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 412CF4402E7037D600EADB15 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 412CF4472E7037D700EADB15; + remoteInfo = Klottr; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 412CF4482E7037D700EADB15 /* Klottr.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Klottr.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 412CF4582E7037D800EADB15 /* KlottrTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = KlottrTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 412CF4622E7037D800EADB15 /* KlottrUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = KlottrUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFileSystemSynchronizedRootGroup section */ + 412CF44A2E7037D700EADB15 /* Klottr */ = { + isa = PBXFileSystemSynchronizedRootGroup; + path = Klottr; + sourceTree = ""; + }; + 412CF45B2E7037D800EADB15 /* KlottrTests */ = { + isa = PBXFileSystemSynchronizedRootGroup; + path = KlottrTests; + sourceTree = ""; + }; + 412CF4652E7037D800EADB15 /* KlottrUITests */ = { + isa = PBXFileSystemSynchronizedRootGroup; + path = KlottrUITests; + sourceTree = ""; + }; +/* End PBXFileSystemSynchronizedRootGroup section */ + +/* Begin PBXFrameworksBuildPhase section */ + 412CF4452E7037D700EADB15 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 412CF4552E7037D800EADB15 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 412CF45F2E7037D800EADB15 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 412CF43F2E7037D600EADB15 = { + isa = PBXGroup; + children = ( + 412CF44A2E7037D700EADB15 /* Klottr */, + 412CF45B2E7037D800EADB15 /* KlottrTests */, + 412CF4652E7037D800EADB15 /* KlottrUITests */, + 412CF4492E7037D700EADB15 /* Products */, + ); + sourceTree = ""; + }; + 412CF4492E7037D700EADB15 /* Products */ = { + isa = PBXGroup; + children = ( + 412CF4482E7037D700EADB15 /* Klottr.app */, + 412CF4582E7037D800EADB15 /* KlottrTests.xctest */, + 412CF4622E7037D800EADB15 /* KlottrUITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 412CF4472E7037D700EADB15 /* Klottr */ = { + isa = PBXNativeTarget; + buildConfigurationList = 412CF46C2E7037D800EADB15 /* Build configuration list for PBXNativeTarget "Klottr" */; + buildPhases = ( + 412CF4442E7037D700EADB15 /* Sources */, + 412CF4452E7037D700EADB15 /* Frameworks */, + 412CF4462E7037D700EADB15 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + fileSystemSynchronizedGroups = ( + 412CF44A2E7037D700EADB15 /* Klottr */, + ); + name = Klottr; + packageProductDependencies = ( + ); + productName = Klottr; + productReference = 412CF4482E7037D700EADB15 /* Klottr.app */; + productType = "com.apple.product-type.application"; + }; + 412CF4572E7037D800EADB15 /* KlottrTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 412CF46F2E7037D800EADB15 /* Build configuration list for PBXNativeTarget "KlottrTests" */; + buildPhases = ( + 412CF4542E7037D800EADB15 /* Sources */, + 412CF4552E7037D800EADB15 /* Frameworks */, + 412CF4562E7037D800EADB15 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 412CF45A2E7037D800EADB15 /* PBXTargetDependency */, + ); + fileSystemSynchronizedGroups = ( + 412CF45B2E7037D800EADB15 /* KlottrTests */, + ); + name = KlottrTests; + packageProductDependencies = ( + ); + productName = KlottrTests; + productReference = 412CF4582E7037D800EADB15 /* KlottrTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 412CF4612E7037D800EADB15 /* KlottrUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 412CF4722E7037D800EADB15 /* Build configuration list for PBXNativeTarget "KlottrUITests" */; + buildPhases = ( + 412CF45E2E7037D800EADB15 /* Sources */, + 412CF45F2E7037D800EADB15 /* Frameworks */, + 412CF4602E7037D800EADB15 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 412CF4642E7037D800EADB15 /* PBXTargetDependency */, + ); + fileSystemSynchronizedGroups = ( + 412CF4652E7037D800EADB15 /* KlottrUITests */, + ); + name = KlottrUITests; + packageProductDependencies = ( + ); + productName = KlottrUITests; + productReference = 412CF4622E7037D800EADB15 /* KlottrUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 412CF4402E7037D600EADB15 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1610; + LastUpgradeCheck = 1610; + TargetAttributes = { + 412CF4472E7037D700EADB15 = { + CreatedOnToolsVersion = 16.1; + }; + 412CF4572E7037D800EADB15 = { + CreatedOnToolsVersion = 16.1; + TestTargetID = 412CF4472E7037D700EADB15; + }; + 412CF4612E7037D800EADB15 = { + CreatedOnToolsVersion = 16.1; + TestTargetID = 412CF4472E7037D700EADB15; + }; + }; + }; + buildConfigurationList = 412CF4432E7037D600EADB15 /* Build configuration list for PBXProject "Klottr" */; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 412CF43F2E7037D600EADB15; + minimizedProjectReferenceProxies = 1; + preferredProjectObjectVersion = 77; + productRefGroup = 412CF4492E7037D700EADB15 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 412CF4472E7037D700EADB15 /* Klottr */, + 412CF4572E7037D800EADB15 /* KlottrTests */, + 412CF4612E7037D800EADB15 /* KlottrUITests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 412CF4462E7037D700EADB15 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 412CF4562E7037D800EADB15 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 412CF4602E7037D800EADB15 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 412CF4442E7037D700EADB15 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 412CF4542E7037D800EADB15 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 412CF45E2E7037D800EADB15 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 412CF45A2E7037D800EADB15 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 412CF4472E7037D700EADB15 /* Klottr */; + targetProxy = 412CF4592E7037D800EADB15 /* PBXContainerItemProxy */; + }; + 412CF4642E7037D800EADB15 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 412CF4472E7037D700EADB15 /* Klottr */; + targetProxy = 412CF4632E7037D800EADB15 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 412CF46A2E7037D800EADB15 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + 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 = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "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; + IPHONEOS_DEPLOYMENT_TARGET = 18.1; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 412CF46B2E7037D800EADB15 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + 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 = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_NO_COMMON_BLOCKS = YES; + 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; + IPHONEOS_DEPLOYMENT_TARGET = 18.1; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 412CF46D2E7037D800EADB15 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"Klottr/Preview Content\""; + DEVELOPMENT_TEAM = 9LY47TPGT7; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = se.ointressant.Klottr; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 412CF46E2E7037D800EADB15 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"Klottr/Preview Content\""; + DEVELOPMENT_TEAM = 9LY47TPGT7; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = se.ointressant.Klottr; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 412CF4702E7037D800EADB15 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 9LY47TPGT7; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 18.1; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = se.ointressant.KlottrTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Klottr.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Klottr"; + }; + name = Debug; + }; + 412CF4712E7037D800EADB15 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 9LY47TPGT7; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 18.1; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = se.ointressant.KlottrTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Klottr.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Klottr"; + }; + name = Release; + }; + 412CF4732E7037D800EADB15 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 9LY47TPGT7; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = se.ointressant.KlottrUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = Klottr; + }; + name = Debug; + }; + 412CF4742E7037D800EADB15 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 9LY47TPGT7; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = se.ointressant.KlottrUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = Klottr; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 412CF4432E7037D600EADB15 /* Build configuration list for PBXProject "Klottr" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 412CF46A2E7037D800EADB15 /* Debug */, + 412CF46B2E7037D800EADB15 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 412CF46C2E7037D800EADB15 /* Build configuration list for PBXNativeTarget "Klottr" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 412CF46D2E7037D800EADB15 /* Debug */, + 412CF46E2E7037D800EADB15 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 412CF46F2E7037D800EADB15 /* Build configuration list for PBXNativeTarget "KlottrTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 412CF4702E7037D800EADB15 /* Debug */, + 412CF4712E7037D800EADB15 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 412CF4722E7037D800EADB15 /* Build configuration list for PBXNativeTarget "KlottrUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 412CF4732E7037D800EADB15 /* Debug */, + 412CF4742E7037D800EADB15 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 412CF4402E7037D600EADB15 /* Project object */; +} diff --git a/ios/Klottr/Klottr.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ios/Klottr/Klottr.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/ios/Klottr/Klottr.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/ios/Klottr/Klottr.xcodeproj/project.xcworkspace/xcuserdata/olle.xcuserdatad/UserInterfaceState.xcuserstate b/ios/Klottr/Klottr.xcodeproj/project.xcworkspace/xcuserdata/olle.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000000000000000000000000000000000000..f3a75259953eecafbdde6f603bd27558a15ba2b8 GIT binary patch literal 13150 zcmeHtd3aOR*7qLLG)>YbO-s|HX%jNF3ACkj0w-u`3uP#U4$RcFJuQJWsYwbga&<>V zMa5ZhLTSr9IH5Qr&dMMHiinC{@2Bta2KiXxGGx^*Gv54e5a8CI9SZk`*SDy>0Z^K`4Pc0N}Z z3}_I(aaE04RaP;9Yvbw*x`_568H%c^2)cqC!%xKGOOXO8krpK)9m+=|&`5L%x)fc8 zE=O0OQD`(OK!s=wDnjE>8Jdi$&~!8x)gTUCix>)_>(KS+2DB92h;BkRqh;t8bUV5a z-H%qF$IvR&jy9pqXbXBAJ%P5OZRkbx3VI8@jov{!(Jr(beTF_qN6;7OOY~3l75W;T zLf@kA(D&#EbQ+ySzoOsJALuU}iDftn%dr~AVhxVRTAYLjV;fGx!*Mpw!MXTSd>I~% z$KX;t9+%;%csibeXX7Al!3*&s+=|=qVth4Tg8zZ9!PjDjL-;y;J-z`i#W&+e@JjqB zehja|?YIMX;?;N!ehxp6U%)Tom+;H@6}%n4i{HaL@hEPhw-QQGyE0)8Xw0e z@OSuUdm&sf0#QDUGBu8b#$)K~*$?rcfg_(KPCy*))gd(mZ+z zy@Hm}$+VnKp;KuEt)x|S4xLMD={)MDS5ZG*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gj)RV`9cLYXIhD>hXM$7bG&n6zyEDx>#F_5QbB=KqIg6cRou$rd=M3j; zXN|MgS?_Fe`kgJ#R_9{pP0rh$cRBBMu5do;Yw{^qrv+C literal 0 HcmV?d00001 diff --git a/ios/Klottr/Klottr.xcodeproj/xcuserdata/olle.xcuserdatad/xcschemes/xcschememanagement.plist b/ios/Klottr/Klottr.xcodeproj/xcuserdata/olle.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..9f6a586 --- /dev/null +++ b/ios/Klottr/Klottr.xcodeproj/xcuserdata/olle.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Klottr.xcscheme_^#shared#^_ + + orderHint + 0 + + + + diff --git a/ios/Klottr/Klottr/Assets.xcassets/AccentColor.colorset/Contents.json b/ios/Klottr/Klottr/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/ios/Klottr/Klottr/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ios/Klottr/Klottr/Assets.xcassets/AppIcon.appiconset/Contents.json b/ios/Klottr/Klottr/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..2305880 --- /dev/null +++ b/ios/Klottr/Klottr/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,35 @@ +{ + "images" : [ + { + "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" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ios/Klottr/Klottr/Assets.xcassets/Contents.json b/ios/Klottr/Klottr/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/ios/Klottr/Klottr/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ios/Klottr/Klottr/ContentView.swift b/ios/Klottr/Klottr/ContentView.swift new file mode 100644 index 0000000..c29691d --- /dev/null +++ b/ios/Klottr/Klottr/ContentView.swift @@ -0,0 +1,24 @@ +// +// ContentView.swift +// Klottr +// +// Created by Olof Hedman on 2025-09-09. +// + +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/ios/Klottr/Klottr/KlottrApp.swift b/ios/Klottr/Klottr/KlottrApp.swift new file mode 100644 index 0000000..be665cb --- /dev/null +++ b/ios/Klottr/Klottr/KlottrApp.swift @@ -0,0 +1,17 @@ +// +// KlottrApp.swift +// Klottr +// +// Created by Olof Hedman on 2025-09-09. +// + +import SwiftUI + +@main +struct KlottrApp: App { + var body: some Scene { + WindowGroup { + ContentView() + } + } +} diff --git a/ios/Klottr/Klottr/Preview Content/Preview Assets.xcassets/Contents.json b/ios/Klottr/Klottr/Preview Content/Preview Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/ios/Klottr/Klottr/Preview Content/Preview Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ios/Klottr/KlottrTests/KlottrTests.swift b/ios/Klottr/KlottrTests/KlottrTests.swift new file mode 100644 index 0000000..45c33f0 --- /dev/null +++ b/ios/Klottr/KlottrTests/KlottrTests.swift @@ -0,0 +1,17 @@ +// +// KlottrTests.swift +// KlottrTests +// +// Created by Olof Hedman on 2025-09-09. +// + +import Testing +@testable import Klottr + +struct KlottrTests { + + @Test func example() async throws { + // Write your test here and use APIs like `#expect(...)` to check expected conditions. + } + +} diff --git a/ios/Klottr/KlottrUITests/KlottrUITests.swift b/ios/Klottr/KlottrUITests/KlottrUITests.swift new file mode 100644 index 0000000..8d66a8a --- /dev/null +++ b/ios/Klottr/KlottrUITests/KlottrUITests.swift @@ -0,0 +1,43 @@ +// +// KlottrUITests.swift +// KlottrUITests +// +// Created by Olof Hedman on 2025-09-09. +// + +import XCTest + +final class KlottrUITests: 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. + } + + @MainActor + func testLaunchPerformance() throws { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *) { + // This measures how long it takes to launch your application. + measure(metrics: [XCTApplicationLaunchMetric()]) { + XCUIApplication().launch() + } + } + } +} diff --git a/ios/Klottr/KlottrUITests/KlottrUITestsLaunchTests.swift b/ios/Klottr/KlottrUITests/KlottrUITestsLaunchTests.swift new file mode 100644 index 0000000..8c388c4 --- /dev/null +++ b/ios/Klottr/KlottrUITests/KlottrUITestsLaunchTests.swift @@ -0,0 +1,33 @@ +// +// KlottrUITestsLaunchTests.swift +// KlottrUITests +// +// Created by Olof Hedman on 2025-09-09. +// + +import XCTest + +final class KlottrUITestsLaunchTests: XCTestCase { + + override class var runsForEachTargetApplicationUIConfiguration: Bool { + true + } + + override func setUpWithError() throws { + continueAfterFailure = false + } + + @MainActor + func testLaunch() throws { + let app = XCUIApplication() + app.launch() + + // Insert steps here to perform after app launch but before taking a screenshot, + // such as logging into a test account or navigating somewhere in the app + + let attachment = XCTAttachment(screenshot: app.screenshot()) + attachment.name = "Launch Screen" + attachment.lifetime = .keepAlways + add(attachment) + } +} From 143a4666b48333834edd58362b33f906be2c5cc4 Mon Sep 17 00:00:00 2001 From: Olof Hedman Date: Tue, 9 Sep 2025 15:07:12 +0200 Subject: [PATCH 2/4] ios: Implement KvPrefs using NSUserDefaults --- .../kotlin/app/klottr/prefs/KvPrefs.kt | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 shared/src/iosMain/kotlin/app/klottr/prefs/KvPrefs.kt diff --git a/shared/src/iosMain/kotlin/app/klottr/prefs/KvPrefs.kt b/shared/src/iosMain/kotlin/app/klottr/prefs/KvPrefs.kt new file mode 100644 index 0000000..3c16019 --- /dev/null +++ b/shared/src/iosMain/kotlin/app/klottr/prefs/KvPrefs.kt @@ -0,0 +1,77 @@ +package app.klottr.prefs + +import platform.Foundation.NSBundle +import platform.Foundation.NSUserDefaults + +actual object KvPrefs { + private val d: NSUserDefaults by lazy { NSUserDefaults.standardUserDefaults() } + private val listeners = mutableSetOf<(String?) -> Unit>() + + actual fun init(platformArg: Any?) { + // iOS needs no arg; kept for parity with Android. + } + + actual fun getString(key: String, def: String?): String? = + d.stringForKey(key) ?: def + + actual fun putString(key: String, value: String?) { + if (value == null) d.removeObjectForKey(key) + else d.setObject(value, forKey = key) + notifyChanged(key) + } + + actual fun getInt(key: String, def: Int): Int = + if (d.objectForKey(key) == null) def else d.integerForKey(key).toInt() + + actual fun putInt(key: String, value: Int) { + d.setInteger(value.toLong(), forKey = key) + notifyChanged(key) + } + + actual fun getBoolean(key: String, def: Boolean): Boolean = + if (d.objectForKey(key) == null) def else d.boolForKey(key) + + actual fun putBoolean(key: String, value: Boolean) { + d.setBool(value, forKey = key) + notifyChanged(key) + } + + actual fun getStringSet(key: String): Set { + // Stored as NSArray in defaults + val arr = d.arrayForKey(key) as? List<*> + return arr?.mapNotNull { it as? String }?.toSet() ?: emptySet() + } + + actual fun putStringSet(key: String, value: Set) { + d.setObject(value.toList(), forKey = key) + notifyChanged(key) + } + + actual fun remove(key: String) { + d.removeObjectForKey(key) + notifyChanged(key) + } + + actual fun clearAll() { + // Clear this app's domain + val domain = NSBundle.mainBundle.bundleIdentifier + if (domain != null) { + d.removePersistentDomainForName(domain) + notifyChanged(null) + } + } + + actual fun addListener(listener: (key: String?) -> Unit) { + listeners.add(listener) + } + + actual fun removeListener(listener: (key: String?) -> Unit) { + listeners.remove(listener) + } + + private fun notifyChanged(key: String?) { + // Snapshot to avoid concurrent modification if listeners add/remove inside callback + val snapshot = listeners.toList() + snapshot.forEach { it.invoke(key) } + } +} From 19bf1258c01e36c03844f2f2d9131417ed04e038 Mon Sep 17 00:00:00 2001 From: Olof Hedman Date: Tue, 9 Sep 2025 15:09:51 +0200 Subject: [PATCH 3/4] refactor(shared): Move FoundStore to commonMain in shared library FoundStore no longer ensure migration (which is unecessary since KvPrefs use SharedPreferences anyhow) Had to rename Geo.kt in shared to SharedGeo.kt because it collided with Geo.kt in app for some reason --- .../kotlin/app/klottr/util/FoundStore.kt | 206 ------------------ .../kotlin/app/klottr/util/FoundStore.kt | 125 +++++++++-- .../app/klottr/util/{Geo.kt => SharedGeo.kt} | 0 3 files changed, 105 insertions(+), 226 deletions(-) delete mode 100644 shared/src/androidMain/kotlin/app/klottr/util/FoundStore.kt rename shared/src/commonMain/kotlin/app/klottr/util/{Geo.kt => SharedGeo.kt} (100%) diff --git a/shared/src/androidMain/kotlin/app/klottr/util/FoundStore.kt b/shared/src/androidMain/kotlin/app/klottr/util/FoundStore.kt deleted file mode 100644 index da44075..0000000 --- a/shared/src/androidMain/kotlin/app/klottr/util/FoundStore.kt +++ /dev/null @@ -1,206 +0,0 @@ -package app.klottr.util - -import android.content.Context -import app.klottr.prefs.KvPrefs -import org.json.JSONObject - -actual object FoundStore { - private const val KEY_KEYS = "keys" // StringSet med "layer|id" - private const val MIGRATED_FLAG = "__found_migrated_v1" // migration från legacy prefs - private const val LEGACY_PREF = "klottr_found_store" - private const val AWAY_THRESHOLD_METERS = 200 - - actual val LAYER_KLOTTER: String = "klotter" - actual val LAYER_WIKI: String = "wiki" - actual val LAYER_DM: String = "dm" - - private fun key(layer: String, id: String) = "$layer|$id" - - /** Migrera gamla FoundStore-poster från separat SharedPreferences till KvPrefs (engångs). */ - private fun ensureMigrated(ctx: Any?) { - if (KvPrefs.getBoolean(MIGRATED_FLAG, false)) return - val context = ctx as? Context ?: return - val legacy = context.getSharedPreferences(LEGACY_PREF, Context.MODE_PRIVATE) - val legacyKeys = legacy.getStringSet(KEY_KEYS, emptySet()) ?: emptySet() - if (legacyKeys.isEmpty()) { - KvPrefs.putBoolean(MIGRATED_FLAG, true) - return - } - // slå ihop med ev. befintligt i KvPrefs - val cur = KvPrefs.getStringSet(KEY_KEYS).toMutableSet() - cur.addAll(legacyKeys) - KvPrefs.putStringSet(KEY_KEYS, cur) - // flytta varje post - for (k in legacyKeys) { - legacy.getString(k, null)?.let { KvPrefs.putString(k, it) } - } - KvPrefs.putBoolean(MIGRATED_FLAG, true) - // OBS: vi tömmer inte legacy prefs här – ofarligt att låta dem vara kvar. - } - - actual fun isFound(ctx: Any?, layer: String, id: String): Boolean { - ensureMigrated(ctx) - val k = key(layer, id) - val set = KvPrefs.getStringSet(KEY_KEYS) - return k in set - } - - actual fun markFound( - ctx: Any?, - layer: String, - id: String, - label: String, - lat: Double, - lon: Double, - timeMillis: Long - ): Boolean { - ensureMigrated(ctx) - val k = key(layer, id) - val set = KvPrefs.getStringSet(KEY_KEYS).toMutableSet() - - val existingJson = KvPrefs.getString(k, null) - val existed = existingJson != null - val prev = try { if (existingJson != null) JSONObject(existingJson) else null } catch (_: Throwable) { null } - - val wasAway = prev?.optBoolean("away", false) ?: false - - val firstVisit = prev?.optLong("first_visit", -1L)?.takeIf { it > 0 } - ?: (prev?.optLong("time", timeMillis) ?: timeMillis) - val lastVisit = timeMillis - - val oldLabel = (prev?.optString("label", "") ?: "").trim() - val incoming = label.trim() - val betterIncoming = incoming.isNotBlank() && !incoming.equals("Okänt klotter", ignoreCase = true) - val newLabel = when { - betterIncoming -> incoming - oldLabel.isNotBlank() -> oldLabel - else -> incoming - } - - val obj = (prev ?: JSONObject()).apply { - put("layer", layer) - put("id", id) - put("label", newLabel) - put("lat", lat) - put("lon", lon) - put("time", lastVisit) // legacy-fält - put("first_visit", firstVisit) - put("last_visit", lastVisit) - put("away", false) // vi är "inne" igen - } - - KvPrefs.putString(k, obj.toString()) - if (!set.contains(k)) { - set.add(k) - KvPrefs.putStringSet(KEY_KEYS, set) - } - // Ny träff om första gång(en) eller om vi varit "away" tidigare - return !existed || wasAway - } - - actual fun isAway(ctx: Any?, layer: String, id: String): Boolean { - ensureMigrated(ctx) - val k = key(layer, id) - val js = KvPrefs.getString(k, null) ?: return false - return try { JSONObject(js).optBoolean("away", false) } catch (_: Throwable) { false } - } - - actual fun getFirstVisitMillis(ctx: Any?, layer: String, id: String): Long? { - ensureMigrated(ctx) - val js = KvPrefs.getString(key(layer, id), null) ?: return null - return try { - val obj = JSONObject(js) - when { - obj.has("first_visit") -> obj.optLong("first_visit") - obj.has("time") -> obj.optLong("time") - else -> null - } - } catch (_: Throwable) { null } - } - - actual fun getLastVisitMillis(ctx: Any?, layer: String, id: String): Long? { - ensureMigrated(ctx) - val js = KvPrefs.getString(key(layer, id), null) ?: return null - return try { - val obj = JSONObject(js) - when { - obj.has("last_visit") -> obj.optLong("last_visit") - obj.has("time") -> obj.optLong("time") - else -> null - } - } catch (_: Throwable) { null } - } - - actual fun updateAwayFlags(ctx: Any?, currentLat: Double, currentLon: Double, thresholdMeters: Int) { - ensureMigrated(ctx) - val keys = KvPrefs.getStringSet(KEY_KEYS) - if (keys.isEmpty()) return - - var touched = false - for (k in keys) { - val js = KvPrefs.getString(k, null) ?: continue - val obj = try { JSONObject(js) } catch (_: Throwable) { continue } - - val lat = obj.optDouble("lat", Double.NaN) - val lon = obj.optDouble("lon", Double.NaN) - if (lat.isNaN() || lon.isNaN()) continue - - val dist = distanceMeters(currentLat, currentLon, lat, lon) - val isAway = obj.optBoolean("away", false) - - if (dist > thresholdMeters && !isAway) { - obj.put("away", true) - KvPrefs.putString(k, obj.toString()) - touched = true - } - } - // inget behov av extra skrivning för KEY_KEYS här - // touched används ej, men kvar om vi i framtiden vill signalera ändring - @Suppress("UNUSED_VARIABLE") - touched - } - - actual fun remove(ctx: Any?, layer: String, id: String) { - ensureMigrated(ctx) - val k = key(layer, id) - val set = KvPrefs.getStringSet(KEY_KEYS).toMutableSet() - if (!set.remove(k)) return - KvPrefs.putStringSet(KEY_KEYS, set) - KvPrefs.remove(k) - } - - actual fun getAll(ctx: Any?): List { - ensureMigrated(ctx) - val set = KvPrefs.getStringSet(KEY_KEYS) - if (set.isEmpty()) return emptyList() - val list = ArrayList(set.size) - for (k in set) { - val s = KvPrefs.getString(k, null) ?: continue - try { - val o = JSONObject(s) - list += FoundEntry( - layer = o.optString("layer"), - id = o.optString("id"), - label = o.optString("label"), - lat = o.optDouble("lat"), - lon = o.optDouble("lon"), - timeMillis = o.optLong("time") - ) - } catch (_: Throwable) { - // Ignorera trasiga poster - } - } - return list.sortedByDescending { it.timeMillis } - } - - actual fun clearAll(ctx: Any?) { - ensureMigrated(ctx) - // Rensa endast FoundStore’s nycklar – inte hela KvPrefs - val set = KvPrefs.getStringSet(KEY_KEYS) - if (set.isEmpty()) return - for (k in set) { - KvPrefs.remove(k) - } - KvPrefs.putStringSet(KEY_KEYS, emptySet()) - } -} diff --git a/shared/src/commonMain/kotlin/app/klottr/util/FoundStore.kt b/shared/src/commonMain/kotlin/app/klottr/util/FoundStore.kt index 54d70e5..272f8ff 100644 --- a/shared/src/commonMain/kotlin/app/klottr/util/FoundStore.kt +++ b/shared/src/commonMain/kotlin/app/klottr/util/FoundStore.kt @@ -1,17 +1,55 @@ package app.klottr.util -expect object FoundStore { - // Lager (samma som tidigare) - val LAYER_KLOTTER: String - val LAYER_WIKI: String - val LAYER_DM: String +import app.klottr.prefs.KvPrefs +import kotlinx.serialization.Serializable +import kotlinx.serialization.json.Json +import kotlin.math.* - fun isFound(ctx: Any?, layer: String, id: String): Boolean +@Serializable +private data class FoundRecord( + val layer: String, + val id: String, + val label: String, + val lat: Double, + val lon: Double, + val first_visit: Long, + val last_visit: Long, + val away: Boolean +) +object FoundStore { + private const val KEY_KEYS = "keys" // Set of "layer|id" + // keep your layer constants + val LAYER_KLOTTER: String = "klotter" + val LAYER_WIKI: String = "wiki" + val LAYER_DM: String = "dm" + + private val json = Json { ignoreUnknownKeys = true } + private fun key(layer: String, id: String) = "$layer|$id" + + // ---- queries ---- /** * Markera som funnet. Sparar första fyndtiden; uppdaterar inte om det redan finns. * @return true om nytt fynd sparades, annars false (även true om ”re-armed” efter away). */ + fun isFound(ctx: Any?, layer: String, id: String): Boolean = + key(layer, id) in KvPrefs.getStringSet(KEY_KEYS) + + fun isAway(ctx: Any?, layer: String, id: String): Boolean = + KvPrefs.getString(key(layer, id), null) + ?.let { runCatching { json.decodeFromString(FoundRecord.serializer(), it) }.getOrNull()?.away } + ?: false + + fun getFirstVisitMillis(ctx: Any?, layer: String, id: String): Long? = + KvPrefs.getString(key(layer, id), null) + ?.let { runCatching { json.decodeFromString(FoundRecord.serializer(), it) }.getOrNull()?.first_visit } + + fun getLastVisitMillis(ctx: Any?, layer: String, id: String): Long? = + KvPrefs.getString(key(layer, id), null) + ?.let { runCatching { json.decodeFromString(FoundRecord.serializer(), it) }.getOrNull()?.last_visit } + + // ---- mutations ---- + /** Returns true if it was new or previously marked away. */ fun markFound( ctx: Any?, layer: String, @@ -20,27 +58,74 @@ expect object FoundStore { lat: Double, lon: Double, timeMillis: Long - ): Boolean + ): Boolean { + val k = key(layer, id) + val prev = KvPrefs.getString(k, null) + ?.let { runCatching { json.decodeFromString(FoundRecord.serializer(), it) }.getOrNull() } - fun isAway(ctx: Any?, layer: String, id: String): Boolean - fun getFirstVisitMillis(ctx: Any?, layer: String, id: String): Long? - fun getLastVisitMillis(ctx: Any?, layer: String, id: String): Long? + val wasAway = prev?.away ?: false + val firstVisit = prev?.first_visit?.takeIf { it > 0 } ?: (prev?.last_visit ?: timeMillis) + val newLabel = if (label.isNotBlank()) label else (prev?.label ?: "") + + val rec = FoundRecord( + layer = layer, id = id, label = newLabel, + lat = lat, lon = lon, + first_visit = firstVisit, + last_visit = timeMillis, + away = false + ) + KvPrefs.putString(k, json.encodeToString(FoundRecord.serializer(), rec)) + + val set = KvPrefs.getStringSet(KEY_KEYS).toMutableSet() + if (set.add(k)) KvPrefs.putStringSet(KEY_KEYS, set) + + return prev == null || wasAway + } /** * Sätt away=true för alla sparade fynd där nuvarande position är > tröskeln. */ - fun updateAwayFlags( - ctx: Any?, - currentLat: Double, - currentLon: Double, - thresholdMeters: Int = 200 - ) + fun updateAwayFlags(ctx: Any?, currentLat: Double, currentLon: Double, thresholdMeters: Int = 200) { + val keys = KvPrefs.getStringSet(KEY_KEYS) + if (keys.isEmpty()) return + for (k in keys) { + val rec = KvPrefs.getString(k, null) + ?.let { runCatching { json.decodeFromString(FoundRecord.serializer(), it) }.getOrNull() } + ?: continue + if (!rec.away && distanceMeters(currentLat, currentLon, rec.lat, rec.lon) > thresholdMeters) { + KvPrefs.putString(k, json.encodeToString(FoundRecord.serializer(), rec.copy(away = true))) + } + } + } - fun remove(ctx: Any?, layer: String, id: String) + fun remove(ctx: Any?, layer: String, id: String) { + val k = key(layer, id) + val set = KvPrefs.getStringSet(KEY_KEYS).toMutableSet() + if (set.remove(k)) KvPrefs.putStringSet(KEY_KEYS, set) + KvPrefs.remove(k) + } /** Hämtar alla fynd (senaste först). */ - fun getAll(ctx: Any?): List + fun getAll(ctx: Any?): List { + val set = KvPrefs.getStringSet(KEY_KEYS) + if (set.isEmpty()) return emptyList() + return buildList(set.size) { + for (k in set) { + val rec = KvPrefs.getString(k, null) + ?.let { runCatching { json.decodeFromString(FoundRecord.serializer(), it) }.getOrNull() } + ?: continue + // Adjust ctor if your FoundEntry differs + add(FoundEntry(rec.layer, rec.id, rec.label, rec.lat, rec.lon, rec.last_visit)) + } + }.sortedByDescending { it.timeMillis } + } /** Rensar alla fynd (endast FoundStore’s nycklar, inte övriga inställningar). */ - fun clearAll(ctx: Any?) -} \ No newline at end of file + fun clearAll(ctx: Any?) { + val set = KvPrefs.getStringSet(KEY_KEYS) + if (set.isEmpty()) return + for (k in set) KvPrefs.remove(k) + KvPrefs.putStringSet(KEY_KEYS, emptySet()) + } + +} diff --git a/shared/src/commonMain/kotlin/app/klottr/util/Geo.kt b/shared/src/commonMain/kotlin/app/klottr/util/SharedGeo.kt similarity index 100% rename from shared/src/commonMain/kotlin/app/klottr/util/Geo.kt rename to shared/src/commonMain/kotlin/app/klottr/util/SharedGeo.kt From fa1f3ec14341d3fd1c16b939c6903b74b3dd95a3 Mon Sep 17 00:00:00 2001 From: Olof Hedman Date: Tue, 9 Sep 2025 15:42:15 +0200 Subject: [PATCH 4/4] config: update kotlin to 2.2.10 for proper compose support on ios --- gradle/libs.versions.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 87af099..5c4abe1 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,6 +1,6 @@ [versions] agp = "8.12.2" -kotlin = "2.1.21" +kotlin = "2.2.10" coreKtx = "1.16.0" junit = "4.13.2" junitVersion = "1.3.0" @@ -14,7 +14,7 @@ runner = "1.5.2" core = "1.5.0" ktor = "3.2.3" kotlinxSerialization = "1.7.3" -ksp = "2.1.21-2.0.1" +ksp = "2.2.10-2.0.2"