Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify JWT access level to public #261

Merged
merged 1 commit into from
Mar 7, 2024
Merged

Modify JWT access level to public #261

merged 1 commit into from
Mar 7, 2024

Conversation

gewill
Copy link
Contributor

@gewill gewill commented Feb 26, 2024

Can catch let error as JWT.Error, get correct error localizedDescription

Example code:

    do {
      let config = try APIConfiguration(issuerID: "", privateKeyID: "", privateKey: "")
    } catch let error as JWT.Error {
      print("JWT.Error: \(error.localizedDescription)")
    } catch {
      print(error.localizedDescription)
    }

Output:

JWT.Error: The private key is not valid

If use normal catch:

    do {
      let config = try APIConfiguration(issuerID: "", privateKeyID: "", privateKey: "")
    } catch {
      print(error.localizedDescription)
    }

Output:

The operation couldn’t be completed. (AppStoreConnect_Swift_SDK.JWT.Error error 2.)

Can catch let error as JWT.Error, get correct error localizedDescription
@gewill gewill requested a review from AvdLee as a code owner February 26, 2024 04:39
@SwiftLeeBot
Copy link
Collaborator

Warnings
⚠️ 'Prices' is deprecated: Deprecated
⚠️ 'AvailableTerritories' is deprecated: Deprecated
⚠️ 'InAppPurchases' is deprecated: Deprecated
⚠️ 'Prices' is deprecated: Deprecated
⚠️ 'AvailableTerritories' is deprecated: Deprecated
⚠️ 'InAppPurchases' is deprecated: Deprecated
⚠️ 'Builds' is deprecated: Deprecated
⚠️ 'Builds' is deprecated: Deprecated
⚠️ 'AppPreOrder' is deprecated: Deprecated
⚠️ 'AppPrice' is deprecated: Deprecated
⚠️ 'InAppPurchase' is deprecated: Deprecated
⚠️ 'GameCenterEnabledVersion' is deprecated: Deprecated
⚠️ 'AgeRatingDeclaration' is deprecated: Deprecated
⚠️ 'AgeRatingDeclaration' is deprecated: Deprecated
⚠️ 'AppStoreVersionExperiment' is deprecated: Deprecated
⚠️ 'AppStoreVersionExperiment' is deprecated: Deprecated
⚠️ 'AppStoreVersionSubmission' is deprecated: Deprecated
⚠️ 'AppStoreVersionExperiment' is deprecated: Deprecated
⚠️ 'AppStoreVersionSubmission' is deprecated: Deprecated
⚠️ 'AppStoreVersionExperiment' is deprecated: Deprecated
⚠️ 'Prices' is deprecated: Deprecated
⚠️ 'AvailableTerritories' is deprecated: Deprecated
⚠️ 'Prices' is deprecated: Deprecated
⚠️ 'AvailableTerritories' is deprecated: Deprecated
⚠️ 'AppPreOrder' is deprecated: Deprecated
⚠️ 'AppPrice' is deprecated: Deprecated
⚠️ 'InAppPurchase' is deprecated: Deprecated
⚠️ 'GameCenterEnabledVersion' is deprecated: Deprecated
⚠️ 'AppStoreVersionExperiment' is deprecated: Deprecated
⚠️ 'AppStoreVersionExperiment' is deprecated: Deprecated
⚠️ 'AppStoreVersionExperiment' is deprecated: Deprecated
⚠️ 'AppStoreVersionExperiment' is deprecated: Deprecated
⚠️ 'AppPreOrder' is deprecated: Deprecated
⚠️ 'AppPrice' is deprecated: Deprecated
⚠️ 'InAppPurchase' is deprecated: Deprecated
⚠️ 'GameCenterEnabledVersion' is deprecated: Deprecated
⚠️ 'Builds' is deprecated: Deprecated
⚠️ 'AppPreOrder' is deprecated: Deprecated
⚠️ 'AppPrice' is deprecated: Deprecated
⚠️ 'InAppPurchase' is deprecated: Deprecated
⚠️ 'GameCenterEnabledVersion' is deprecated: Deprecated
⚠️ 'AgeRatingDeclaration' is deprecated: Deprecated
⚠️ 'AppStoreVersionExperiment' is deprecated: Deprecated
⚠️ 'AppStoreVersionExperiment' is deprecated: Deprecated
⚠️ 'AppStoreVersionSubmission' is deprecated: Deprecated
⚠️ 'AppStoreVersionExperiment' is deprecated: Deprecated
⚠️ 'AppStoreVersionSubmission' is deprecated: Deprecated
⚠️ 'AppStoreVersionExperiment' is deprecated: Deprecated
⚠️ 'Prices' is deprecated: Deprecated
⚠️ 'AvailableTerritories' is deprecated: Deprecated
⚠️ 'Prices' is deprecated: Deprecated
⚠️ 'AvailableTerritories' is deprecated: Deprecated
⚠️ 'InAppPurchases' is deprecated: Deprecated
Messages
📖 AppStoreConnect-Swift-SDK-Tests: Executed 17 tests (0 failed, 0 retried, 0 skipped) in 0.292 seconds
📖

View more details on Bitrise

Code Coverage Report

Name Coverage

SwiftLint found issues

Severity File Reason
Warning JWT.swift:77 Variable declarations should be separated from other statements by a blank line (let_var_whitespace)
Warning JWT.swift:42 Line should be 140 characters or less; currently it has 141 characters (line_length)
Warning JWT.swift:87 Line should be 140 characters or less; currently it has 143 characters (line_length)
Warning JWT.swift:105 Line should be 140 characters or less; currently it has 154 characters (line_length)
Warning JWT.swift:9 Imports should be sorted (sorted_imports)

Generated by 🚫 Danger Swift against ef63e43

@AvdLee AvdLee merged commit a08419a into AvdLee:master Mar 7, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants