From 0dedf94a989f577ed4a398ca17e11d8fe034b526 Mon Sep 17 00:00:00 2001 From: Blake McAnally Date: Mon, 3 Jun 2024 19:05:58 -0500 Subject: [PATCH] General Project Cleanup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Change SwiftLint from a "Run Script" build phase to a "Run Build Tool Plugins" build phase. * Developers no longer need to install and update SwiftLint manually. This can be useful when other projects are using different versions of SwiftLint. * [SwiftLint Docs](https://github.com/realm/SwiftLint?tab=readme-ov-file#xcode-projects) * [WWDC 22 - Meet Swift Package Plugins](https://developer.apple.com/videos/play/wwdc2022/110359/?time=162) * Moved several scripts into a `.scripts` directory to keep the project root organized. * Modified `.scripts/gen_protos.sh` to intelligently update git submodules and install `swift-protobuf` when it detects issues, reducing developer friction. * Deleted the empty unit and UI testing targets. These can be added later as we write tests. someday ๐Ÿ™ * Updated the README.md to reflect the above changes, and organized a few of the sections. --- gen_protos.sh => .scripts/gen_protos.sh | 8 +- thebenternify.sh => .scripts/thebenternify.sh | 0 .../unthebenternify.sh | 0 Meshtastic.xcodeproj/project.pbxproj | 184 +++--------------- .../xcshareddata/swiftpm/Package.resolved | 51 ----- .../xcschemes/WidgetsExtension.xcscheme | 1 - MeshtasticTests/Info.plist | 22 --- MeshtasticTests/MeshtasticTests.swift | 37 ---- MeshtasticUITests/Info.plist | 22 --- MeshtasticUITests/MeshtasticUITests.swift | 42 ---- README.md | 52 ++--- 11 files changed, 61 insertions(+), 358 deletions(-) rename gen_protos.sh => .scripts/gen_protos.sh (60%) rename thebenternify.sh => .scripts/thebenternify.sh (100%) rename unthebenternify.sh => .scripts/unthebenternify.sh (100%) delete mode 100644 Meshtastic.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved delete mode 100644 MeshtasticTests/Info.plist delete mode 100644 MeshtasticTests/MeshtasticTests.swift delete mode 100644 MeshtasticUITests/Info.plist delete mode 100644 MeshtasticUITests/MeshtasticUITests.swift diff --git a/gen_protos.sh b/.scripts/gen_protos.sh similarity index 60% rename from gen_protos.sh rename to .scripts/gen_protos.sh index b829095f..ae079a75 100755 --- a/gen_protos.sh +++ b/.scripts/gen_protos.sh @@ -1,15 +1,13 @@ #!/bin/bash # simple sanity checking for repo -if [ ! -d "./protobufs" ]; then - echo 'Please check out the protobuf submodule by running: `git submodule update --init`' - exit +if [ ! -d "./../protobufs" ]; then + git submodule update --init fi # simple sanity checking for executable if [ ! -x "$(which protoc)" ]; then - echo 'Please install swift-protobuf by running: `brew install swift-protobuf`' - exit + brew install swift-protobuf fi protoc --proto_path=./protobufs --swift_out=./Meshtastic/Protobufs ./protobufs/meshtastic/*.proto diff --git a/thebenternify.sh b/.scripts/thebenternify.sh similarity index 100% rename from thebenternify.sh rename to .scripts/thebenternify.sh diff --git a/unthebenternify.sh b/.scripts/unthebenternify.sh similarity index 100% rename from unthebenternify.sh rename to .scripts/unthebenternify.sh diff --git a/Meshtastic.xcodeproj/project.pbxproj b/Meshtastic.xcodeproj/project.pbxproj index cb1f6722..1c0f9b2f 100644 --- a/Meshtastic.xcodeproj/project.pbxproj +++ b/Meshtastic.xcodeproj/project.pbxproj @@ -156,7 +156,6 @@ DDC2E15826CE248E0042C5E4 /* MeshtasticApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDC2E15726CE248E0042C5E4 /* MeshtasticApp.swift */; }; DDC2E15C26CE248F0042C5E4 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DDC2E15B26CE248F0042C5E4 /* Assets.xcassets */; }; DDC2E15F26CE248F0042C5E4 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DDC2E15E26CE248F0042C5E4 /* Preview Assets.xcassets */; }; - DDC2E17A26CE248F0042C5E4 /* MeshtasticUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDC2E17926CE248F0042C5E4 /* MeshtasticUITests.swift */; }; DDC2E18F26CE25FE0042C5E4 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDC2E18E26CE25FE0042C5E4 /* ContentView.swift */; }; DDC2E1A726CEB3400042C5E4 /* LocationHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDC2E1A626CEB3400042C5E4 /* LocationHelper.swift */; }; DDC3B274283F411B00AC321C /* LastHeardText.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDC3B273283F411B00AC321C /* LastHeardText.swift */; }; @@ -214,13 +213,6 @@ /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - DDC2E17626CE248F0042C5E4 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = DDC2E14C26CE248E0042C5E4 /* Project object */; - proxyType = 1; - remoteGlobalIDString = DDC2E15326CE248E0042C5E4; - remoteInfo = MeshtasticClient; - }; DDDE5A0129AF163E00490C6C /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = DDC2E14C26CE248E0042C5E4 /* Project object */; @@ -246,6 +238,7 @@ /* Begin PBXFileReference section */ 25183D452C0A6D97001E31D5 /* Logger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Logger.swift; sourceTree = ""; }; + 258EE1262C0E833D0025A5FB /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; 6DA39D8D2A92DC52007E311C /* MeshtasticAppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MeshtasticAppDelegate.swift; sourceTree = ""; }; 6DEDA5592A957B8E00321D2E /* DetectionSensorLog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DetectionSensorLog.swift; sourceTree = ""; }; 6DEDA55B2A9592F900321D2E /* MessageEntityExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageEntityExtension.swift; sourceTree = ""; }; @@ -422,10 +415,6 @@ DDC2E15B26CE248F0042C5E4 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = ../Assets.xcassets; sourceTree = ""; }; DDC2E15E26CE248F0042C5E4 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; DDC2E16526CE248F0042C5E4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - DDC2E17026CE248F0042C5E4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - DDC2E17526CE248F0042C5E4 /* MeshtasticUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MeshtasticUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - DDC2E17926CE248F0042C5E4 /* MeshtasticUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MeshtasticUITests.swift; sourceTree = ""; }; - DDC2E17B26CE248F0042C5E4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; DDC2E18E26CE25FE0042C5E4 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; DDC2E1A626CEB3400042C5E4 /* LocationHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocationHelper.swift; sourceTree = ""; }; DDC3B273283F411B00AC321C /* LastHeardText.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LastHeardText.swift; sourceTree = ""; }; @@ -441,7 +430,6 @@ DDCE4E2B2869F92900BE9F8F /* UserConfig.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserConfig.swift; sourceTree = ""; }; DDD28D362C0CCCD10063CFA3 /* pt-PT */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "pt-PT"; path = "pt-PT.lproj/Localizable.strings"; sourceTree = ""; }; DDD28D372C0CD2670063CFA3 /* MeshtasticDataModelV 37.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "MeshtasticDataModelV 37.xcdatamodel"; sourceTree = ""; }; - DDD3BBD4292D763200D609B3 /* MeshtasticTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MeshtasticTests.swift; sourceTree = ""; }; DDD43FE22A78C8900083A3E9 /* MqttClientProxyManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MqttClientProxyManager.swift; sourceTree = ""; }; DDD6EEAE29BC024700383354 /* Firmware.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Firmware.swift; sourceTree = ""; }; DDD94A4F2845C8F5004A87A0 /* DateTimeText.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DateTimeText.swift; sourceTree = ""; }; @@ -509,13 +497,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - DDC2E17226CE248F0042C5E4 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; DDDE59F129AF163D00490C6C /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -794,12 +775,11 @@ DDC2E14B26CE248E0042C5E4 = { isa = PBXGroup; children = ( + 258EE1262C0E833D0025A5FB /* README.md */, DDDBC87A2BC62E4E001E8DF7 /* Settings.bundle */, DDCDC6CD29481FCC004C1DDA /* Localizable.strings */, DD3CC6BA28E366DF00FA9159 /* Meshtastic.xcdatamodeld */, DDC2E15626CE248E0042C5E4 /* Meshtastic */, - DDC2E16D26CE248F0042C5E4 /* MeshtasticTests */, - DDC2E17826CE248F0042C5E4 /* MeshtasticUITests */, DDDE59F729AF163D00490C6C /* Widgets */, DDC2E15526CE248E0042C5E4 /* Products */, DD8EDE9226F97A2B00A5A10B /* Frameworks */, @@ -811,7 +791,6 @@ isa = PBXGroup; children = ( DDC2E15426CE248E0042C5E4 /* Meshtastic.app */, - DDC2E17526CE248F0042C5E4 /* MeshtasticUITests.xctest */, DDDE59F429AF163D00490C6C /* WidgetsExtension.appex */, ); name = Products; @@ -847,24 +826,6 @@ path = "Preview Content"; sourceTree = ""; }; - DDC2E16D26CE248F0042C5E4 /* MeshtasticTests */ = { - isa = PBXGroup; - children = ( - DDD3BBD4292D763200D609B3 /* MeshtasticTests.swift */, - DDC2E17026CE248F0042C5E4 /* Info.plist */, - ); - path = MeshtasticTests; - sourceTree = ""; - }; - DDC2E17826CE248F0042C5E4 /* MeshtasticUITests */ = { - isa = PBXGroup; - children = ( - DDC2E17926CE248F0042C5E4 /* MeshtasticUITests.swift */, - DDC2E17B26CE248F0042C5E4 /* Info.plist */, - ); - path = MeshtasticUITests; - sourceTree = ""; - }; DDC2E18726CE24E40042C5E4 /* Views */ = { isa = PBXGroup; children = ( @@ -1037,7 +998,6 @@ isa = PBXNativeTarget; buildConfigurationList = DDC2E17E26CE248F0042C5E4 /* Build configuration list for PBXNativeTarget "Meshtastic" */; buildPhases = ( - BB450974275599CE00509624 /* ShellScript */, DDC2E15026CE248E0042C5E4 /* Sources */, DDC2E15126CE248E0042C5E4 /* Frameworks */, DDC2E15226CE248E0042C5E4 /* Resources */, @@ -1046,6 +1006,7 @@ buildRules = ( ); dependencies = ( + 258EE1232C0E81DC0025A5FB /* PBXTargetDependency */, DDDE5A0229AF163E00490C6C /* PBXTargetDependency */, ); name = Meshtastic; @@ -1058,24 +1019,6 @@ productReference = DDC2E15426CE248E0042C5E4 /* Meshtastic.app */; productType = "com.apple.product-type.application"; }; - DDC2E17426CE248F0042C5E4 /* MeshtasticUITests */ = { - isa = PBXNativeTarget; - buildConfigurationList = DDC2E18426CE248F0042C5E4 /* Build configuration list for PBXNativeTarget "MeshtasticUITests" */; - buildPhases = ( - DDC2E17126CE248F0042C5E4 /* Sources */, - DDC2E17226CE248F0042C5E4 /* Frameworks */, - DDC2E17326CE248F0042C5E4 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - DDC2E17726CE248F0042C5E4 /* PBXTargetDependency */, - ); - name = MeshtasticUITests; - productName = MeshtasticClientUITests; - productReference = DDC2E17526CE248F0042C5E4 /* MeshtasticUITests.xctest */; - productType = "com.apple.product-type.bundle.ui-testing"; - }; DDDE59F329AF163D00490C6C /* WidgetsExtension */ = { isa = PBXNativeTarget; buildConfigurationList = DDDE5A0529AF163F00490C6C /* Build configuration list for PBXNativeTarget "WidgetsExtension" */; @@ -1087,6 +1030,7 @@ buildRules = ( ); dependencies = ( + 258EE1252C0E826E0025A5FB /* PBXTargetDependency */, ); name = WidgetsExtension; productName = WidgetsExtension; @@ -1107,10 +1051,6 @@ CreatedOnToolsVersion = 12.5.1; LastSwiftMigration = 1340; }; - DDC2E17426CE248F0042C5E4 = { - CreatedOnToolsVersion = 12.5.1; - TestTargetID = DDC2E15326CE248E0042C5E4; - }; DDDE59F329AF163D00490C6C = { CreatedOnToolsVersion = 14.2; }; @@ -1137,13 +1077,13 @@ DD5394FA276993AD00AD86B1 /* XCRemoteSwiftPackageReference "swift-protobuf" */, C9697FA327933B8C00250207 /* XCRemoteSwiftPackageReference "SQLite.swift" */, DD0D3D202A55CEB10066DB71 /* XCRemoteSwiftPackageReference "CocoaMQTT" */, + 258EE1212C0E81AE0025A5FB /* XCRemoteSwiftPackageReference "SwiftLint" */, ); productRefGroup = DDC2E15526CE248E0042C5E4 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( DDC2E15326CE248E0042C5E4 /* Meshtastic */, - DDC2E17426CE248F0042C5E4 /* MeshtasticUITests */, DDDE59F329AF163D00490C6C /* WidgetsExtension */, ); }; @@ -1164,13 +1104,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - DDC2E17326CE248F0042C5E4 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; DDDE59F229AF163D00490C6C /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -1181,27 +1114,6 @@ }; /* End PBXResourcesBuildPhase section */ -/* Begin PBXShellScriptBuildPhase section */ - BB450974275599CE00509624 /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - ); - outputFileListPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "if [[ \"$(uname -m)\" == arm64 ]]\nthen\n export PATH=\"/opt/homebrew/bin:$PATH\"\nfi\n\nif command -v swiftlint >/dev/null 2>&1\nthen\n swiftlint\nelse\n echo \"warning: `swiftlint` command not found - See https://github.com/realm/SwiftLint#installation for installation instructions.\"\nfi\n"; - }; -/* End PBXShellScriptBuildPhase section */ - /* Begin PBXSourcesBuildPhase section */ DDC2E15026CE248E0042C5E4 /* Sources */ = { isa = PBXSourcesBuildPhase; @@ -1395,14 +1307,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - DDC2E17126CE248F0042C5E4 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - DDC2E17A26CE248F0042C5E4 /* MeshtasticUITests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; DDDE59F029AF163D00490C6C /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -1417,10 +1321,13 @@ /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - DDC2E17726CE248F0042C5E4 /* PBXTargetDependency */ = { + 258EE1232C0E81DC0025A5FB /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = DDC2E15326CE248E0042C5E4 /* Meshtastic */; - targetProxy = DDC2E17626CE248F0042C5E4 /* PBXContainerItemProxy */; + productRef = 258EE1222C0E81DC0025A5FB /* SwiftLintBuildToolPlugin */; + }; + 258EE1252C0E826E0025A5FB /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + productRef = 258EE1242C0E826E0025A5FB /* SwiftLintBuildToolPlugin */; }; DDDE5A0229AF163E00490C6C /* PBXTargetDependency */ = { isa = PBXTargetDependency; @@ -1639,48 +1546,6 @@ }; name = Release; }; - DDC2E18526CE248F0042C5E4 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = GCH7VS5Y9R; - INFOPLIST_FILE = MeshtasticUITests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 16.2; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = gvh.MeshtasticUITests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_TARGET_NAME = Meshtastic; - }; - name = Debug; - }; - DDC2E18626CE248F0042C5E4 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = GCH7VS5Y9R; - INFOPLIST_FILE = MeshtasticUITests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 16.2; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = gvh.MeshtasticUITests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_TARGET_NAME = Meshtastic; - }; - name = Release; - }; DDDE5A0629AF163F00490C6C /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -1768,15 +1633,6 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - DDC2E18426CE248F0042C5E4 /* Build configuration list for PBXNativeTarget "MeshtasticUITests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - DDC2E18526CE248F0042C5E4 /* Debug */, - DDC2E18626CE248F0042C5E4 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; DDDE5A0529AF163F00490C6C /* Build configuration list for PBXNativeTarget "WidgetsExtension" */ = { isa = XCConfigurationList; buildConfigurations = ( @@ -1789,6 +1645,14 @@ /* End XCConfigurationList section */ /* Begin XCRemoteSwiftPackageReference section */ + 258EE1212C0E81AE0025A5FB /* XCRemoteSwiftPackageReference "SwiftLint" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/realm/SwiftLint"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 0.55.1; + }; + }; C9697FA327933B8C00250207 /* XCRemoteSwiftPackageReference "SQLite.swift" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/stephencelis/SQLite.swift.git"; @@ -1816,6 +1680,16 @@ /* End XCRemoteSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ + 258EE1222C0E81DC0025A5FB /* SwiftLintBuildToolPlugin */ = { + isa = XCSwiftPackageProductDependency; + package = 258EE1212C0E81AE0025A5FB /* XCRemoteSwiftPackageReference "SwiftLint" */; + productName = "plugin:SwiftLintBuildToolPlugin"; + }; + 258EE1242C0E826E0025A5FB /* SwiftLintBuildToolPlugin */ = { + isa = XCSwiftPackageProductDependency; + package = 258EE1212C0E81AE0025A5FB /* XCRemoteSwiftPackageReference "SwiftLint" */; + productName = "plugin:SwiftLintBuildToolPlugin"; + }; C9697FA427933B8C00250207 /* SQLite */ = { isa = XCSwiftPackageProductDependency; package = C9697FA327933B8C00250207 /* XCRemoteSwiftPackageReference "SQLite.swift" */; diff --git a/Meshtastic.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Meshtastic.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved deleted file mode 100644 index a62998be..00000000 --- a/Meshtastic.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ /dev/null @@ -1,51 +0,0 @@ -{ - "originHash" : "e9855e3a299c14a10f11ee0b8f29e4170b09548533939361223a0f50e7caac8c", - "pins" : [ - { - "identity" : "cocoamqtt", - "kind" : "remoteSourceControl", - "location" : "https://github.com/emqx/CocoaMQTT", - "state" : { - "revision" : "85387a2478551ad84f39be8a3c8587d34dd2bcf5", - "version" : "2.1.5" - } - }, - { - "identity" : "mqttcocoaasyncsocket", - "kind" : "remoteSourceControl", - "location" : "https://github.com/leeway1208/MqttCocoaAsyncSocket", - "state" : { - "revision" : "ce3e18607fd01079495f86ff6195d8a3ca469f73", - "version" : "1.0.8" - } - }, - { - "identity" : "sqlite.swift", - "kind" : "remoteSourceControl", - "location" : "https://github.com/stephencelis/SQLite.swift.git", - "state" : { - "revision" : "7a2e3cd27de56f6d396e84f63beefd0267b55ccb", - "version" : "0.14.1" - } - }, - { - "identity" : "starscream", - "kind" : "remoteSourceControl", - "location" : "https://github.com/daltoniam/Starscream.git", - "state" : { - "revision" : "a063fda2b8145a231953c20e7a646be254365396", - "version" : "3.1.2" - } - }, - { - "identity" : "swift-protobuf", - "kind" : "remoteSourceControl", - "location" : "https://github.com/apple/swift-protobuf.git", - "state" : { - "revision" : "ce20dc083ee485524b802669890291c0d8090170", - "version" : "1.22.1" - } - } - ], - "version" : 3 -} diff --git a/Meshtastic.xcodeproj/xcshareddata/xcschemes/WidgetsExtension.xcscheme b/Meshtastic.xcodeproj/xcshareddata/xcschemes/WidgetsExtension.xcscheme index decd8381..880339bc 100644 --- a/Meshtastic.xcodeproj/xcshareddata/xcschemes/WidgetsExtension.xcscheme +++ b/Meshtastic.xcodeproj/xcshareddata/xcschemes/WidgetsExtension.xcscheme @@ -89,7 +89,6 @@ savedToolIdentifier = "" useCustomWorkingDirectory = "NO" debugDocumentVersioning = "YES" - askForAppToLaunch = "Yes" launchAutomaticallySubstyle = "2"> diff --git a/MeshtasticTests/Info.plist b/MeshtasticTests/Info.plist deleted file mode 100644 index 64d65ca4..00000000 --- a/MeshtasticTests/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - $(PRODUCT_BUNDLE_PACKAGE_TYPE) - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - - diff --git a/MeshtasticTests/MeshtasticTests.swift b/MeshtasticTests/MeshtasticTests.swift deleted file mode 100644 index bc75d0da..00000000 --- a/MeshtasticTests/MeshtasticTests.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// MeshtasticAppleTests.swift -// MeshtasticAppleTests -// -// Created by Garth Vander Houwen on 8/18/21. -// - -import XCTest - -@testable import Meshtastic - -class MeshtasticTests: XCTestCase { - - override func setUpWithError() throws { - super.setUp() - // Put setup code here. This method is called before the invocation of each test method in the class. - } - - override func tearDownWithError() throws { - - // Put teardown code here. This method is called after the invocation of each test method in the class. - super.tearDown() - } - - func testExample() throws { - // This is an example of a functional test case. - // Use XCTAssert and related functions to verify your tests produce the correct results. - } - - func testPerformanceExample() throws { - // This is an example of a performance test case. - self.measure { - // Put the code you want to measure the time of here. - } - } - -} diff --git a/MeshtasticUITests/Info.plist b/MeshtasticUITests/Info.plist deleted file mode 100644 index 64d65ca4..00000000 --- a/MeshtasticUITests/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - $(PRODUCT_BUNDLE_PACKAGE_TYPE) - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - - diff --git a/MeshtasticUITests/MeshtasticUITests.swift b/MeshtasticUITests/MeshtasticUITests.swift deleted file mode 100644 index ae140de9..00000000 --- a/MeshtasticUITests/MeshtasticUITests.swift +++ /dev/null @@ -1,42 +0,0 @@ -// -// MeshtasticUITests.swift -// MeshtasticUITests -// -// Copyright(c) Garth Vander Houwen 8/18/21. -// - -import XCTest - -class MeshtasticUITests: 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. - } - - func testExample() throws { - // UI tests must launch the application that they test. - let app = XCUIApplication() - app.launch() - - // Use recording to get started writing UI tests. - // Use XCTAssert and related functions to verify your tests produce the correct results. - } - - func testLaunchPerformance() throws { - if #available(macOS 13, iOS 16.0, watchOS 8.0, *) { - // This measures how long it takes to launch your application. - measure(metrics: [XCTApplicationLaunchMetric()]) { - XCUIApplication().launch() - } - } - } -} diff --git a/README.md b/README.md index 9b888e90..43dd88aa 100644 --- a/README.md +++ b/README.md @@ -8,35 +8,41 @@ SwiftUI client applications for iOS, iPadOS and macOS. -## OS Requirements +## Getting Started -* iOS App Requires iOS 16 + -* iPadOS App Requires iPadOS 16 + -* Mac App Reguires macOS 13 + +This project is currently using **Xcode 15.4**. -## Code Standards +1. Clone the repo. +2. Open `Meshtastic.xcodeproj` +2. Build and run the `Meshtastic` target. -- Use SwiftUI (Maps are the exception) -- Use Hierarchical icons +```sh +git clone git@github.com:meshtastic/Meshtastic-Apple.git +cd Meshtastic-Apple +open Meshtastic.xcodeproj +``` + +## Technical Standards + +### Supported Operating Systems + +* iOS 16+ +* iPadOS 16+ +* macOS 13+ + +### Code Standards + +- Use SwiftUI +- Use SFSymbols for icons - Use Core Data for persistence -- Requires SwiftLint - see https://github.com/realm/SwiftLint -## To update protobufs: - -- install swift-protobuf: - ```bash - brew install swift-protobuf - ``` -- check out the latest protobuf commit from the master branch - ```bash - git submodule update --init - ``` +## Updating Protobufs: - run: ```bash - ./gen_protos.sh + .scripts/gen_protos.sh ``` - build, test, commit changes -- You may need to run: - ```bash - swiftlint --fix - ``` + +## License + +This project is licensed under the GPL v3. See the [LICENSE](LICENSE) file for details.