AvdLee / appstoreconnect-swift-sdk

The Swift SDK to work with the App Store Connect API from Apple.
Other
1.48k stars 198 forks source link

Update AppStoreVersionPhasedReleaseWithoutIncludesResponse.swift #271

Closed J0s34h closed 5 months ago

J0s34h commented 7 months ago

Currently receiving this response would result in decode crash, using correct data structure would resolve this, this may also be the case for some other endpoints, but i am not sure

(crashed due to type not parsing appStoreVersionPhasedReleases due to AppStoreVersion only expecting appStoreVersion)

SwiftLeeBot commented 7 months ago
Warnings
:warning: 'Prices' is deprecated: Deprecated
:warning: 'AvailableTerritories' is deprecated: Deprecated
:warning: 'InAppPurchases' is deprecated: Deprecated
:warning: 'Prices' is deprecated: Deprecated
:warning: 'AvailableTerritories' is deprecated: Deprecated
:warning: 'InAppPurchases' is deprecated: Deprecated
:warning: 'Builds' is deprecated: Deprecated
:warning: 'Builds' is deprecated: Deprecated
:warning: 'AppPreOrder' is deprecated: Deprecated
:warning: 'AppPrice' is deprecated: Deprecated
:warning: 'InAppPurchase' is deprecated: Deprecated
:warning: 'GameCenterEnabledVersion' is deprecated: Deprecated
:warning: 'AgeRatingDeclaration' is deprecated: Deprecated
:warning: 'AgeRatingDeclaration' is deprecated: Deprecated
:warning: 'AppStoreVersionExperiment' is deprecated: Deprecated
:warning: 'AppStoreVersionExperiment' is deprecated: Deprecated
:warning: 'AppStoreVersionSubmission' is deprecated: Deprecated
:warning: 'AppStoreVersionExperiment' is deprecated: Deprecated
:warning: 'AppStoreVersionSubmission' is deprecated: Deprecated
:warning: 'AppStoreVersionExperiment' is deprecated: Deprecated
:warning: 'Prices' is deprecated: Deprecated
:warning: 'AvailableTerritories' is deprecated: Deprecated
:warning: 'Prices' is deprecated: Deprecated
:warning: 'AvailableTerritories' is deprecated: Deprecated
:warning: 'AppPreOrder' is deprecated: Deprecated
:warning: 'AppPrice' is deprecated: Deprecated
:warning: 'InAppPurchase' is deprecated: Deprecated
:warning: 'GameCenterEnabledVersion' is deprecated: Deprecated
:warning: 'AppStoreVersionExperiment' is deprecated: Deprecated
:warning: 'AppStoreVersionExperiment' is deprecated: Deprecated
:warning: 'Builds' is deprecated: Deprecated
:warning: 'AppPreOrder' is deprecated: Deprecated
:warning: 'AppPrice' is deprecated: Deprecated
:warning: 'InAppPurchase' is deprecated: Deprecated
:warning: 'GameCenterEnabledVersion' is deprecated: Deprecated
:warning: 'AppStoreVersionExperiment' is deprecated: Deprecated
:warning: 'AppStoreVersionExperiment' is deprecated: Deprecated
:warning: 'AgeRatingDeclaration' is deprecated: Deprecated
:warning: 'AppStoreVersionExperiment' is deprecated: Deprecated
:warning: 'AppStoreVersionExperiment' is deprecated: Deprecated
:warning: 'AppStoreVersionSubmission' is deprecated: Deprecated
:warning: 'AppStoreVersionExperiment' is deprecated: Deprecated
:warning: 'AppStoreVersionSubmission' is deprecated: Deprecated
:warning: 'AppStoreVersionExperiment' is deprecated: Deprecated
:warning: 'Prices' is deprecated: Deprecated
:warning: 'AvailableTerritories' is deprecated: Deprecated
:warning: 'AppPreOrder' is deprecated: Deprecated
:warning: 'AppPrice' is deprecated: Deprecated
:warning: 'InAppPurchase' is deprecated: Deprecated
:warning: 'GameCenterEnabledVersion' is deprecated: Deprecated
:warning: 'Prices' is deprecated: Deprecated
:warning: 'AvailableTerritories' is deprecated: Deprecated
:warning: 'InAppPurchases' is deprecated: Deprecated
Messages
:book: AppStoreConnect-Swift-SDK-Tests: Executed 17 tests (0 failed, 0 retried, 0 skipped) in 0.220 seconds
:book: View more details on Bitrise

Code Coverage Report

Name Coverage

SwiftLint found issues

Severity File Reason
Warning AppStoreVersionPhasedReleaseWithoutIncludesResponse.swift:6 Type name 'AppStoreVersionPhasedReleaseWithoutIncludesResponse' should be between 3 and 50 characters long (type_name)

Generated by :no_entry_sign: Danger Swift against a02abead0a0e684c332df4f4a7822a810c09e2ae

jzilske commented 6 months ago

This is a bug in the App Store Connect API or its documentation imho; the v1/appStoreVersions/{id}/appStoreVersionPhasedRelease endpoint is documented to return a AppStoreVersion object which the SDK rightfully expects, however the response contains a AppStoreVersionPhasedRelease object instead. I filed this with Apple as FB13774222 fwiw.

AvdLee commented 5 months ago

@J0s34h is this PR still relevant? 🙏 If so, we can try getting it in this week!

polpielladev commented 5 months ago

Hi @AvdLee and @J0s34h, I am closing this issue as the latest schema changes have addressed this issue 👍

https://github.com/AvdLee/appstoreconnect-swift-sdk/pull/276/files#diff-5be5bcdea84115f40356293f986a87a44e5c459ba394519dc2f0c8724dac9bf8R8