3

Using Swift5, iOS-12.2, Xcode-10.2(10E125) and running everything with a GitLab CI,

There seem to be an issue with screenshot screen sizes during App release step (using Fastlane's deliver). The screenshots are created nicely (with Fastlane's snapshot and frameit tools).

But having updated to newest iOS-, Swift- and Xcode-versions now suddenly breaks my working example of Fastlane. I now get the following error:

Unsupported screen size [1446, 2948] for path '/Users/user/Documents/Programieren/iPhone_applications/Learning/Watch/MyApp/builds/aMDc3etB/0/myusername/MyAppName/fastlane/screenshots/de-DE/iPhone 8 Plus-01Screenshot_de_framed.png'

Could there be something wrong with Fastlane:

  • either at the frameit step (since framed images are bigger in size than what snapshot created)
  • or at the App release step (since maybe Apple changed something with the screen sizes accepted).

I am wondering if the fact that I run everything with GitLab CI has an influence (but it should't). What could be the cause of the Fastlane failure concerning screen sizes of screenshots at the deliver step ?

For an iPhone8-Plus example - what I realised:

--> screenshots after Fastlane snapshot step are [1242 × 2208] pixels in size

--> framed-screenshots after the Fastlane frameit step are [1446 × 2948] pixels in size

The Apple app store asks for [1242 × 2208] pixel sized images - therefore "framed" ones will never be accepted !!

Could there be something wrong with frameit ???

Should I choose different iOS devices in my Snapfile (see below) ? And if yes, which ones ??? (i.e. it used to be the case that the App store needed an iPhone8 Plus sized screenshot [5.5"]. Did that change maybe ??)

Here is my Fastfile:

lane :screenshots do
    snapshot
    frameit(silver: true, path: './fastlane/screenshots')
end

Here is my Snapfile:

workspace "MyApp.xcworkspace"
scheme "MyAppUITests"
devices([
    "iPhone 8 Plus",
    "iPhone SE"
])
languages([
    "en-US",
    "de-DE"
])
localize_simulator true
clear_previous_screenshots true
erase_simulator true
reinstall_app true

Here is my Framefile.json file:

{
    "device_frame_version": "latest",
    "default": {
        "keyword": {
            "fonts": [
                {
                    "font": "./fonts/SF-UI-Display-Semibold.otf",
                    "supported": ["de-DE", "en-US"]
                },
                {
                    "font": "./fonts/Chinese.ttf",
                    "supported": ["zcmn-Hans"]
                }
            ]
        },
        "title": {
            "fonts": [
                {
                    "font": "./fonts/SF-UI-Display-Regular.otf",
                    "supported": ["de-DE", "en-US"]
                },
                {
                    "font": "./fonts/Chinese.ttf",
                    "supported": ["zcmn-Hans"]
                }
            ],
            "color": "#203943"
        },
        "background": "./background.jpg",
        "padding": 50,
        "stack_title" : false,
        "title_below_image": false,
        "show_complete_frame": false,
    },


    "data": [
        {
            "filter": "01",
            "keyword": {
                "color": "#4B849B"
            }
        },
        {
            "filter": "02",
            "keyword": {
                "color": "#4B849B"
            }
        },
        {
            "filter": "03",
            "keyword": {
                "color": "#4B849B"
            }
        },
        {
            "filter": "04",
            "keyword": {
                "color": "#4B849B"
            }
        },
        {
            "filter": "05",
            "keyword": {
                "color": "#4B849B"
            }
        },
        {
            "filter": "06",
            "keyword": {
                "color": "#4B849B"
            }
        }
    ]
}
iKK
  • 6,394
  • 10
  • 58
  • 131
  • I just found this: `Starting March 27, 2019, all app submissions for iPhone or iPad, including universal apps, will require screenshots for iPhone XS Max or the 12.9-inch iPad Pro (3rd generation).`I guess, I have to use XS Max in addition to what I had so far with the 8 Plus.... – iKK Apr 09 '19 at 13:18
  • hmm, nope! Adding `iPhone Xs Max` to the `Snapfile`devices is not helping since `frameit` produces Xs-Max screenshots of size [1413 × 2844] but the App Store only allows [1242 × 2688]. Therefore again still same issue. Can anybody offer a solution to this ? – iKK Apr 09 '19 at 13:49
  • Which one is the question you want answered here? – janpio Apr 09 '19 at 14:14
  • You write "But having updated to newest iOS-, Swift- and Xcode-versions now suddenly breaks my working example of Fastlane.", but then all the rest sounds like this never really worked before. Was this broken by your update or did this never run successfully yet? – janpio Apr 09 '19 at 14:37
  • 1
    `frameit` should produce a image of a different size if you _only_ add a device frame (it adds a frame around the screenshot that keeps its size), but create an image of the originals size if you _also_ place the framed screenshot on a background with e.g. padding and text. From your description it is not clear what is happening. – janpio Apr 09 '19 at 14:38
  • Thank you janpio. To answer your first question: before updating versions, everything worked. I changed from `capture_screenshots(..)` to `snapshot (with Snapfile)`. I don't see why this could be the issue. Therefore, yes, it did work before the update and it seems no longer after the update. About your padding and text hint: I have `padding` and `background` defined in the Framefile.json file (see above). The only thing that changed inside this Framefile (compared to before the update) is: I added `stack_title`, `title_below_image` and `show_complete_frame`. Could these be the problem ? – iKK Apr 09 '19 at 16:57
  • 1
    (1) `snapshot`, `capture_ios_screenshots` and `capture_screenshots` are aliased for the identical code. (2) If it worked before, you can compare the size of the framed screenshots - did something change there? (3) And yes, changing the configuration could of course change things - go back to your old configuration to see if it works with the current versions then. – janpio Apr 09 '19 at 17:00
  • 1
    Thank you janpio. Oh no - silly me! I found the mistake: My `.gitignore` file contained `fastlane/screenshots` which prevented all my `Framefile.json` changes from taking effect ! And since I am working with GitLab CI, all my `git push` did not deliver any of my fastlane configuration-changes (but still triggered a new pipeline - all with old configs unfortunately). Your sorting out the issue helped, made me look deeper and I thank you for that ! – iKK Apr 09 '19 at 19:52
  • Great, divide and conquer worked once again :) – janpio Apr 10 '19 at 13:07

1 Answers1

2

For those who bump into frameit spitting "Unsupported screen size" error, here is a scriptable way to resolve the issue.

  1. Go to this file to check the accepted screen size for all devices.

  2. Use magick to reframe the raw screenshot to the dimension required for the desired device. An example command to resize the screenshot to fit iPhone 12 Pro Max is like this

magick $file -resize "1284x2778"\! $file
  1. After resizing, run frameit.
Fanchen Bao
  • 3,310
  • 1
  • 21
  • 34