From 36c278fcd16014f78cc78ba68a5594aaf386d9cf Mon Sep 17 00:00:00 2001 From: Nick Kibysh Date: Tue, 27 Jul 2021 22:50:23 +0200 Subject: [PATCH 1/2] removed pods. added all dependencies via SPM. fixed build errors --- nRF Toolbox.xcodeproj/project.pbxproj | 206 ++++++++++-------- .../contents.xcworkspacedata | 2 +- .../LoggerTableView/LoggerTableView.swift | 2 +- .../DeviceFirmwareUpdate/DFURouter.swift | 2 +- .../Utils/DFUDocumentPicker.swift | 2 +- .../Utils/LogObserver.swift | 2 +- .../DFUFileSelector/DFUFileManager.swift | 2 +- .../FileSelectorViewController.swift | 2 +- .../Cells/DFUFirmwareSizeSchemeCell.swift | 2 +- .../DFUFirmwareInfoViewController.swift | 2 +- .../Sections/DFUFirmwareSizeSection.swift | 2 +- .../DFUUpdateTabBarViewController.swift | 2 +- .../DFUUpdate/DFUUpdateViewController.swift | 2 +- .../DFUUpdate/Util/LogObserver+DFU.swift | 2 +- .../Cells/LinearChartTableViewCell.swift | 4 +- .../UART/Model/UARTCommandModel.swift | 1 + .../ZephyrDFUTableViewController.swift | 2 +- .../Extensions/DFU.LogLevel+Ext.swift | 2 +- 18 files changed, 129 insertions(+), 112 deletions(-) diff --git a/nRF Toolbox.xcodeproj/project.pbxproj b/nRF Toolbox.xcodeproj/project.pbxproj index 630c5c50..ed5d2dc1 100644 --- a/nRF Toolbox.xcodeproj/project.pbxproj +++ b/nRF Toolbox.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 52; objects = { /* Begin PBXBuildFile section */ @@ -267,7 +267,10 @@ 52BDCBC61C47C2C300E2680F /* Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 52BDCBC51C47C2C300E2680F /* Launch Screen.storyboard */; }; 52D9BC9E1DD0CB760030E824 /* Data+Ext.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52D9BC9D1DD0CB760030E824 /* Data+Ext.swift */; }; 7E1B422918A8DF4D006BA1BC /* high.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 7E1B422818A8DF4D006BA1BC /* high.mp3 */; }; - B9333AF83F2257C393C81470 /* Pods_nRF_Toolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5B1C52F90A80A6E5FFBFC488 /* Pods_nRF_Toolbox.framework */; }; + C3CD27D526B097510026FE67 /* AEXML in Frameworks */ = {isa = PBXBuildFile; productRef = C3CD27D426B097510026FE67 /* AEXML */; }; + C3CD27D826B0977F0026FE67 /* McuManager in Frameworks */ = {isa = PBXBuildFile; productRef = C3CD27D726B0977F0026FE67 /* McuManager */; }; + C3CD27DB26B097AB0026FE67 /* NordicDFU in Frameworks */ = {isa = PBXBuildFile; productRef = C3CD27DA26B097AB0026FE67 /* NordicDFU */; }; + C3CD27DE26B098070026FE67 /* Charts in Frameworks */ = {isa = PBXBuildFile; productRef = C3CD27DD26B098070026FE67 /* Charts */; }; CC7B90D148FC21C73B54BFAB /* NumberFormatter+Ext.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC7B93FA695799F95D065492 /* NumberFormatter+Ext.swift */; }; CC7B91DDFD7EF39F27FEC85A /* CommandImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC7B95845343A3D826B220D5 /* CommandImage.swift */; }; /* End PBXBuildFile section */ @@ -562,14 +565,10 @@ 52BDCBBD1C3FD86900E2680F /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; 52BDCBC51C47C2C300E2680F /* Launch Screen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = "Launch Screen.storyboard"; sourceTree = ""; }; 52D9BC9D1DD0CB760030E824 /* Data+Ext.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Data+Ext.swift"; sourceTree = ""; }; - 5A98BC822E262F88E44D6E02 /* Pods-nRF Toolbox.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-nRF Toolbox.release.xcconfig"; path = "Target Support Files/Pods-nRF Toolbox/Pods-nRF Toolbox.release.xcconfig"; sourceTree = ""; }; - 5B1C52F90A80A6E5FFBFC488 /* Pods_nRF_Toolbox.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_nRF_Toolbox.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 69A9BA14F5A63C56C457514A /* Pods-nRF Toolbox.beta.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-nRF Toolbox.beta.xcconfig"; path = "Target Support Files/Pods-nRF Toolbox/Pods-nRF Toolbox.beta.xcconfig"; sourceTree = ""; }; 7E1B422818A8DF4D006BA1BC /* high.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = high.mp3; sourceTree = ""; }; 89CF4D2BA242FBAD9F6C46E9 /* Pods.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods.framework; sourceTree = BUILT_PRODUCTS_DIR; }; CC7B93FA695799F95D065492 /* NumberFormatter+Ext.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NumberFormatter+Ext.swift"; sourceTree = ""; }; CC7B95845343A3D826B220D5 /* CommandImage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CommandImage.swift; sourceTree = ""; }; - EAAF1D5ED777F196D5C340C3 /* Pods-nRF Toolbox.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-nRF Toolbox.debug.xcconfig"; path = "Target Support Files/Pods-nRF Toolbox/Pods-nRF Toolbox.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -585,14 +584,17 @@ buildActionMask = 2147483647; files = ( 522636371C60FFB00054A550 /* libz.tbd in Frameworks */, + C3CD27DB26B097AB0026FE67 /* NordicDFU in Frameworks */, 52BDCB191C3FD31F00E2680F /* Accelerate.framework in Frameworks */, 52BDCBBE1C3FD86900E2680F /* QuartzCore.framework in Frameworks */, + C3CD27D526B097510026FE67 /* AEXML in Frameworks */, 309F08681E6D706B00B7546A /* HomeKit.framework in Frameworks */, 5217F41B1859EEF400F2D5BB /* CoreBluetooth.framework in Frameworks */, + C3CD27DE26B098070026FE67 /* Charts in Frameworks */, + C3CD27D826B0977F0026FE67 /* McuManager in Frameworks */, 5217F3E81859EE0000F2D5BB /* CoreGraphics.framework in Frameworks */, 5217F3EA1859EE0000F2D5BB /* UIKit.framework in Frameworks */, 5217F3E61859EE0000F2D5BB /* Foundation.framework in Frameworks */, - B9333AF83F2257C393C81470 /* Pods_nRF_Toolbox.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1053,16 +1055,6 @@ path = Sections; sourceTree = ""; }; - 04CD51502DA0CA668E27A6C1 /* Pods */ = { - isa = PBXGroup; - children = ( - EAAF1D5ED777F196D5C340C3 /* Pods-nRF Toolbox.debug.xcconfig */, - 69A9BA14F5A63C56C457514A /* Pods-nRF Toolbox.beta.xcconfig */, - 5A98BC822E262F88E44D6E02 /* Pods-nRF Toolbox.release.xcconfig */, - ); - path = Pods; - sourceTree = ""; - }; 2002A003232260CA00C43E06 /* Glucose */ = { isa = PBXGroup; children = ( @@ -1642,7 +1634,6 @@ 014C4E912404038A0003E601 /* nRF Toolbox Tests */, 5217F3E41859EE0000F2D5BB /* Frameworks */, 5217F3E31859EE0000F2D5BB /* Products */, - 04CD51502DA0CA668E27A6C1 /* Pods */, ); sourceTree = ""; }; @@ -1667,7 +1658,6 @@ 5217F3E71859EE0000F2D5BB /* CoreGraphics.framework */, 5217F3E91859EE0000F2D5BB /* UIKit.framework */, 89CF4D2BA242FBAD9F6C46E9 /* Pods.framework */, - 5B1C52F90A80A6E5FFBFC488 /* Pods_nRF_Toolbox.framework */, ); name = Frameworks; sourceTree = ""; @@ -1760,18 +1750,22 @@ isa = PBXNativeTarget; buildConfigurationList = 5217F4141859EE0000F2D5BB /* Build configuration list for PBXNativeTarget "nRF Toolbox" */; buildPhases = ( - 5FC3317ABD3B19C7AC4BD5DE /* [CP] Check Pods Manifest.lock */, 5217F3DE1859EE0000F2D5BB /* Sources */, 5217F3DF1859EE0000F2D5BB /* Frameworks */, 5217F3E01859EE0000F2D5BB /* Resources */, 0E645A0E1CBF943000D36AD0 /* Embed Frameworks */, - CA42A312846FDA743BF24EF8 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); dependencies = ( ); name = "nRF Toolbox"; + packageProductDependencies = ( + C3CD27D426B097510026FE67 /* AEXML */, + C3CD27D726B0977F0026FE67 /* McuManager */, + C3CD27DA26B097AB0026FE67 /* NordicDFU */, + C3CD27DD26B098070026FE67 /* Charts */, + ); productName = "nRF Toolbox"; productReference = 5217F3E21859EE0000F2D5BB /* nRF Toolbox Beta.app */; productType = "com.apple.product-type.application"; @@ -1815,6 +1809,12 @@ Base, ); mainGroup = 5217F3D91859EE0000F2D5BB; + packageReferences = ( + C3CD27D326B097510026FE67 /* XCRemoteSwiftPackageReference "AEXML" */, + C3CD27D626B0977F0026FE67 /* XCRemoteSwiftPackageReference "mcumgr-ios" */, + C3CD27D926B097AB0026FE67 /* XCRemoteSwiftPackageReference "IOS-Pods-DFU-Library" */, + C3CD27DC26B098070026FE67 /* XCRemoteSwiftPackageReference "Charts" */, + ); productRefGroup = 5217F3E31859EE0000F2D5BB /* Products */; projectDirPath = ""; projectRoot = ""; @@ -1897,61 +1897,6 @@ }; /* End PBXResourcesBuildPhase section */ -/* Begin PBXShellScriptBuildPhase section */ - 5FC3317ABD3B19C7AC4BD5DE /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-nRF Toolbox-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - CA42A312846FDA743BF24EF8 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-nRF Toolbox/Pods-nRF Toolbox-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/AEXML/AEXML.framework", - "${BUILT_PRODUCTS_DIR}/Charts/Charts.framework", - "${BUILT_PRODUCTS_DIR}/McuManager/McuManager.framework", - "${BUILT_PRODUCTS_DIR}/SWRevealViewController/SWRevealViewController.framework", - "${BUILT_PRODUCTS_DIR}/SwiftCBOR/SwiftCBOR.framework", - "${BUILT_PRODUCTS_DIR}/ZIPFoundation/ZIPFoundation.framework", - "${BUILT_PRODUCTS_DIR}/iOSDFULibrary/iOSDFULibrary.framework", - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AEXML.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Charts.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/McuManager.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SWRevealViewController.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftCBOR.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZIPFoundation.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/iOSDFULibrary.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-nRF Toolbox/Pods-nRF Toolbox-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - /* Begin PBXSourcesBuildPhase section */ 014C4E8C2404038A0003E601 /* Sources */ = { isa = PBXSourcesBuildPhase; @@ -2205,7 +2150,11 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; INFOPLIST_FILE = "nRF Toolbox Tests/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = "no.nordicsemi.nRF-Toolbox-Tests"; @@ -2236,7 +2185,11 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; INFOPLIST_FILE = "nRF Toolbox Tests/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = "no.nordicsemi.nRF-Toolbox-Tests"; @@ -2265,7 +2218,11 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; INFOPLIST_FILE = "nRF Toolbox Tests/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = "no.nordicsemi.nRF-Toolbox-Tests"; @@ -2338,7 +2295,6 @@ }; 20FDA43623154494006EEBC1 /* Beta */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 69A9BA14F5A63C56C457514A /* Pods-nRF Toolbox.beta.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; ALWAYS_SEARCH_USER_PATHS = NO; @@ -2358,19 +2314,20 @@ GCC_PREFIX_HEADER = "nRF Toolbox/nRF Toolbox-Prefix.pch"; INFOPLIST_FILE = "nRF Toolbox/nRF Toolbox-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", "$(PODS_ROOT)", ); - MARKETING_VERSION = 5.0.2; + MARKETING_VERSION = 5.0.3; NEW_SETTING = ""; ONLY_ACTIVE_ARCH = YES; OTHER_LDFLAGS = ( "$(inherited)", - "-framework", - "\"iOSDFULibrary\"", "-ObjC", ); OTHER_SWIFT_FLAGS = "$(inherited) -D COCOAPODS -D BETA"; @@ -2496,7 +2453,8 @@ ONLY_ACTIVE_ARCH = NO; PROVISIONING_PROFILE = ""; SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; VALIDATE_PRODUCT = YES; VALID_ARCHS = "arm64 armv7 armv7s"; }; @@ -2504,7 +2462,6 @@ }; 5217F4151859EE0000F2D5BB /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = EAAF1D5ED777F196D5C340C3 /* Pods-nRF Toolbox.debug.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; ALWAYS_SEARCH_USER_PATHS = NO; @@ -2524,19 +2481,20 @@ GCC_PREFIX_HEADER = "nRF Toolbox/nRF Toolbox-Prefix.pch"; INFOPLIST_FILE = "nRF Toolbox/nRF Toolbox-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", "$(PODS_ROOT)", ); - MARKETING_VERSION = 5.0.2; + MARKETING_VERSION = 5.0.3; NEW_SETTING = ""; ONLY_ACTIVE_ARCH = YES; OTHER_LDFLAGS = ( "$(inherited)", - "-framework", - "\"iOSDFULibrary\"", "-ObjC", ); OTHER_SWIFT_FLAGS = "$(inherited) -D COCOAPODS -D RAND"; @@ -2555,7 +2513,6 @@ }; 5217F4161859EE0000F2D5BB /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 5A98BC822E262F88E44D6E02 /* Pods-nRF Toolbox.release.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; ALWAYS_SEARCH_USER_PATHS = NO; @@ -2575,19 +2532,20 @@ GCC_PREFIX_HEADER = "nRF Toolbox/nRF Toolbox-Prefix.pch"; INFOPLIST_FILE = "nRF Toolbox/nRF Toolbox-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", "$(PODS_ROOT)", ); - MARKETING_VERSION = 5.0.2; + MARKETING_VERSION = 5.0.3; NEW_SETTING = ""; ONLY_ACTIVE_ARCH = NO; OTHER_LDFLAGS = ( "$(inherited)", - "-framework", - "\"iOSDFULibrary\"", "-ObjC", ); OTHER_SWIFT_FLAGS = "$(inherited) -D COCOAPODS"; @@ -2637,6 +2595,64 @@ defaultConfigurationName = Beta; }; /* End XCConfigurationList section */ + +/* Begin XCRemoteSwiftPackageReference section */ + C3CD27D326B097510026FE67 /* XCRemoteSwiftPackageReference "AEXML" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/tadija/AEXML.git"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 4.6.0; + }; + }; + C3CD27D626B0977F0026FE67 /* XCRemoteSwiftPackageReference "mcumgr-ios" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/JuulLabs-OSS/mcumgr-ios.git"; + requirement = { + branch = master; + kind = branch; + }; + }; + C3CD27D926B097AB0026FE67 /* XCRemoteSwiftPackageReference "IOS-Pods-DFU-Library" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/NordicSemiconductor/IOS-Pods-DFU-Library.git"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 4.10.4; + }; + }; + C3CD27DC26B098070026FE67 /* XCRemoteSwiftPackageReference "Charts" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/danielgindi/Charts.git"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 4.0.1; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + C3CD27D426B097510026FE67 /* AEXML */ = { + isa = XCSwiftPackageProductDependency; + package = C3CD27D326B097510026FE67 /* XCRemoteSwiftPackageReference "AEXML" */; + productName = AEXML; + }; + C3CD27D726B0977F0026FE67 /* McuManager */ = { + isa = XCSwiftPackageProductDependency; + package = C3CD27D626B0977F0026FE67 /* XCRemoteSwiftPackageReference "mcumgr-ios" */; + productName = McuManager; + }; + C3CD27DA26B097AB0026FE67 /* NordicDFU */ = { + isa = XCSwiftPackageProductDependency; + package = C3CD27D926B097AB0026FE67 /* XCRemoteSwiftPackageReference "IOS-Pods-DFU-Library" */; + productName = NordicDFU; + }; + C3CD27DD26B098070026FE67 /* Charts */ = { + isa = XCSwiftPackageProductDependency; + package = C3CD27DC26B098070026FE67 /* XCRemoteSwiftPackageReference "Charts" */; + productName = Charts; + }; +/* End XCSwiftPackageProductDependency section */ }; rootObject = 5217F3DA1859EE0000F2D5BB /* Project object */; } diff --git a/nRF Toolbox.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/nRF Toolbox.xcodeproj/project.xcworkspace/contents.xcworkspacedata index 67a95d4e..919434a6 100644 --- a/nRF Toolbox.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/nRF Toolbox.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:"> diff --git a/nRF Toolbox/CommonViews/LoggerTableView/LoggerTableView.swift b/nRF Toolbox/CommonViews/LoggerTableView/LoggerTableView.swift index e234d2d4..72c3deef 100644 --- a/nRF Toolbox/CommonViews/LoggerTableView/LoggerTableView.swift +++ b/nRF Toolbox/CommonViews/LoggerTableView/LoggerTableView.swift @@ -31,7 +31,7 @@ import UIKit -import iOSDFULibrary +import NordicDFU struct LogMessage { diff --git a/nRF Toolbox/Profiles/DeviceFirmwareUpdate/DFURouter.swift b/nRF Toolbox/Profiles/DeviceFirmwareUpdate/DFURouter.swift index 5fc7afe4..4c667313 100644 --- a/nRF Toolbox/Profiles/DeviceFirmwareUpdate/DFURouter.swift +++ b/nRF Toolbox/Profiles/DeviceFirmwareUpdate/DFURouter.swift @@ -31,7 +31,7 @@ import UIKit -import iOSDFULibrary +import NordicDFU import CoreBluetooth enum PresentationType { diff --git a/nRF Toolbox/Profiles/DeviceFirmwareUpdate/Utils/DFUDocumentPicker.swift b/nRF Toolbox/Profiles/DeviceFirmwareUpdate/Utils/DFUDocumentPicker.swift index a722f364..93006a1f 100644 --- a/nRF Toolbox/Profiles/DeviceFirmwareUpdate/Utils/DFUDocumentPicker.swift +++ b/nRF Toolbox/Profiles/DeviceFirmwareUpdate/Utils/DFUDocumentPicker.swift @@ -31,7 +31,7 @@ import UIKit -import iOSDFULibrary +import NordicDFU class DocumentPicker: NSObject, UIDocumentPickerDelegate { typealias Callback = (Result) -> () diff --git a/nRF Toolbox/Profiles/DeviceFirmwareUpdate/Utils/LogObserver.swift b/nRF Toolbox/Profiles/DeviceFirmwareUpdate/Utils/LogObserver.swift index f3050770..11b301cd 100644 --- a/nRF Toolbox/Profiles/DeviceFirmwareUpdate/Utils/LogObserver.swift +++ b/nRF Toolbox/Profiles/DeviceFirmwareUpdate/Utils/LogObserver.swift @@ -31,7 +31,7 @@ import Foundation -import iOSDFULibrary +import NordicDFU extension Notification.Name { static let newMessage = Notification.Name("newMessage") diff --git a/nRF Toolbox/Profiles/DeviceFirmwareUpdate/ViewConrollers/DFUFileSelector/DFUFileManager.swift b/nRF Toolbox/Profiles/DeviceFirmwareUpdate/ViewConrollers/DFUFileSelector/DFUFileManager.swift index c9729c1a..1f39e917 100644 --- a/nRF Toolbox/Profiles/DeviceFirmwareUpdate/ViewConrollers/DFUFileSelector/DFUFileManager.swift +++ b/nRF Toolbox/Profiles/DeviceFirmwareUpdate/ViewConrollers/DFUFileSelector/DFUFileManager.swift @@ -31,7 +31,7 @@ import Foundation -import iOSDFULibrary +import NordicDFU protocol DFUPacket { var url: URL { get } diff --git a/nRF Toolbox/Profiles/DeviceFirmwareUpdate/ViewConrollers/DFUFileSelector/FileSelectorViewController.swift b/nRF Toolbox/Profiles/DeviceFirmwareUpdate/ViewConrollers/DFUFileSelector/FileSelectorViewController.swift index 6e5f77ab..481e3948 100644 --- a/nRF Toolbox/Profiles/DeviceFirmwareUpdate/ViewConrollers/DFUFileSelector/FileSelectorViewController.swift +++ b/nRF Toolbox/Profiles/DeviceFirmwareUpdate/ViewConrollers/DFUFileSelector/FileSelectorViewController.swift @@ -31,7 +31,7 @@ import UIKit -import iOSDFULibrary +import NordicDFU class FileSelectorViewController: UIViewController, AlertPresenter, UITableViewDataSource, UITableViewDelegate { diff --git a/nRF Toolbox/Profiles/DeviceFirmwareUpdate/ViewConrollers/DFUFirmwareInfo/Cells/DFUFirmwareSizeSchemeCell.swift b/nRF Toolbox/Profiles/DeviceFirmwareUpdate/ViewConrollers/DFUFirmwareInfo/Cells/DFUFirmwareSizeSchemeCell.swift index 581ca638..c517f1a0 100644 --- a/nRF Toolbox/Profiles/DeviceFirmwareUpdate/ViewConrollers/DFUFirmwareInfo/Cells/DFUFirmwareSizeSchemeCell.swift +++ b/nRF Toolbox/Profiles/DeviceFirmwareUpdate/ViewConrollers/DFUFirmwareInfo/Cells/DFUFirmwareSizeSchemeCell.swift @@ -31,7 +31,7 @@ import UIKit -import iOSDFULibrary +import NordicDFU extension DFUFirmwareSize { var segments: [Segment] { diff --git a/nRF Toolbox/Profiles/DeviceFirmwareUpdate/ViewConrollers/DFUFirmwareInfo/DFUFirmwareInfoViewController.swift b/nRF Toolbox/Profiles/DeviceFirmwareUpdate/ViewConrollers/DFUFirmwareInfo/DFUFirmwareInfoViewController.swift index 86c5a872..4fc0d8dd 100644 --- a/nRF Toolbox/Profiles/DeviceFirmwareUpdate/ViewConrollers/DFUFirmwareInfo/DFUFirmwareInfoViewController.swift +++ b/nRF Toolbox/Profiles/DeviceFirmwareUpdate/ViewConrollers/DFUFirmwareInfo/DFUFirmwareInfoViewController.swift @@ -31,7 +31,7 @@ import UIKit -import iOSDFULibrary +import NordicDFU class DFUFirmwareInfoViewController: UITableViewController, AlertPresenter { diff --git a/nRF Toolbox/Profiles/DeviceFirmwareUpdate/ViewConrollers/DFUFirmwareInfo/Sections/DFUFirmwareSizeSection.swift b/nRF Toolbox/Profiles/DeviceFirmwareUpdate/ViewConrollers/DFUFirmwareInfo/Sections/DFUFirmwareSizeSection.swift index 5f7a416f..ae4345a1 100644 --- a/nRF Toolbox/Profiles/DeviceFirmwareUpdate/ViewConrollers/DFUFirmwareInfo/Sections/DFUFirmwareSizeSection.swift +++ b/nRF Toolbox/Profiles/DeviceFirmwareUpdate/ViewConrollers/DFUFirmwareInfo/Sections/DFUFirmwareSizeSection.swift @@ -31,7 +31,7 @@ import UIKit -import iOSDFULibrary +import NordicDFU class DFUFirmwareSizeSection: DFUActionSection { diff --git a/nRF Toolbox/Profiles/DeviceFirmwareUpdate/ViewConrollers/DFUUpdate/DFUUpdateTabBarViewController.swift b/nRF Toolbox/Profiles/DeviceFirmwareUpdate/ViewConrollers/DFUUpdate/DFUUpdateTabBarViewController.swift index cea444a2..aac3a6b8 100644 --- a/nRF Toolbox/Profiles/DeviceFirmwareUpdate/ViewConrollers/DFUUpdate/DFUUpdateTabBarViewController.swift +++ b/nRF Toolbox/Profiles/DeviceFirmwareUpdate/ViewConrollers/DFUUpdate/DFUUpdateTabBarViewController.swift @@ -31,7 +31,7 @@ import UIKit -import iOSDFULibrary +import NordicDFU protocol DFUUpdateRouter: AnyObject { func showLogs() diff --git a/nRF Toolbox/Profiles/DeviceFirmwareUpdate/ViewConrollers/DFUUpdate/DFUUpdateViewController.swift b/nRF Toolbox/Profiles/DeviceFirmwareUpdate/ViewConrollers/DFUUpdate/DFUUpdateViewController.swift index 88b9ccd4..e5ab9d89 100644 --- a/nRF Toolbox/Profiles/DeviceFirmwareUpdate/ViewConrollers/DFUUpdate/DFUUpdateViewController.swift +++ b/nRF Toolbox/Profiles/DeviceFirmwareUpdate/ViewConrollers/DFUUpdate/DFUUpdateViewController.swift @@ -31,7 +31,7 @@ import UIKit -import iOSDFULibrary +import NordicDFU protocol UpgradeManager { func stop() diff --git a/nRF Toolbox/Profiles/DeviceFirmwareUpdate/ViewConrollers/DFUUpdate/Util/LogObserver+DFU.swift b/nRF Toolbox/Profiles/DeviceFirmwareUpdate/ViewConrollers/DFUUpdate/Util/LogObserver+DFU.swift index bf680274..ce5655f5 100644 --- a/nRF Toolbox/Profiles/DeviceFirmwareUpdate/ViewConrollers/DFUUpdate/Util/LogObserver+DFU.swift +++ b/nRF Toolbox/Profiles/DeviceFirmwareUpdate/ViewConrollers/DFUUpdate/Util/LogObserver+DFU.swift @@ -31,7 +31,7 @@ import Foundation -import iOSDFULibrary +import NordicDFU class DFULogObserver: LogObserver, LoggerDelegate { diff --git a/nRF Toolbox/Profiles/HeartRateMonitor/Sections/Cells/LinearChartTableViewCell.swift b/nRF Toolbox/Profiles/HeartRateMonitor/Sections/Cells/LinearChartTableViewCell.swift index 2203b341..b82707e7 100644 --- a/nRF Toolbox/Profiles/HeartRateMonitor/Sections/Cells/LinearChartTableViewCell.swift +++ b/nRF Toolbox/Profiles/HeartRateMonitor/Sections/Cells/LinearChartTableViewCell.swift @@ -33,7 +33,7 @@ import UIKit import Charts -extension DateFormatter: IAxisValueFormatter { +extension DateFormatter: AxisValueFormatter { public func stringForValue(_ value: Double, axis: AxisBase?) -> String { let date = Date(timeIntervalSince1970: value) @@ -131,7 +131,7 @@ class LinearChartTableViewCell: UITableViewCell { chartsView.xAxis.axisMaximum = xMax chartsView.xAxis.axisMinimum = first - let set = LineChartDataSet(entries: chartValues, label: nil) + let set = LineChartDataSet(entries: chartValues, label: "") set.drawCirclesEnabled = false set.drawValuesEnabled = false diff --git a/nRF Toolbox/Profiles/UART/Model/UARTCommandModel.swift b/nRF Toolbox/Profiles/UART/Model/UARTCommandModel.swift index 8f880785..07e1d9bd 100644 --- a/nRF Toolbox/Profiles/UART/Model/UARTCommandModel.swift +++ b/nRF Toolbox/Profiles/UART/Model/UARTCommandModel.swift @@ -31,6 +31,7 @@ import Foundation +import UIKit.UIImage import AEXML protocol UARTCommandModel: Codable, XMLRepresentable, UARTMacroElement, NordicTextTableViewCellModel { diff --git a/nRF Toolbox/Profiles/ZephyrDFU/ViewController/NotConnectedViewController/UpdateScreen/ZephyrDFUTableViewController.swift b/nRF Toolbox/Profiles/ZephyrDFU/ViewController/NotConnectedViewController/UpdateScreen/ZephyrDFUTableViewController.swift index b1428732..96fdf885 100644 --- a/nRF Toolbox/Profiles/ZephyrDFU/ViewController/NotConnectedViewController/UpdateScreen/ZephyrDFUTableViewController.swift +++ b/nRF Toolbox/Profiles/ZephyrDFU/ViewController/NotConnectedViewController/UpdateScreen/ZephyrDFUTableViewController.swift @@ -32,7 +32,7 @@ import UIKit import McuManager -import iOSDFULibrary +import NordicDFU extension FirmwareUpgradeManager: UpgradeManager { func stop() { diff --git a/nRF Toolbox/Utilities/Extensions/DFU.LogLevel+Ext.swift b/nRF Toolbox/Utilities/Extensions/DFU.LogLevel+Ext.swift index 34360e2f..5d4ada7e 100644 --- a/nRF Toolbox/Utilities/Extensions/DFU.LogLevel+Ext.swift +++ b/nRF Toolbox/Utilities/Extensions/DFU.LogLevel+Ext.swift @@ -30,7 +30,7 @@ -import iOSDFULibrary +import NordicDFU extension LogLevel { var level: LogType { From d4a9955be3d3080f56650059009f32da4ffcc270 Mon Sep 17 00:00:00 2001 From: Nick Kibysh Date: Thu, 29 Jul 2021 01:08:45 +0200 Subject: [PATCH 2/2] fixed issue with dropped empty strings between EOLs --- nRF Toolbox/Profiles/UART/Model/UARTCommandModel.swift | 2 +- .../UART/NewCommand/UARTNewCommandViewController.swift | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/nRF Toolbox/Profiles/UART/Model/UARTCommandModel.swift b/nRF Toolbox/Profiles/UART/Model/UARTCommandModel.swift index 07e1d9bd..be0d65f8 100644 --- a/nRF Toolbox/Profiles/UART/Model/UARTCommandModel.swift +++ b/nRF Toolbox/Profiles/UART/Model/UARTCommandModel.swift @@ -81,7 +81,7 @@ struct TextCommand: UARTCommandModel, Equatable { ]) } - var title: String { text } + var title: String { text.split(whereSeparator: \.isNewline).joined() } var data: Data { text.data(using: .utf8)! diff --git a/nRF Toolbox/Profiles/UART/NewCommand/UARTNewCommandViewController.swift b/nRF Toolbox/Profiles/UART/NewCommand/UARTNewCommandViewController.swift index e677ee51..d40b940a 100644 --- a/nRF Toolbox/Profiles/UART/NewCommand/UARTNewCommandViewController.swift +++ b/nRF Toolbox/Profiles/UART/NewCommand/UARTNewCommandViewController.swift @@ -116,7 +116,9 @@ class UARTNewCommandViewController: UIViewController { let image = CommandImage.allCases[selectedItem] if typeSegmentControl.selectedSegmentIndex == 0 { - let text = textView.text.split(separator: "\n").joined(separator: self.eolSymbol()) + let slices = textView.text.split(omittingEmptySubsequences: false, whereSeparator: \.isNewline) + let text = slices.joined(separator: eolSymbol()) + command = TextCommand(text: text, image: image, eol: self.eolSymbol()) } else { command = DataCommand(data: Data(valueTextField.text!.hexa), image: image)