From d38e2f7f15f1be67900f635159c00c354625b69f Mon Sep 17 00:00:00 2001 From: Brannon Jones Date: Mon, 30 Jan 2023 18:32:05 -0700 Subject: [PATCH] Fix build warning (ref #133) (#137) * Fix build warning (ref #133) * Update GitHub Actions build settings for macos-12 / Xcode 13 * Update tvOS destination for CI build --- .github/workflows/analyze-test.yml | 20 +++++++++---------- .github/workflows/framework-docs.yml | 4 ++-- .../Helpers/SBTokenProvider.m | 3 --- 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/.github/workflows/analyze-test.yml b/.github/workflows/analyze-test.yml index 5443ae6..71a71ba 100644 --- a/.github/workflows/analyze-test.yml +++ b/.github/workflows/analyze-test.yml @@ -8,9 +8,9 @@ on: jobs: ios-analyze-test: - runs-on: macos-latest + runs-on: macos-12 env: - XC_VERSION: ${{ '12.3' }} + XC_VERSION: ${{ '13.4.1' }} XC_WORKSPACE: ${{ 'WindowsAzureMessaging.xcworkspace' }} XC_SCHEME: ${{ 'WindowsAzureMessaging iOS Framework' }} steps: @@ -28,9 +28,9 @@ jobs: run: /usr/bin/xcodebuild test -workspace "$XC_WORKSPACE" -scheme "$XC_SCHEME" -destination 'platform=iOS Simulator,name=iPhone 11' tvos-analyze-test: - runs-on: macos-latest + runs-on: macos-12 env: - XC_VERSION: ${{ '12.3' }} + XC_VERSION: ${{ '13.4.1' }} XC_WORKSPACE: ${{ 'WindowsAzureMessaging.xcworkspace' }} XC_SCHEME: ${{ 'WindowsAzureMessaging tvOS Framework' }} steps: @@ -42,15 +42,15 @@ jobs: run: "sudo xcode-select -switch /Applications/Xcode_$XC_VERSION.app" - name: iOS Analyze - run: /usr/bin/xcodebuild analyze -workspace "$XC_WORKSPACE" -scheme "$XC_SCHEME" -destination 'platform=tvOS Simulator,name=Apple TV 4K' + run: /usr/bin/xcodebuild analyze -workspace "$XC_WORKSPACE" -scheme "$XC_SCHEME" -destination 'platform=tvOS Simulator,name=Apple TV 4K (2nd generation)' - name: iOS Test - run: /usr/bin/xcodebuild test -workspace "$XC_WORKSPACE" -scheme "$XC_SCHEME" -destination 'platform=tvOS Simulator,name=Apple TV 4K' + run: /usr/bin/xcodebuild test -workspace "$XC_WORKSPACE" -scheme "$XC_SCHEME" -destination 'platform=tvOS Simulator,name=Apple TV 4K (2nd generation)' macos-analyze-test: - runs-on: macos-latest + runs-on: macos-12 env: - XC_VERSION: ${{ '12.3' }} + XC_VERSION: ${{ '13.4.1' }} XC_WORKSPACE: ${{ 'WindowsAzureMessaging.xcworkspace' }} XC_SCHEME: ${{ 'WindowsAzureMessaging macOS Framework' }} steps: @@ -68,9 +68,9 @@ jobs: run: /usr/bin/xcodebuild test -workspace "$XC_WORKSPACE" -scheme "$XC_SCHEME" -destination 'platform=macOS' mac-catalyst-analyze-test: - runs-on: macos-latest + runs-on: macos-12 env: - XC_VERSION: ${{ '12.3' }} + XC_VERSION: ${{ '13.4.1' }} XC_WORKSPACE: ${{ 'WindowsAzureMessaging.xcworkspace' }} XC_SCHEME: ${{ 'WindowsAzureMessaging iOS Framework' }} steps: diff --git a/.github/workflows/framework-docs.yml b/.github/workflows/framework-docs.yml index a51496f..639791a 100644 --- a/.github/workflows/framework-docs.yml +++ b/.github/workflows/framework-docs.yml @@ -8,9 +8,9 @@ on: jobs: build-sdk: - runs-on: macos-latest + runs-on: macos-12 env: - XC_VERSION: ${{ '12.3' }} + XC_VERSION: ${{ '13.4.1' }} XC_WORKSPACE: ${{ 'WindowsAzureMessaging.xcworkspace' }} XC_SCHEME: ${{ 'All Frameworks' }} XC_DOC_SCHEME: ${{ 'All Documentation' }} diff --git a/WindowsAzureMessaging/WindowsAzureMessaging/Helpers/SBTokenProvider.m b/WindowsAzureMessaging/WindowsAzureMessaging/Helpers/SBTokenProvider.m index ff6219d..3330df1 100644 --- a/WindowsAzureMessaging/WindowsAzureMessaging/Helpers/SBTokenProvider.m +++ b/WindowsAzureMessaging/WindowsAzureMessaging/Helpers/SBTokenProvider.m @@ -236,7 +236,6 @@ static const int defaultTimeToExpireinMins = 20; } + (NSString *)ExtractToken:(NSData *)data { - NSString *expireInSeconds; NSString *token; NSString *rawStr = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; NSArray *fields = [rawStr componentsSeparatedByString:@"&"]; @@ -253,8 +252,6 @@ static const int defaultTimeToExpireinMins = 20; NSString *value = [SBNotificationHubHelper urlDecode:[subItems objectAtIndex:1]]; if ([key isEqualToString:@"wrap_access_token"]) { token = [NSString stringWithFormat:@"WRAP access_token=\"%@\"", value]; - } else { - expireInSeconds = value; } }