From 756039fdf0310765452d2411d3c2875ada6f7ce4 Mon Sep 17 00:00:00 2001 From: Jan Kobersky Date: Tue, 4 Oct 2022 09:12:45 +0200 Subject: [PATCH] Updated build scripts + enabled logging with compile flag (#35) --- .github/workflows/build.yml | 6 +++++- .github/workflows/lint.yml | 12 ++++++++++-- .github/workflows/publish.yml | 6 +++++- Cartfile | 4 ++-- Cartfile.resolved | 4 ++-- Deploy/WultraPowerAuthNetworking.podspec | 6 +++--- Package.swift | 8 ++++---- Sources/WultraPowerauthNetworking/WPNLogger.swift | 6 +++--- WultraPowerAuthNetworking.podspec | 4 ++-- 9 files changed, 36 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5094abf..82530e1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,9 +13,13 @@ on: jobs: build: name: Build - runs-on: macos-11.0 + runs-on: macos-12 steps: - name: Checkout the repo uses: actions/checkout@v2 + - name: Set proper xcode version + uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: '14.0' - name: Building run: ./scripts/build.sh \ No newline at end of file diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 0190167..7f7a7cc 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -10,19 +10,27 @@ on: jobs: pod: name: Pod Lib Lint - runs-on: macos-11.0 + runs-on: macos-12 steps: - name: Checkout the repo uses: actions/checkout@v2 + - name: Set proper xcode version + uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: '14.0' - name: Build the framework run: ./scripts/build.sh - name: Lint run: pod lib lint --allow-warnings swift: name: Swift Lint - runs-on: macos-11.0 + runs-on: macos-12 steps: - name: Checkout the repo uses: actions/checkout@v2 + - name: Set proper xcode version + uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: '14.0' - name: Lint run: swiftlint --strict \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 450f307..fbfbfd2 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -17,13 +17,17 @@ on: jobs: publish: name: Publish - runs-on: macos-11.0 + runs-on: macos-12 steps: - name: Checkout the repo uses: actions/checkout@v2 - name: Make sure we're on the proper branch run: | [[ $GITHUB_REF == refs/heads/${{ github.event.inputs.confirmBranch }} ]] || exit 1 + - name: Set proper xcode version + uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: '14.0' - name: Build the framework env: GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/Cartfile b/Cartfile index 5f5bb80..cdf0a56 100644 --- a/Cartfile +++ b/Cartfile @@ -1,2 +1,2 @@ -binary "https://raw.githubusercontent.com/wultra/powerauth-mobile-sdk-spm/34043c100c398fd765dd0fc7829ca5419e6adacd/PowerAuth2.json" ~> 1.7.0 -binary "https://raw.githubusercontent.com/wultra/powerauth-mobile-sdk-spm/34043c100c398fd765dd0fc7829ca5419e6adacd/PowerAuthCore.json" ~> 1.7.0 \ No newline at end of file +binary "https://raw.githubusercontent.com/wultra/powerauth-mobile-sdk-spm/develop/PowerAuth2.json" ~> 1.7.3 +binary "https://raw.githubusercontent.com/wultra/powerauth-mobile-sdk-spm/develop/PowerAuthCore.json" ~> 1.7.3 \ No newline at end of file diff --git a/Cartfile.resolved b/Cartfile.resolved index 97f57d8..c0ef46a 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,2 +1,2 @@ -binary "https://raw.githubusercontent.com/wultra/powerauth-mobile-sdk-spm/34043c100c398fd765dd0fc7829ca5419e6adacd/PowerAuth2.json" "1.7.1" -binary "https://raw.githubusercontent.com/wultra/powerauth-mobile-sdk-spm/34043c100c398fd765dd0fc7829ca5419e6adacd/PowerAuthCore.json" "1.7.1" +binary "https://raw.githubusercontent.com/wultra/powerauth-mobile-sdk-spm/develop/PowerAuth2.json" "1.7.3" +binary "https://raw.githubusercontent.com/wultra/powerauth-mobile-sdk-spm/develop/PowerAuthCore.json" "1.7.3" diff --git a/Deploy/WultraPowerAuthNetworking.podspec b/Deploy/WultraPowerAuthNetworking.podspec index 2b97996..bef7741 100644 --- a/Deploy/WultraPowerAuthNetworking.podspec +++ b/Deploy/WultraPowerAuthNetworking.podspec @@ -10,8 +10,8 @@ Pod::Spec.new do |s| s.source = { :git => 'https://github.com/wultra/networking-apple.git', :tag => s.version } s.source_files = 'Sources/WultraPowerauthNetworking/**/*.swift' s.platform = :ios - s.swift_version = "5.0" - s.ios.deployment_target = '10.0' + s.swift_version = "5.7" + s.ios.deployment_target = '11.0' - s.dependency 'PowerAuth2', '>= 1.7' + s.dependency 'PowerAuth2', '>= 1.7.3' end \ No newline at end of file diff --git a/Package.swift b/Package.swift index ba9b048..4d727df 100644 --- a/Package.swift +++ b/Package.swift @@ -1,12 +1,12 @@ -// swift-tools-version:5.4 +// swift-tools-version:5.7 import PackageDescription let package = Package( name: "WultraPowerAuthNetworking", platforms: [ - .iOS(.v10), - .tvOS(.v10) + .iOS(.v11), + .tvOS(.v11) ], products: [ .library( @@ -15,7 +15,7 @@ let package = Package( targets: ["WultraPowerAuthNetworking"]) ], dependencies: [ - .package(name: "PowerAuth2", url: "https://github.com/wultra/powerauth-mobile-sdk-spm.git", .upToNextMinor(from: "1.7.0")) + .package(name: "PowerAuth2", url: "https://github.com/wultra/powerauth-mobile-sdk-spm.git", .upToNextMinor(from: "1.7.3")) ], targets: [ .target( diff --git a/Sources/WultraPowerauthNetworking/WPNLogger.swift b/Sources/WultraPowerauthNetworking/WPNLogger.swift index 1ee51ac..337a355 100644 --- a/Sources/WultraPowerauthNetworking/WPNLogger.swift +++ b/Sources/WultraPowerauthNetworking/WPNLogger.swift @@ -39,7 +39,7 @@ public class WPNLogger { /// Prints simple message to the debug console. static func print(_ message: @autoclosure () -> String) { - #if DEBUG + #if DEBUG || WPN_ENABLE_LOGGING if verboseLevel == .all { Swift.print("[WPN] \(message().limit(characterLimit))") } @@ -48,7 +48,7 @@ public class WPNLogger { /// Prints warning message to the debug console. static func warning(_ message: @autoclosure () -> String) { - #if DEBUG + #if DEBUG || WPN_ENABLE_LOGGING if verboseLevel.rawValue >= VerboseLevel.warnings.rawValue { Swift.print("[WPN] WARNING: \(message().limit(characterLimit))") } @@ -57,7 +57,7 @@ public class WPNLogger { /// Prints error message to the debug console. static func error(_ message: @autoclosure () -> String) { - #if DEBUG + #if DEBUG || WPN_ENABLE_LOGGING if verboseLevel != .off { Swift.print("[WPN] ERROR: \(message().limit(characterLimit))") } diff --git a/WultraPowerAuthNetworking.podspec b/WultraPowerAuthNetworking.podspec index 89f8ee0..d297004 100644 --- a/WultraPowerAuthNetworking.podspec +++ b/WultraPowerAuthNetworking.podspec @@ -10,8 +10,8 @@ Pod::Spec.new do |s| s.source = { :git => 'https://github.com/wultra/networking-apple.git', :tag => s.version } s.source_files = 'Sources/WultraPowerauthNetworking/**/*.swift' s.platform = :ios - s.swift_version = "5.0" - s.ios.deployment_target = '10.0' + s.swift_version = "5.7" + s.ios.deployment_target = '11.0' s.dependency 'PowerAuth2', '>= 1.7' end