• Resolved Halil ESEN

    (@halilesen)


    Hello,
    I guess there is something about the Apple splash screen in the new update. But what am I doing wrong?

    Here it is: adasdasds

    Also should I add it to fontinyus.php file and how?

Viewing 14 replies - 16 through 29 (of 29 total)
  • The plugin generates the correct HTML, given the correct filter function. If it doesn’t work for you, that is a separate issue.

    BTW each splash image must have the exact width and height for the device or else it will not be displayed. You most likely cannot rely on WordPress to resize the image for you.

    Thread Starter Halil ESEN

    (@halilesen)

    Then do I need to upload images directly to system / FTP / server files instead of WordPress? Okey…

    add_filter(
        'apple_touch_startup_image',
        static function ( $images ) {
            $for_retina_portrait = array(
                'href' => '/logo-retina-portrait-1170.png',
                'media' => '(device-width: 1170px) and (device-height: 2532px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 3)',
                );
            $for_retina_landscape = array(
                'href' => '/retina-landscape-2532.png',
                'media' => '(device-width: 1170px) and (device-height: 2532px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 3)',
                );
            $images[] = $for_retina_portrait;
            $images[] = $for_retina_landscape;
            
            return $images;
        },
        10,
        3
    );

    Didn’t work. I tried putting the site url at the beginning of the image paths, but it didn’t work. I guess this is something related to iOS. I hope it gets fixed. There is hope for PWA related to iOS 16.

    You continue to pass 10, 3 to add_filter, I’m not surprised your code doesn’t work. I suggest you read the documentation: https://developer.wordpress.org/reference/functions/add_filter/

    I guess this is something related to iOS.

    iOS splash screens work, e.g. https://medium.com/appscope/adding-custom-ios-splash-screens-to-your-progressive-web-app-41a9b18bdca3

    • This reply was modified 2 years, 11 months ago by Jeffery To. Reason: blockquote
    Thread Starter Halil ESEN

    (@halilesen)

    You continue to pass 10, 3 to add_filter, I’m not surprised your code doesn’t work. I suggest you read the documentation: https://developer.wordpress.org/reference/functions/add_filter/

    I don’t understand this.

    iOS splash screens work, e.g. https://medium.com/appscope/adding-custom-ios-splash-screens-to-your-progressive-web-app-41a9b18bdca3

    But that doesn’t work either. On the site he made, the screen opening image does not appear.

    Thread Starter Halil ESEN

    (@halilesen)

    OK. it happened. I understood what the problem was. Device values ​​must be entered as pt, not px. But set the image to px.

    Thanks.

    Thread Starter Halil ESEN

    (@halilesen)

    But it works with <link>.

    You continue to pass 10, 3 to add_filter, I’m not surprised your code doesn’t work. I suggest you read the documentation: https://developer.wordpress.org/reference/functions/add_filter/

    I don’t understand this.

    If you look at the code sample you keep posting, you keep doing this:

    add_filter(
        'apple_touch_startup_image',
        static function ( $images ) { ... },
        10,
        3
    );
    

    The 10 you are passing to add_filter is the priority, and the 3 is the number of arguments your function is expecting. But your function accepts one argument, not three. Either change it to 1 or omit it entirely (1 is the default value).

    • This reply was modified 2 years, 11 months ago by Jeffery To. Reason: Formatting

    Device values ​​must be entered as pt, not px.

    No, that has nothing to do with it.

    Thread Starter Halil ESEN

    (@halilesen)

    Now I’ve used the <link> code in the header file, I don’t want to change it. I am tired. 🙂

    Will this be a problem? Does PWA process this into the Manifesto? Should I add these <link> codes to the forum in the subfolders of the site? Is functions.php better?

    No, that has nothing to do with it.

    but otherwise it didn’t work.

    iOS splash screens are not included in the web app manifest.

    Thread Starter Halil ESEN

    (@halilesen)

    I understand. thank you so much

    Thread Starter Halil ESEN

    (@halilesen)

    so will this many <link> codes in the header slow down the site? Does it put a weight on it?

Viewing 14 replies - 16 through 29 (of 29 total)
  • The topic ‘apple startup image’ is closed to new replies.