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

Manually adds VISION_OS to Platform to work around OpenAPI spec issue #245

Merged
merged 1 commit into from
Oct 9, 2023

Conversation

mathiasemil
Copy link
Contributor

The OpenAPI spec 2.4 and 3.0 fails include VISION_OS in Platform. This breaks several endpoints since the API is returning VISION_OS for all apps that support VisionOS.

Example from https://api.appstoreconnect.apple.com/v1/appInfos/xxx:

"platforms" : [ "IOS", "MAC_OS", "TV_OS", "VISION_OS" ]

Feedback filed as FB13208526.

I'm unsure how to handle this without manually modifying Platform.swift and I realize that this "fix" will be undone next time a new version of the OpenAPI spec is generated (unless Apple fixes it in that version).

Any thoughts for a better way to handle this?

OpenAPI spec 2.4 and 3.0 fails include VISION_OS. Filed as FB13208526.
@mathiasemil mathiasemil requested a review from AvdLee as a code owner September 27, 2023 12:14
@@ -9,4 +9,5 @@ public enum Platform: String, Codable, CaseIterable {
case ios = "IOS"
case macOs = "MAC_OS"
case tvOs = "TV_OS"
case visionOs = "VISION_OS" // VisionOS manually added since version 3.0 of Apple's OpenAPI spec fails to include it. Reported in FB13208526 27/9/2023.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unsure why GitHub shows the added line with a different indentation, but in Xcode it looks correct 🤷🏼

@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
⚠️ 'AppPrice' 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
⚠️ 'AppPrice' is deprecated: Deprecated
⚠️ 'AppStoreVersionExperiment' is deprecated: Deprecated
⚠️ 'AppStoreVersionExperiment' is deprecated: Deprecated
⚠️ 'AppPrice' is deprecated: Deprecated
⚠️ 'AgeRatingDeclaration' is deprecated: Deprecated
⚠️ 'AppStoreVersionExperiment' is deprecated: Deprecated
⚠️ 'AppStoreVersionExperiment' is deprecated: Deprecated
⚠️ 'AppStoreVersionExperiment' is deprecated: Deprecated
⚠️ 'AppStoreVersionExperiment' is deprecated: Deprecated
⚠️ 'Builds' 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
⚠️ Left side of nil coalescing operator '??' has non-optional type 'String', so the right side is never used
⚠️ 'Prices' is deprecated: Deprecated
⚠️ 'AvailableTerritories' is deprecated: Deprecated
⚠️ 'InAppPurchases' is deprecated: Deprecated
⚠️ 'AppPrice' is deprecated: Deprecated
Messages
📖 AppStoreConnect-Swift-SDK-Tests: Executed 17 tests (0 failed, 0 retried, 0 skipped) in 0.121 seconds
📖

View more details on Bitrise

Code Coverage Report

Name Coverage

SwiftLint found issues

Severity File Reason
Warning Platform.swift:4 The disabled 'all' rule should be re-enabled before the end of the file (blanket_disable_command)

Generated by 🚫 Danger Swift against 571426a

@MortenGregersen
Copy link
Contributor

MortenGregersen commented Sep 27, 2023

I saw the same issue when I updated https://Bagbutik.dev to version 3.0 of the spec (MortenGregersen/Bagbutik#131).

I have reported this as FB13071298. Apple has replied on my issue (September 19th):

We agree the API should say nothing about unreleased feature.
And they are looking into publishing a new spec (sometime).

Maybe you should make yours as duplicate of mine? I will update mine to reference yours.

@mathiasemil
Copy link
Contributor Author

I saw the same issue when I updated https://Bagbutik.dev to version 3.0 of the spec (MortenGregersen/Bagbutik#131).

I have reported this as FB13071298. Apple has replied on my issue (September 19th):

We agree the API should say nothing about unreleased feature.
And they are looking into publishing a new spec (sometime).

Maybe you should make yours as duplicate of mine? I will update mine to reference yours.

I've updated my feedback now to reference yours 🙏🏼

Copy link
Owner

@AvdLee AvdLee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any thoughts for a better way to handle this?

Ideally, we would apply a custom parsing rule to CreateAPI, but this will do for now. Hopefully, it gets fixed by Apple soon!

@AvdLee AvdLee merged commit d54bdbf into AvdLee:master Oct 9, 2023
@mathiasemil mathiasemil deleted the fix/visionOS branch February 23, 2024 10:31
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.

4 participants