From 9deb64b09e757d937d54a54732e2ff1180bad894 Mon Sep 17 00:00:00 2001 From: Jan Kobersky <5406945+kober32@users.noreply.github.com> Date: Fri, 24 Nov 2023 11:45:33 +0100 Subject: [PATCH] Upgrade to PowerAuthSDK 1.8.0 (#128) --- .github/workflows/build.yml | 8 +- .github/workflows/lint.yml | 12 +- .github/workflows/publish.yml | 36 ------ .github/workflows/tests.yml | 14 +- .gitignore | 3 + Cartfile | 2 +- Cartfile.resolved | 6 +- Package.swift | 6 +- WultraMobileTokenSDK.podspec | 8 +- .../project.pbxproj | 120 +----------------- .../xcschemes/WultraMobileTokenSDK.xcscheme | 2 +- .../WultraMobileTokenSDKTests.xcscheme | 2 +- .../ConfigFiles/Config.xcconfig | 60 ++++++++- .../ConfigFiles/Debug.xcconfig | 7 + .../ConfigFiles/Release.xcconfig | 6 + WultraMobileTokenSDKTests/Configs/Readme.md | 4 +- .../IntegrationProxy.swift | 17 +-- docs/SDK-Integration.md | 5 +- scripts/swiftlint.sh | 82 ++++++++++++ scripts/test.sh | 24 +--- scripts/xcodeselect.sh | 8 ++ 21 files changed, 204 insertions(+), 228 deletions(-) delete mode 100644 .github/workflows/publish.yml create mode 100755 scripts/swiftlint.sh create mode 100755 scripts/xcodeselect.sh diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 938bc2f..28727c8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,20 +7,16 @@ on: - master - releases/* pull_request: - schedule: - - cron: '25 6 * * *' jobs: build: name: Build - runs-on: macos-12 + runs-on: macos-13 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' + run: sh ./scripts/xcodeselect.sh - name: Building env: GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 334c5db..c37660d 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -10,21 +10,19 @@ on: jobs: pod: name: Pod Lib Lint - runs-on: macos-12 + runs-on: macos-13 steps: - name: Checkout the repo uses: actions/checkout@v2 + - name: Set proper xcode version + run: sh ./scripts/xcodeselect.sh - name: Lint run: pod lib lint --allow-warnings swift: name: Swift Lint - runs-on: macos-12 + runs-on: macos-13 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 + run: sh ./scripts/swiftlint.sh \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index 3f9a269..0000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Release a new version - -on: - workflow_dispatch: - inputs: - version: - description: 'Version of the library' - required: true - confirmBranch: - description: 'Confirm release branch' - required: true - command: - description: 'Library deploy command' - required: false - default: prepare push deploy -v2 --any-branch - -jobs: - publish: - name: Publish - 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: Publish the library - uses: kober32/library-deploy@develop - env: - COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} - with: - script-parameters: ${{ github.event.inputs.version }} ${{ github.event.inputs.command }} \ No newline at end of file diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4e532fb..c81f9fe 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,26 +7,20 @@ on: - master - releases/* pull_request: - schedule: - - cron: '25 6 * * *' jobs: tests: name: Tests - runs-on: macos-12 + runs-on: macos-13 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' + run: sh ./scripts/xcodeselect.sh - name: Runing Tests env: GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} - APP_KEY: ${{ secrets.TESTS_APP_KEY }} - APP_SECRET: ${{ secrets.TESTS_APP_SECRET }} - MASTER_SERVER_PUBLIC_KEY : ${{ secrets.TESTS_MASTER_SERVER_PUBLIC_KEY }} + SDK_CONFIG : ${{ secrets.TESTS_SDK_CONFIG }} CL_URL: ${{ secrets.TESTS_CL_URL }} CL_LGN: ${{ secrets.TESTS_CL_LGN }} CL_PWD: ${{ secrets.TESTS_CL_PWD }} @@ -34,4 +28,4 @@ jobs: OP_URL: ${{ secrets.TESTS_OP_URL }} ER_URL: ${{ secrets.TESTS_ER_URL }} IN_URL: ${{ secrets.TESTS_IN_URL }} - run: ./scripts/test.sh -appkey "$APP_KEY" -appsecret "$APP_SECRET" -masterspk "$MASTER_SERVER_PUBLIC_KEY" -er "$ER_URL" -op "$OP_URL" -in "$IN_URL" -cl "$CL_URL" -clu "$CL_LGN" -clp "$CL_PWD" -cla "$CL_AID" \ No newline at end of file + run: ./scripts/test.sh -destination "platform=iOS Simulator,OS=17.0.1,name=iPhone 15" -sdkconfig "$SDK_CONFIG" -er "$ER_URL" -op "$OP_URL" -in "$IN_URL" -cl "$CL_URL" -clu "$CL_LGN" -clp "$CL_PWD" -cla "$CL_AID" \ No newline at end of file diff --git a/.gitignore b/.gitignore index ecdb8a8..4529c97 100644 --- a/.gitignore +++ b/.gitignore @@ -61,3 +61,6 @@ Carthage # test config file WultraMobileTokenSDKTests/Configs/*.json + +# swiftlint +swiftlint diff --git a/Cartfile b/Cartfile index 5bcb826..40b13dc 100644 --- a/Cartfile +++ b/Cartfile @@ -1 +1 @@ -github "wultra/networking-apple" "1.2.0" +github "wultra/networking-apple" "1.3.0" diff --git a/Cartfile.resolved b/Cartfile.resolved index 2eecbdd..72d5757 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,3 +1,3 @@ -binary "https://raw.githubusercontent.com/wultra/powerauth-mobile-sdk-spm/1.7.6/PowerAuth2.json" "1.7.6" -binary "https://raw.githubusercontent.com/wultra/powerauth-mobile-sdk-spm/1.7.6/PowerAuthCore.json" "1.7.6" -github "wultra/networking-apple" "1.2.0" +binary "https://raw.githubusercontent.com/wultra/powerauth-mobile-sdk-spm/1.8.0/PowerAuth2.json" "1.8.0" +binary "https://raw.githubusercontent.com/wultra/powerauth-mobile-sdk-spm/1.8.0/PowerAuthCore.json" "1.8.0" +github "wultra/networking-apple" "1.3.0" diff --git a/Package.swift b/Package.swift index 3b75e5f..f0576cc 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.7 +// swift-tools-version:5.9 import PackageDescription @@ -11,8 +11,8 @@ let package = Package( .library(name: "WultraMobileTokenSDK", targets: ["WultraMobileTokenSDK"]) ], dependencies: [ - .package(url: "https://github.com/wultra/powerauth-mobile-sdk-spm.git", .upToNextMinor(from: "1.7.8")), - .package(url: "https://github.com/wultra/networking-apple.git", .upToNextMinor(from: "1.2.0")) + .package(url: "https://github.com/wultra/powerauth-mobile-sdk-spm.git", .upToNextMinor(from: "1.8.0")), + .package(url: "https://github.com/wultra/networking-apple.git", .upToNextMinor(from: "1.3.0")) ], targets: [ .target( diff --git a/WultraMobileTokenSDK.podspec b/WultraMobileTokenSDK.podspec index 1179b8e..49fdd27 100644 --- a/WultraMobileTokenSDK.podspec +++ b/WultraMobileTokenSDK.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'WultraMobileTokenSDK' - s.version = '1.5.2' + s.version = '1.8.0' # Metadata s.license = { :type => 'Apache License, Version 2.0', :file => 'LICENSE' } s.summary = 'High level PowerAuth based library written in swift' @@ -9,7 +9,7 @@ Pod::Spec.new do |s| s.author = { 'Wultra s.r.o.' => 'support@wultra.com' } s.source = { :git => 'https://github.com/wultra/mtoken-sdk-ios.git', :tag => s.version } # Deployment targets - s.swift_version = '5.7' + s.swift_version = '5.9' s.ios.deployment_target = '12.0' # Sources @@ -18,8 +18,8 @@ Pod::Spec.new do |s| # 'Common' subspec s.subspec 'Common' do |sub| sub.source_files = 'WultraMobileTokenSDK/Common/**/*.swift' - sub.dependency 'PowerAuth2', '~> 1.7.3' - sub.dependency 'WultraPowerAuthNetworking', '~> 1.2.0' + sub.dependency 'PowerAuth2', '~> 1.8.0' + sub.dependency 'WultraPowerAuthNetworking', '~> 1.3.0' end # 'Operations' subspec diff --git a/WultraMobileTokenSDK.xcodeproj/project.pbxproj b/WultraMobileTokenSDK.xcodeproj/project.pbxproj index 06ff6ba..a41e3c8 100644 --- a/WultraMobileTokenSDK.xcodeproj/project.pbxproj +++ b/WultraMobileTokenSDK.xcodeproj/project.pbxproj @@ -506,8 +506,9 @@ DCC5CC912449EE21004679AC /* Project object */ = { isa = PBXProject; attributes = { + BuildIndependentTargetsInParallel = YES; LastSwiftUpdateCheck = 1140; - LastUpgradeCheck = 1230; + LastUpgradeCheck = 1500; ORGANIZATIONNAME = Wultra; TargetAttributes = { DC616232248508F8000DED17 = { @@ -559,6 +560,7 @@ /* Begin PBXShellScriptBuildPhase section */ DCDA0A3128A6851400EDB6D4 /* Swift Lint */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -573,7 +575,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "if ! [ -x \"$(command -v swiftlint)\" ]; then\n echo 'warning: swiftlint is not installed on this computer.' >&2\n exit 0\nfi\n\nswiftlint\n"; + shellScript = "\"${PROJECT_DIR}/scripts/swiftlint.sh\" \"-ne\"\n"; }; /* End PBXShellScriptBuildPhase section */ @@ -706,64 +708,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = DCC5CCA92449F2E1004679AC /* Debug.xcconfig */; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - 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; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - 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 = 13.4; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; }; name = Debug; }; @@ -771,74 +715,18 @@ isa = XCBuildConfiguration; baseConfigurationReference = DCC5CCAA2449F2ED004679AC /* Release.xcconfig */; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - 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; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - 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 = 13.4; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; - SDKROOT = iphoneos; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; }; name = Release; }; DCC5CCA32449EE21004679AC /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - MARKETING_VERSION = 1.1.0; - PRODUCT_NAME = WultraMobileTokenSDK; }; name = Debug; }; DCC5CCA42449EE21004679AC /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - MARKETING_VERSION = 1.1.0; - PRODUCT_NAME = WultraMobileTokenSDK; }; name = Release; }; diff --git a/WultraMobileTokenSDK.xcodeproj/xcshareddata/xcschemes/WultraMobileTokenSDK.xcscheme b/WultraMobileTokenSDK.xcodeproj/xcshareddata/xcschemes/WultraMobileTokenSDK.xcscheme index 415913d..2f569f9 100644 --- a/WultraMobileTokenSDK.xcodeproj/xcshareddata/xcschemes/WultraMobileTokenSDK.xcscheme +++ b/WultraMobileTokenSDK.xcodeproj/xcshareddata/xcschemes/WultraMobileTokenSDK.xcscheme @@ -1,6 +1,6 @@ -Note: If you want to use only operations, you can omit the Push dependency & Inbox dependency. +Note: If you want to use only operations, you can omit the Push dependency and inbox dependency. ## Guaranteed PowerAuth Compatibility @@ -61,6 +61,7 @@ Note: If you want to use only operations, you can omit the Push dependency & Inb | `1.5.x` | `1.6.x` | | `1.6.x` | `1.7.x` | | `1.7.x` | `1.7.x` | +| `1.8.x` | `1.8.x` | ## Xcode Compatibility diff --git a/scripts/swiftlint.sh b/scripts/swiftlint.sh new file mode 100755 index 0000000..b229eaf --- /dev/null +++ b/scripts/swiftlint.sh @@ -0,0 +1,82 @@ +#!/bin/bash + +#set -x +set -e + +SWIFTLINT_VERSION="0.53.0" +NO_ERROR=false + +TOP=$(dirname $0) +PROJECT_HOME="${TOP}/.." +pushd "${PROJECT_HOME}" + +while [[ $# -gt 0 ]] +do + opt="$1" + case "$opt" in + -ne | --no-error) + NO_ERROR=true + ;; + esac + shift +done + +function download +{ + DOWNLOAD_FOLDER="swiftlintdownload" + rm -rf "${DOWNLOAD_FOLDER}" + mkdir "${DOWNLOAD_FOLDER}" + pushd "${DOWNLOAD_FOLDER}" + curl -sSLO "https://github.com/realm/SwiftLint/releases/download/${SWIFTLINT_VERSION}/portable_swiftlint.zip" + unzip "portable_swiftlint.zip" -d . + cp "swiftlint" "./.." + popd + rm -rf "${DOWNLOAD_FOLDER}" + chmod +x swiftlint +} + +echo "" +echo "###################################################" +echo "Running swiftlint to verify code style." + +if [ ! -f "swiftlint" ]; then + echo " > downloading swiftlint ${SWIFTLINT_VERSION}..." + download +else + current=$(./swiftlint --version) + if [ "${SWIFTLINT_VERSION}" != "${current}" ]; then + + echo " > swiftlint ${current} already downloaded, but ${SWIFTLINT_VERSION} is required, removing and downloading." + rm "swiftlint" + download + + else + echo " > Using downloaded swiftlint v${SWIFTLINT_VERSION}." + fi +fi + +EXIT_CODE=0 +if [ $NO_ERROR == true ]; then + PARAM="" +else + PARAM="--strict" +fi +./swiftlint "${PARAM}" || EXIT_CODE=$? + +if [ $EXIT_CODE -eq 0 ]; then + echo " > No swiftlint errors 👍." +else + echo "" + echo " > ⚠️ There are swiftlint errors." + if [ $NO_ERROR == true ]; then + echo " > Build will continue but you need to fix swiftlint issue because otherwise build will fail on the CI." + EXIT_CODE=0 + else + echo " > Exiting with error - please fix the swiftlint issues." + EXIT_CODE=1 + fi +fi +echo "###################################################" +echo "" + +exit $EXIT_CODE \ No newline at end of file diff --git a/scripts/test.sh b/scripts/test.sh index dd2e118..ba911fe 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -7,7 +7,7 @@ set -u # stop when undefined variable is used SCRIPT_FOLDER=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) IOS_VERSION=$(xcrun simctl list | grep "\-\- iOS" | tr -d - | tr -d " " | tr -d "iOS") -DESTINATION="platform=iOS Simulator,OS=${IOS_VERSION},name=iPhone 13 mini" +DESTINATION="platform=iOS Simulator,OS=${IOS_VERSION},name=iPhone 15" CL_URL="" CL_LGN="" @@ -16,9 +16,7 @@ CL_AID="" ER_URL="" OP_URL="" IN_URL="" -APPKEY="" -APPSECRET="" -MASTERSPK="" +SDKCONFIG="" # Parse parameters of this script while [[ $# -gt 0 ]] @@ -64,18 +62,8 @@ do shift shift ;; - -appkey) - APPKEY="$2" - shift - shift - ;; - -appsecret) - APPSECRET="$2" - shift - shift - ;; - -masterspk) - MASTERSPK="$2" + -sdkconfig) + SDKCONFIG="$2" shift shift ;; @@ -102,9 +90,7 @@ echo """{ \"enrollmentServerUrl\" : \"${ER_URL}\", \"operationsServerUrl\" : \"${OP_URL}\", \"inboxServerUrl\" : \"${IN_URL}\", - \"appKey\" : \"${APPKEY}\", - \"appSecret\" : \"${APPSECRET}\", - \"masterServerPublicKey\" : \"${MASTERSPK}\" + \"sdkConfig\" : \"${SDKCONFIG}\" }""" > "WultraMobileTokenSDKTests/Configs/config.json" xcrun xcodebuild \ diff --git a/scripts/xcodeselect.sh b/scripts/xcodeselect.sh new file mode 100755 index 0000000..09aa88e --- /dev/null +++ b/scripts/xcodeselect.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +set -e + +# Script used for selecting proper xcode for all builds on the CI (not appcenter). +# Available xcodes at https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md#xcode + +sudo xcode-select -s "/Applications/Xcode_15.0.1.app" \ No newline at end of file