Skip to content

Commit

Permalink
适配xcode15 更新部分依赖库
Browse files Browse the repository at this point in the history
  • Loading branch information
zhxf2012 committed Oct 10, 2023
1 parent ad6e10b commit e8afd89
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 48 deletions.
4 changes: 2 additions & 2 deletions BPBleOTA.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'BPBleOTA'
s.version = '0.6.0'
s.version = '0.6.2'
s.summary = 'a swift library aggregating NordicDFU and SMPDFU implement'

# This description is used to generate tags and improve search results.
Expand Down Expand Up @@ -46,5 +46,5 @@ Pod::Spec.new do |s|
# s.frameworks = 'UIKit', 'MapKit'
s.requires_arc = true
s.dependency 'iOSDFULibrary'#, '~> 4.13.0'
s.dependency 'iOSMcuManagerLibrary' #,"~> 1.3.1"
s.dependency 'iOSMcuManagerLibrary' #,"~> 1.3.3"
end
22 changes: 11 additions & 11 deletions BPBleOTA.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1209,7 +1209,7 @@
buildSettings = {
CODE_SIGNING_ALLOWED = NO;
CODE_SIGN_IDENTITY = "";
CURRENT_PROJECT_VERSION = 1.3.1;
CURRENT_PROJECT_VERSION = 1.3.3;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = "";
DYLIB_CURRENT_VERSION = 1;
Expand All @@ -1222,7 +1222,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 1.3.1;
MARKETING_VERSION = 1.3.3;
PRODUCT_BUNDLE_IDENTIFIER = com.bbb.zhxf.iOSMcuManagerLibrary;
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
Expand Down Expand Up @@ -1276,7 +1276,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -1334,7 +1334,7 @@
buildSettings = {
CODE_SIGNING_ALLOWED = NO;
CODE_SIGN_IDENTITY = "";
CURRENT_PROJECT_VERSION = 1.3.1;
CURRENT_PROJECT_VERSION = 1.3.3;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = "";
DYLIB_CURRENT_VERSION = 1;
Expand All @@ -1347,7 +1347,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 1.3.1;
MARKETING_VERSION = 1.3.3;
PRODUCT_BUNDLE_IDENTIFIER = com.bbb.zhxf.iOSMcuManagerLibrary;
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
Expand All @@ -1361,7 +1361,7 @@
buildSettings = {
CODE_SIGNING_ALLOWED = NO;
CODE_SIGN_IDENTITY = "";
CURRENT_PROJECT_VERSION = 0.6.20230509;
CURRENT_PROJECT_VERSION = 0.6.0220231010;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = "";
DYLIB_CURRENT_VERSION = 1;
Expand All @@ -1373,7 +1373,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 0.6.0;
MARKETING_VERSION = 0.6.2;
PRODUCT_BUNDLE_IDENTIFIER = com.bbb.zhxf.BPBleOTA;
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
Expand Down Expand Up @@ -1505,7 +1505,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
Expand All @@ -1522,7 +1522,7 @@
buildSettings = {
CODE_SIGNING_ALLOWED = NO;
CODE_SIGN_IDENTITY = "";
CURRENT_PROJECT_VERSION = 0.6.20230509;
CURRENT_PROJECT_VERSION = 0.6.0220231010;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = "";
DYLIB_CURRENT_VERSION = 1;
Expand All @@ -1534,7 +1534,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 0.6.0;
MARKETING_VERSION = 0.6.2;
PRODUCT_BUNDLE_IDENTIFIER = com.bbb.zhxf.BPBleOTA;
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
Expand Down Expand Up @@ -1635,7 +1635,7 @@
repositoryURL = "https://github.com/NordicSemiconductor/IOS-nRF-Connect-Device-Manager";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 1.3.1;
minimumVersion = 1.3.3;
};
};
85117379E56A26AA7EF5BF99 /* XCRemoteSwiftPackageReference "ZIPFoundation" */ = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/NordicSemiconductor/IOS-nRF-Connect-Device-Manager",
"state" : {
"revision" : "2fcdf9a5b20e6ab0c2215cec37ed3f26c0888126",
"version" : "1.3.1"
"revision" : "34dc64baa17c6e0847c96d6043f41bb89e0c1a9c",
"version" : "1.3.3"
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github "NordicSemiconductor/IOS-DFU-Library" ~> 4.13.0
github "NordicSemiconductor/IOS-nRF-Connect-Device-Manager" ~> 1.3.1
github "NordicSemiconductor/IOS-nRF-Connect-Device-Manager" ~> 1.3.3
4 changes: 2 additions & 2 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
github "NordicSemiconductor/IOS-DFU-Library" "4.13.0"
github "NordicSemiconductor/IOS-nRF-Connect-Device-Manager" "1.3.1"
github "bgiori/SwiftCBOR" "v0.3.2"
github "NordicSemiconductor/IOS-nRF-Connect-Device-Manager" "1.3.3"
github "bgiori/SwiftCBOR" "v0.4.4"
github "weichsel/ZIPFoundation" "0.9.11"
4 changes: 2 additions & 2 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/NordicSemiconductor/IOS-nRF-Connect-Device-Manager.git",
"state" : {
"revision" : "2fcdf9a5b20e6ab0c2215cec37ed3f26c0888126",
"version" : "1.3.1"
"revision" : "34dc64baa17c6e0847c96d6043f41bb89e0c1a9c",
"version" : "1.3.3"
}
},
{
Expand Down
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import PackageDescription

let package = Package(
name: "BPBleOTA",
platforms: [.iOS(.v11),.macOS(.v10_14)],
platforms: [.iOS(.v12),.macOS(.v10_14)],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
Expand All @@ -17,7 +17,7 @@ let package = Package(
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
.package(url: "https://github.com/NordicSemiconductor/IOS-nRF-Connect-Device-Manager.git",
exact:"1.3.1"
exact:"1.3.3"
),

.package(
Expand Down
39 changes: 19 additions & 20 deletions Sources/BPBleOTA/Classes/BPOTAUtil.swift
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
//
// BPenOTAUtil.swift
// BPenOTASDK
// UTI.swift
// nRF Connect Device Manager
//
// Created by xingfa on 2023/2/16.
// Created by Dinesh Harjani on 18/1/22.
// Copyright © 2022 Nordic Semiconductor ASA. All rights reserved.
//

import Foundation
import UniformTypeIdentifiers
#if os(macOS)
import AppKit
#else
import UIKit
#endif

// MARK: - UTI

Expand All @@ -32,25 +38,18 @@ enum UTI: String, CaseIterable {
$0.typeIdentifiers.contains(fileType)
}
}
}

extension Data {

internal struct HexEncodingOptions: OptionSet {
public let rawValue: Int
public static let upperCase = HexEncodingOptions(rawValue: 1 << 0)
public static let space = HexEncodingOptions(rawValue: 1 << 1)
public init(rawValue: Int) {
self.rawValue = rawValue
}
private static func typeOf(_ url: URL) -> String? {
#if os(macOS)
return try? NSWorkspace.shared.type(ofFile: url.path)
#else
let document = UIDocument(fileURL: url)
return document.fileType
#endif
}

internal func hexEncodedString(options: HexEncodingOptions = []) -> String {
var format = options.contains(.upperCase) ? "%02hhX" : "%02hhx"
if options.contains(.space) {
format.append(" ")
}
return map { String(format: format, $0) }.joined()
static func forFile(_ file: URL) -> UTI? {
return typeOf(file).flatMap({ from($0) })
}

}

12 changes: 6 additions & 6 deletions project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ name: BPBleOTA
options:
#carthage: true
deploymentTarget:
iOS: "11.0"
iOS: "12.0"
bundleIdPrefix: com.bbb.zhxf
version: 0.6.0
version: 0.6.2

packages:
iOSMcuManagerLibrary:
url: https://github.com/NordicSemiconductor/IOS-nRF-Connect-Device-Manager
from: 1.3.1
from: 1.3.3
SwiftCBOR:
url: https://github.com/unrelentingtech/SwiftCBOR
from: 0.4.4
Expand Down Expand Up @@ -42,7 +42,7 @@ targets:
- Framework
templateAttributes:
frameworSourceFolder: .build/checkouts/IOS-nRF-Connect-Device-Manager/Source
PACKAGE_VERSION: 1.3.1
PACKAGE_VERSION: 1.3.3
dependencies:
- package: SwiftCBOR

Expand Down Expand Up @@ -74,13 +74,13 @@ targets:
- Framework
templateAttributes:
frameworSourceFolder: Sources
PACKAGE_VERSION: 0.6.0
PACKAGE_VERSION: 0.6.2
dependencies:
- package: iOSMcuManagerLibrary
- package: NordicDFU
settings:
SWIFT_ACTIVE_COMPILATION_CONDITIONS: "$(inherited) SWIFT_PACKAGE"
CURRENT_PROJECT_VERSION: 0.6.20230509
CURRENT_PROJECT_VERSION: 0.6.0220231010

BPBleOTATests:
type: bundle.unit-test
Expand Down

0 comments on commit e8afd89

Please sign in to comment.