PHPackages                             wiperawa/pwa-ios-add-to-screen-yii-widget - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. wiperawa/pwa-ios-add-to-screen-yii-widget

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

wiperawa/pwa-ios-add-to-screen-yii-widget
=========================================

Simple widget that display 'install app on your iphone' dialog box.

25PHPCI failing

Since Jul 22Pushed 5y ago1 watchersCompare

[ Source](https://github.com/wiperawa/pwa-ios-add-to-screen-yii-widget)[ Packagist](https://packagist.org/packages/wiperawa/pwa-ios-add-to-screen-yii-widget)[ RSS](/packages/wiperawa-pwa-ios-add-to-screen-yii-widget/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

 Yii2 PWA 'add app to screen' message widget for iOS
====================================================

[](#-yii2-pwa-add-app-to-screen-message-widget-for-ios)

Progressive Web Apps 'Add app to screen' message widget.

 [![](https://github.com/wiperawa/pwa-ios-add-to-screen-yii-widget/raw/master/example.png?raw=true)](https://github.com/wiperawa/pwa-ios-add-to-screen-yii-widget/blob/master/example.png?raw=true)

As you know, if you have PWA-compatible site, android will prompt to add its icon to desktop by default, but iOS dont have this, so we have to add such message manually.

This widget adds message at bottom of the page only when user-agent is iOS and we are not in 'standalone' mode(app allready added to screen).

By closing this message box, widget set limited-time cookie, when this cookie active message will not be shown(see widget config for details).

installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
$ php composer.phar require wiperawa/pwa-ios-add-to-screen-yii-widget "dev-master"

```

or add

```
"wiperawa/pwa-ios-add-to-screen-yii-widget": "dev-master"

```

to the `require` section of your `composer.json` file.

usage
-----

[](#usage)

Here is the Widget usage example, with DEFAULT parameters, if you dont want to change it, can omit them.

```
use wiperawa\pwa\IosAddToScreen\AddToScreenWidget;

//...

AddToScreenWidget::widget([
    'containerOptions' => [],

    //Brand img url, should not be bigger than 48x48 px.
    'brandImg' => "@iosWidgetAssetUrl/img/brand-yii.png",

    // welcome text
    'welcomeText' => 'Install @appName on your IPhone: ',

    //instruction text
    'instructionText' => "push @iosShareImg and then @iosAddImg to screen 'Home'",

    //seconds, hide cookie lifetime, defaults to 1 year
    'cookieLifeTime' => 31536000,

    //iOS 'share' button img.
    'iosShareImg' => "@iosWidgetAssetUrl/img/ios-share.svg",

    //iOS 'add' button img
    'iosAddImg' => "@iosWidgetAssetUrl/img/ios-add.svg"
]);
```

in case you want to use translated mesasges, leave @appName, @iosShareImg and @iosAddImg on place, and widget will replace them automatically.

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/c3ee14230e8eccfcc16ed08435be4bf64d3008ce9bab29a95d8ad2fdb5c068a0?d=identicon)[wiperawa](/maintainers/wiperawa)

---

Top Contributors

[![wiperawa](https://avatars.githubusercontent.com/u/14181470?v=4)](https://github.com/wiperawa "wiperawa (8 commits)")

### Embed Badge

![Health badge](/badges/wiperawa-pwa-ios-add-to-screen-yii-widget/health.svg)

```
[![Health](https://phpackages.com/badges/wiperawa-pwa-ios-add-to-screen-yii-widget/health.svg)](https://phpackages.com/packages/wiperawa-pwa-ios-add-to-screen-yii-widget)
```

###  Alternatives

[veewee/reflecta

Unleash the Power of Optics in your code!

12261.1k3](/packages/veewee-reflecta)[badcow/phrase-generator

Generate an English adjective-noun pair as a phrase (e.g. SubmissiveMonkey).

145.2k](/packages/badcow-phrase-generator)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
