Hi!
I'm using the App Store Connect API to automate the setup of Game Center achievements. However, I'm facing an issue when it comes to uploading the achievement icon.
I referred to the following link and tried to use the Create an Achievement Image API: https://developer.apple.com/documentation/appstoreconnectapi/create_an_achievement_image
This API includes a GameCenterAchievementImageCreateRequest.Data.Attributes object, which has properties like fileName and fileSize. However, there is no property for the file path, only the file name.
I also checked the page about uploading assets to App Store Connect: https://developer.apple.com/documentation/appstoreconnectapi/uploading_assets_to_app_store_connect
Unfortunately, there is no specific mention of how to upload an achievement image.
When I use the GameCenterAchievementImageCreateRequest.Data.Attributes and set fileName to "XXXX" (for example), the request completes successfully, but the achievement page only displays the file name XXXX, and the image is not loaded as expected.
Any advice or guidance would be greatly appreciated. Thank you in advance!
Although it's not listed on that page, I'm fairly sure that these image uploads will also work as described in your second link.
If you explore the docs starting from your first link (i.e. GameCenterAchievementImageResponse -> GameCenterAchievementImage -> GameCenterAchievementImage.Attributes -> uploadOperations), you'll get to "Upload instructions for assets such as app previews and app screenshots". Use this as described in your second link, under "Upload the Asset", to perform the actual upload.